From 25c59a090b1486f4cfd041385db17e92b46eb600 Mon Sep 17 00:00:00 2001 From: Hanne Moa <hanne.moa@uninett.no> Date: Tue, 26 May 2015 15:51:27 +0200 Subject: [PATCH] Now only two variable names for templates $t - not grep-safe, used in 3rd party libs for other things $template - only used for templates last I checked --- modules/consentAdmin/www/consentAdmin.php | 20 ++++++++++---------- modules/core/www/postredirect.php | 8 ++++---- www/admin/hostnames.php | 12 ++++++------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php index fd75bc1d3..ae8b30b32 100644 --- a/modules/consentAdmin/www/consentAdmin.php +++ b/modules/consentAdmin/www/consentAdmin.php @@ -186,9 +186,9 @@ if ($action !== null && $sp_entityid !== null) { } } // init template to enable translation of status messages - $et = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin'); - $et->data['res'] = $res; - $et->show(); + $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin'); + $template->data['res'] = $res; + $template->show(); exit; } @@ -204,9 +204,9 @@ foreach ($user_consent_list as $c) { $template_sp_content = array(); // Init template -$et = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin'); -$sp_empty_name = $et->getTag('sp_empty_name'); -$sp_empty_description = $et->getTag('sp_empty_description'); +$template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin'); +$sp_empty_name = $template->translator->getTag('sp_empty_name'); +$sp_empty_description = $template->translator->getTag('sp_empty_description'); // Process consents for all SP foreach ($all_sp_metadata as $sp_entityid => $sp_values) { @@ -267,7 +267,7 @@ foreach ($all_sp_metadata as $sp_entityid => $sp_values) { ); } -$et->data['header'] = 'Consent Administration'; -$et->data['spList'] = $sp_list; -$et->data['showDescription'] = $cA_config->getValue('showDescription'); -$et->show(); +$template->data['header'] = 'Consent Administration'; +$template->data['spList'] = $sp_list; +$template->data['showDescription'] = $cA_config->getValue('showDescription'); +$template->show(); diff --git a/modules/core/www/postredirect.php b/modules/core/www/postredirect.php index 3daa0cd68..cd124efcb 100644 --- a/modules/core/www/postredirect.php +++ b/modules/core/www/postredirect.php @@ -45,8 +45,8 @@ assert('array_key_exists("url", $postData)'); assert('array_key_exists("post", $postData)'); $config = SimpleSAML_Configuration::getInstance(); -$p = new SimpleSAML_XHTML_Template($config, 'post.php'); -$p->data['destination'] = $postData['url']; -$p->data['post'] = $postData['post']; -$p->show(); +$template = new SimpleSAML_XHTML_Template($config, 'post.php'); +$template->data['destination'] = $postData['url']; +$template->data['post'] = $postData['post']; +$template->show(); exit(0); diff --git a/www/admin/hostnames.php b/www/admin/hostnames.php index 17e74e462..da7b09bd7 100644 --- a/www/admin/hostnames.php +++ b/www/admin/hostnames.php @@ -24,11 +24,11 @@ $attributes['Utilities_getSelfHostWithPath()'] = array(\SimpleSAML\Utils\HTTP::g $attributes['Utilities_getFirstPathElement()'] = array(\SimpleSAML\Utils\HTTP::getFirstPathElement()); $attributes['Utilities_selfURL()'] = array(\SimpleSAML\Utils\HTTP::getSelfURL()); -$et = new SimpleSAML_XHTML_Template($config, 'hostnames.php'); +$template = new SimpleSAML_XHTML_Template($config, 'hostnames.php'); -$et->data['remaining'] = $session->getAuthData('admin', 'Expire') - time(); -$et->data['attributes'] = $attributes; -$et->data['valid'] = 'na'; -$et->data['logout'] = null; +$template->data['remaining'] = $session->getAuthData('admin', 'Expire') - time(); +$template->data['attributes'] = $attributes; +$template->data['valid'] = 'na'; +$template->data['logout'] = null; -$et->show(); +$template->show(); -- GitLab