Skip to content
Snippets Groups Projects
Commit 25c59a09 authored by Hanne Moa's avatar Hanne Moa
Browse files

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
parent e052aec2
No related branches found
No related tags found
No related merge requests found
...@@ -186,9 +186,9 @@ if ($action !== null && $sp_entityid !== null) { ...@@ -186,9 +186,9 @@ if ($action !== null && $sp_entityid !== null) {
} }
} }
// init template to enable translation of status messages // init template to enable translation of status messages
$et = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin'); $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadminajax.php', 'consentAdmin:consentadmin');
$et->data['res'] = $res; $template->data['res'] = $res;
$et->show(); $template->show();
exit; exit;
} }
...@@ -204,9 +204,9 @@ foreach ($user_consent_list as $c) { ...@@ -204,9 +204,9 @@ foreach ($user_consent_list as $c) {
$template_sp_content = array(); $template_sp_content = array();
// Init template // Init template
$et = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin'); $template = new SimpleSAML_XHTML_Template($config, 'consentAdmin:consentadmin.php', 'consentAdmin:consentadmin');
$sp_empty_name = $et->getTag('sp_empty_name'); $sp_empty_name = $template->translator->getTag('sp_empty_name');
$sp_empty_description = $et->getTag('sp_empty_description'); $sp_empty_description = $template->translator->getTag('sp_empty_description');
// Process consents for all SP // Process consents for all SP
foreach ($all_sp_metadata as $sp_entityid => $sp_values) { foreach ($all_sp_metadata as $sp_entityid => $sp_values) {
...@@ -267,7 +267,7 @@ 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'; $template->data['header'] = 'Consent Administration';
$et->data['spList'] = $sp_list; $template->data['spList'] = $sp_list;
$et->data['showDescription'] = $cA_config->getValue('showDescription'); $template->data['showDescription'] = $cA_config->getValue('showDescription');
$et->show(); $template->show();
...@@ -45,8 +45,8 @@ assert('array_key_exists("url", $postData)'); ...@@ -45,8 +45,8 @@ assert('array_key_exists("url", $postData)');
assert('array_key_exists("post", $postData)'); assert('array_key_exists("post", $postData)');
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
$p = new SimpleSAML_XHTML_Template($config, 'post.php'); $template = new SimpleSAML_XHTML_Template($config, 'post.php');
$p->data['destination'] = $postData['url']; $template->data['destination'] = $postData['url'];
$p->data['post'] = $postData['post']; $template->data['post'] = $postData['post'];
$p->show(); $template->show();
exit(0); exit(0);
...@@ -24,11 +24,11 @@ $attributes['Utilities_getSelfHostWithPath()'] = array(\SimpleSAML\Utils\HTTP::g ...@@ -24,11 +24,11 @@ $attributes['Utilities_getSelfHostWithPath()'] = array(\SimpleSAML\Utils\HTTP::g
$attributes['Utilities_getFirstPathElement()'] = array(\SimpleSAML\Utils\HTTP::getFirstPathElement()); $attributes['Utilities_getFirstPathElement()'] = array(\SimpleSAML\Utils\HTTP::getFirstPathElement());
$attributes['Utilities_selfURL()'] = array(\SimpleSAML\Utils\HTTP::getSelfURL()); $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(); $template->data['remaining'] = $session->getAuthData('admin', 'Expire') - time();
$et->data['attributes'] = $attributes; $template->data['attributes'] = $attributes;
$et->data['valid'] = 'na'; $template->data['valid'] = 'na';
$et->data['logout'] = null; $template->data['logout'] = null;
$et->show(); $template->show();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment