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

Split logic and data for negotiate-module

For: #454
parent b6511f5c
No related branches found
No related tags found
No related merge requests found
......@@ -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}'); ?>
......
......@@ -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}'); ?>
......
......@@ -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();
......@@ -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();
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