Skip to content
Snippets Groups Projects
Commit 3cc42032 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Psalm fixes

parent bb93118f
No related branches found
No related tags found
No related merge requests found
...@@ -101,21 +101,8 @@ class Exception ...@@ -101,21 +101,8 @@ class Exception
} }
$t = new Template($this->config, 'core:no_cookie.twig'); $t = new Template($this->config, 'core:no_cookie.twig');
$translator = $t->getTranslator();
/** @var string $header */
$header = $translator->t('{core:no_cookie:header}');
/** @var string $desc */
$desc = $translator->t('{core:no_cookie:description}');
/** @var string $retry */
$retry = $translator->t('{core:no_cookie:retry}');
$t->data['header'] = htmlspecialchars($header);
$t->data['description'] = htmlspecialchars($desc);
$t->data['retry'] = htmlspecialchars($retry);
$t->data['retryURL'] = $retryURL; $t->data['retryURL'] = $retryURL;
return $t; return $t;
} }
...@@ -148,10 +135,10 @@ class Exception ...@@ -148,10 +135,10 @@ class Exception
} }
$t = new Template($this->config, 'core:short_sso_interval.twig'); $t = new Template($this->config, 'core:short_sso_interval.twig');
$translator = $t->getTranslator();
$t->data['params'] = ['StateId' => $stateId]; $t->data['params'] = ['StateId' => $stateId];
$t->data['trackId'] = $this->session->getTrackID(); $t->data['trackId'] = $this->session->getTrackID();
$t->data['autofocus'] = 'contbutton'; $t->data['autofocus'] = 'contbutton';
return $t; return $t;
} }
} }
...@@ -38,7 +38,6 @@ $t->data['isadmin'] = $isadmin; ...@@ -38,7 +38,6 @@ $t->data['isadmin'] = $isadmin;
$t->data['loginurl'] = $loginurl; $t->data['loginurl'] = $loginurl;
$t->data['logouturl'] = $logouturl; $t->data['logouturl'] = $logouturl;
$t->data['header'] = $t->getTranslator()->t('{core:frontpage:page_title}');
$t->data['links'] = $links; $t->data['links'] = $links;
$t->data['links_welcome'] = $links_welcome; $t->data['links_welcome'] = $links_welcome;
$t->data['links_config'] = $links_config; $t->data['links_config'] = $links_config;
......
...@@ -148,7 +148,6 @@ $t->data['links_welcome'] = $links_welcome; ...@@ -148,7 +148,6 @@ $t->data['links_welcome'] = $links_welcome;
$t->data['links_config'] = $links_config; $t->data['links_config'] = $links_config;
$t->data['links_auth'] = $links_auth; $t->data['links_auth'] = $links_auth;
$t->data['links_federation'] = $links_federation; $t->data['links_federation'] = $links_federation;
$t->data['header'] = $translator->t('{core:frontpage:page_title}');
$t->data['metadata_url'] = \SimpleSAML\Module::getModuleURL('core/show_metadata.php'); $t->data['metadata_url'] = \SimpleSAML\Module::getModuleURL('core/show_metadata.php');
$t->data['metaentries'] = $metaentries; $t->data['metaentries'] = $metaentries;
......
...@@ -44,6 +44,5 @@ $t->data['links_welcome'] = $links_welcome; ...@@ -44,6 +44,5 @@ $t->data['links_welcome'] = $links_welcome;
$t->data['links_config'] = $links_config; $t->data['links_config'] = $links_config;
$t->data['links_auth'] = $links_auth; $t->data['links_auth'] = $links_auth;
$t->data['links_federation'] = $links_federation; $t->data['links_federation'] = $links_federation;
$t->data['header'] = $t->getTranslator()->t('{core:frontpage:page_title}');
$t->send(); $t->send();
...@@ -127,27 +127,9 @@ if ($type === 'nojs') { ...@@ -127,27 +127,9 @@ if ($type === 'nojs') {
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:logout-iframe.twig'); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:logout-iframe.twig');
} }
/**
* @deprecated The "id" variable will be removed. Please use "auth_state" instead.
*/
$id = \SimpleSAML\Auth\State::saveState($state, 'core:Logout-IFrame'); $id = \SimpleSAML\Auth\State::saveState($state, 'core:Logout-IFrame');
$t->data['id'] = $id;
$t->data['auth_state'] = $id; $t->data['auth_state'] = $id;
$t->data['header'] = $t->getTranslator()->t('{logout:progress}');
$t->data['type'] = $type; $t->data['type'] = $type;
$t->data['terminated_service'] = $terminated; $t->data['terminated_service'] = $terminated;
$t->data['remaining_services'] = $remaining; $t->data['remaining_services'] = $remaining;
/** @deprecated The "from" array will be removed in 2.0, use the "terminated_service" array instead */
$t->data['from'] = $state['core:Logout-IFrame:From'];
/** @deprecated The "SPs" array will be removed, use the "remaining_services" array instead */
$t->data['SPs'] = $state['core:Logout-IFrame:Associations'];
if ($type !== 'nojs') {
/** @deprecated The "jquery" array will be removed in 2.0 */
$t->data['jquery'] = ['core' => true, 'ui' => false, 'css' => false];
}
$t->send(); $t->send();
<?php <?php
if (isset($_REQUEST['retryURL'])) { if (isset($_REQUEST['retryURL'])) {
$retryURL = (string) $_REQUEST['retryURL']; $retryURL = strval($_REQUEST['retryURL']);
$retryURL = \SimpleSAML\Utils\HTTP::checkURLAllowed($retryURL); $retryURL = \SimpleSAML\Utils\HTTP::checkURLAllowed($retryURL);
} else { } else {
$retryURL = null; $retryURL = null;
...@@ -9,17 +9,5 @@ if (isset($_REQUEST['retryURL'])) { ...@@ -9,17 +9,5 @@ if (isset($_REQUEST['retryURL'])) {
$globalConfig = \SimpleSAML\Configuration::getInstance(); $globalConfig = \SimpleSAML\Configuration::getInstance();
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:no_cookie.twig'); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:no_cookie.twig');
$translator = $t->getTranslator();
/** @var string $header */
$header = $translator->t('{core:no_cookie:header}');
/** @var string $desc */
$desc = $translator->t('{core:no_cookie:description}');
/** @var string $retry */
$retry = $translator->t('{core:no_cookie:retry}');
$t->data['header'] = htmlspecialchars($header);
$t->data['description'] = htmlspecialchars($desc);
$t->data['retry'] = htmlspecialchars($retry);
$t->data['retryURL'] = $retryURL; $t->data['retryURL'] = $retryURL;
$t->send(); $t->send();
...@@ -24,10 +24,8 @@ if (array_key_exists('continue', $_REQUEST)) { ...@@ -24,10 +24,8 @@ if (array_key_exists('continue', $_REQUEST)) {
$globalConfig = \SimpleSAML\Configuration::getInstance(); $globalConfig = \SimpleSAML\Configuration::getInstance();
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:short_sso_interval.twig'); $t = new \SimpleSAML\XHTML\Template($globalConfig, 'core:short_sso_interval.twig');
$translator = $t->getTranslator();
$t->data['target'] = \SimpleSAML\Module::getModuleURL('core/short_sso_interval.php'); $t->data['target'] = \SimpleSAML\Module::getModuleURL('core/short_sso_interval.php');
$t->data['params'] = ['StateId' => $id]; $t->data['params'] = ['StateId' => $id];
$t->data['trackId'] = $session->getTrackID(); $t->data['trackId'] = $session->getTrackID();
$t->data['header'] = $translator->t('{core:short_sso_interval:warning_header}');
$t->data['autofocus'] = 'contbutton'; $t->data['autofocus'] = 'contbutton';
$t->send(); $t->send();
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