diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php index 21c0da4728ba5ceb5ea23f57f7465d3cbd7b718a..f5a4b2d284e9cfc2424a980e01a8586346b7100a 100644 --- a/lib/SimpleSAML/Error/Error.php +++ b/lib/SimpleSAML/Error/Error.php @@ -269,7 +269,7 @@ class Error extends Exception call_user_func($show_function, $config, $data); Assert::true(false); } else { - $t = new Template($config, 'error.twig', 'errors'); + $t = new Template($config, 'error.twig'); // Include translations for the module that holds the included template if ($this->includeTemplate !== null) { diff --git a/lib/SimpleSAML/Locale/Translate.php b/lib/SimpleSAML/Locale/Translate.php index eaa58c1230364c134eda0254e8f241ecac86d3ed..f8468dd03bc8d3da9163c872391019301226db99 100644 --- a/lib/SimpleSAML/Locale/Translate.php +++ b/lib/SimpleSAML/Locale/Translate.php @@ -37,13 +37,11 @@ class Translate * Constructor * * @param \SimpleSAML\Configuration $configuration Configuration object - * @param string|null $defaultDictionary The default dictionary where tags will come from. */ - public function __construct(Configuration $configuration, ?string $defaultDictionary = null) + public function __construct(Configuration $configuration) { $this->configuration = $configuration; $this->language = new Language($configuration); - $this->defaultDictionary = $defaultDictionary; } diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php index 39d475e8750ad9e25ca7f212a99be92bf965a4f6..5abcd97c39ea631ec3dac8273f05a1d297b758a6 100644 --- a/lib/SimpleSAML/XHTML/IdPDisco.php +++ b/lib/SimpleSAML/XHTML/IdPDisco.php @@ -587,7 +587,7 @@ class IdPDisco throw new \Exception('Invalid value for the \'idpdisco.layout\' option.'); } - $t = new Template($this->config, $templateFile, 'disco'); + $t = new Template($this->config, $templateFile); $newlist = []; foreach ($idpList as $entityid => $data) { diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 768e36bd00b337d753a8662fc30a0bd4dedb66ee..bb18d8f2c0d6e9ee0f01fae436d2a3b5484327d5 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -116,9 +116,8 @@ class Template extends Response * * @param \SimpleSAML\Configuration $configuration Configuration object * @param string $template Which template file to load - * @param string|null $defaultDictionary The default dictionary where tags will come from. */ - public function __construct(Configuration $configuration, string $template, string $defaultDictionary = null) + public function __construct(Configuration $configuration, string $template) { $this->configuration = $configuration; $this->template = $template; @@ -134,7 +133,7 @@ class Template extends Response ); // initialize internationalization system - $this->translator = new Translate($configuration, $defaultDictionary); + $this->translator = new Translate($configuration); $this->localization = new Localization($configuration); // check if we need to attach a theme controller diff --git a/modules/admin/lib/Controller/Test.php b/modules/admin/lib/Controller/Test.php index c74462d2dd91f5b69231195c1f647170accde0c3..44845142ce112d52414b2448a93807274c973416 100644 --- a/modules/admin/lib/Controller/Test.php +++ b/modules/admin/lib/Controller/Test.php @@ -145,7 +145,7 @@ class Test $nameId = $authsource->getAuthData('saml:sp:NameID') ?? false; $httpUtils = new Utils\HTTP(); - $t = new Template($this->config, 'admin:status.twig', 'attributes'); + $t = new Template($this->config, 'admin:status.twig'); $l = $t->getLocalization(); $l->addAttributeDomains(); $t->data = [ diff --git a/modules/core/lib/Controller/Login.php b/modules/core/lib/Controller/Login.php index 50a4f3cb0d86d7f462224afaca6b7e598b735af6..db4f724b7c72eac62cbc208454a03554f9fc6d82 100644 --- a/modules/core/lib/Controller/Login.php +++ b/modules/core/lib/Controller/Login.php @@ -89,7 +89,7 @@ class Login $session = Session::getSessionFromRequest(); - $t = new Template($this->config, 'auth_status.twig', 'attributes'); + $t = new Template($this->config, 'auth_status.twig'); $l = $t->getLocalization(); $l->addAttributeDomains(); $t->data['header'] = '{status:header_saml20_sp}'; diff --git a/modules/cron/lib/Controller/Cron.php b/modules/cron/lib/Controller/Cron.php index f90e0e116e705181fedaa33d1840d35513aa2c56..114d2261e40acc587030a51272ba6ffc30e77891 100644 --- a/modules/cron/lib/Controller/Cron.php +++ b/modules/cron/lib/Controller/Cron.php @@ -105,7 +105,7 @@ class Cron ]; } - $t = new Template($this->config, 'cron:croninfo.twig', 'cron:cron'); + $t = new Template($this->config, 'cron:croninfo.twig'); $t->data['urls'] = $urls; return $t; } @@ -157,7 +157,7 @@ class Cron } if ($output === 'xhtml') { - $t = new Template($this->config, 'cron:croninfo-result.twig', 'cron:cron'); + $t = new Template($this->config, 'cron:croninfo-result.twig'); $t->data['tag'] = $croninfo['tag']; $t->data['time'] = $time; $t->data['url'] = $url;