diff options
author | Hanne Moa <hanne.moa@uninett.no> | 2016-08-31 11:48:19 +0200 |
---|---|---|
committer | Hanne Moa <hanne.moa@uninett.no> | 2016-09-06 09:18:42 +0200 |
commit | 4d5a3d46193e3810008533dc0f23bd6270a03828 (patch) | |
tree | 1af5b387f4f0eb127d8d1779b317ba854987d1a5 | |
parent | b6511f5c6994c9aae72b6e31a738769978ba7fad (diff) | |
download | simplesamlphp-4d5a3d46193e3810008533dc0f23bd6270a03828.zip simplesamlphp-4d5a3d46193e3810008533dc0f23bd6270a03828.tar.gz simplesamlphp-4d5a3d46193e3810008533dc0f23bd6270a03828.tar.bz2 |
Split logic and data for negotiate-module
For: #454
-rw-r--r-- | modules/negotiate/templates/disable.php | 5 | ||||
-rw-r--r-- | modules/negotiate/templates/enable.php | 5 | ||||
-rw-r--r-- | modules/negotiate/www/disable.php | 1 | ||||
-rw-r--r-- | modules/negotiate/www/enable.php | 5 |
4 files changed, 6 insertions, 10 deletions
diff --git a/modules/negotiate/templates/disable.php b/modules/negotiate/templates/disable.php index cffa20c..f9e2d55 100644 --- a/modules/negotiate/templates/disable.php +++ b/modules/negotiate/templates/disable.php @@ -10,10 +10,7 @@ $this->includeAtTemplateBase('includes/header.php'); ?> <h1><?php echo $this->t('{negotiate:negotiate:disable_title}'); ?></h1> -<?php -$url = SimpleSAML\Module::getModuleURL('negotiate/enable.php'); -?> -<?php echo $this->t('{negotiate:negotiate:disable_info_pre}', array('URL' => htmlspecialchars($url))); ?> +<?php echo $this->t('{negotiate:negotiate:disable_info_pre}', array('URL' => htmlspecialchars($this->data['url']))); ?> <?php echo $this->t('{negotiate:negotiate:info_post}'); ?> diff --git a/modules/negotiate/templates/enable.php b/modules/negotiate/templates/enable.php index 225597b..939af6f 100644 --- a/modules/negotiate/templates/enable.php +++ b/modules/negotiate/templates/enable.php @@ -11,10 +11,7 @@ $this->includeAtTemplateBase('includes/header.php'); ?> <h1><?php echo $this->t('{negotiate:negotiate:enable_title}'); ?></h1> -<?php -$url = SimpleSAML\Module::getModuleURL('negotiate/disable.php'); -?> -<?php echo $this->t('{negotiate:negotiate:enable_info_pre}', array('URL' => htmlspecialchars($url))); ?> +<?php echo $this->t('{negotiate:negotiate:enable_info_pre}', array('URL' => htmlspecialchars($this->data['url']))); ?> <?php echo $this->t('{negotiate:negotiate:info_post}'); ?> diff --git a/modules/negotiate/www/disable.php b/modules/negotiate/www/disable.php index e392cac..9cf8c59 100644 --- a/modules/negotiate/www/disable.php +++ b/modules/negotiate/www/disable.php @@ -19,4 +19,5 @@ $globalConfig = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getSessionFromRequest(); $session->setData('negotiate:disable', 'session', FALSE, 24*60*60); $t = new SimpleSAML_XHTML_Template($globalConfig, 'negotiate:disable.php'); +$t->data['url'] = SimpleSAML\Module::getModuleURL('negotiate/enable.php'); $t->show(); diff --git a/modules/negotiate/www/enable.php b/modules/negotiate/www/enable.php index c58159c..04c5e16 100644 --- a/modules/negotiate/www/enable.php +++ b/modules/negotiate/www/enable.php @@ -9,8 +9,8 @@ */ $params = array( - 'secure' => FALSE, - 'httponly' => TRUE, + 'secure' => FALSE, + 'httponly' => TRUE, ); \SimpleSAML\Utils\HTTP::setCookie('NEGOTIATE_AUTOLOGIN_DISABLE_PERMANENT', NULL, $params, FALSE); @@ -18,4 +18,5 @@ $globalConfig = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getSessionFromRequest(); $session->setData('negotiate:disable', 'session', FALSE, 24*60*60); $t = new SimpleSAML_XHTML_Template($globalConfig, 'negotiate:enable.php'); +$t->data['url'] = SimpleSAML\Module::getModuleURL('negotiate/disable.php'); $t->show(); |