Skip to content
Snippets Groups Projects
Commit 7865bfd4 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Update standalone files and scripts using the old SimpleSAML_Module and SimpleSAML_Logger classes.

parent de23b00a
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ if (array_key_exists('pageid', $this->data)) {
'page' => $this->data['pageid']
);
SimpleSAML_Module::callHooks('htmlinject', $hookinfo);
SimpleSAML\Module::callHooks('htmlinject', $hookinfo);
}
// - o - o - o - o - o - o - o - o - o - o - o - o -
......
......@@ -44,7 +44,7 @@ if (array_key_exists('available_certs', $this->data)) { ?>
<?php
foreach (array_keys($this->data['available_certs']) as $certName) {
echo '<li><a href="'.
htmlspecialchars(SimpleSAML_Module::getModuleURL('saml/idp/certs.php').'/'.$certName).'">'.$certName.
htmlspecialchars(SimpleSAML\Module::getModuleURL('saml/idp/certs.php').'/'.$certName).'">'.$certName.
'</a>';
if ($this->data['available_certs'][$certName]['certFingerprint'][0] ===
......
......@@ -22,7 +22,7 @@ try {
$session = SimpleSAML_Session::getSessionFromRequest();
$data = $session->getData('core:errorreport', $reportId);
} catch (Exception $e) {
SimpleSAML_Logger::error('Error loading error report data: '.var_export($e->getMessage(), true));
SimpleSAML\Logger::error('Error loading error report data: '.var_export($e->getMessage(), true));
}
if ($data === null) {
......@@ -113,7 +113,7 @@ if ($config->getBoolean('errorreporting', true) && $toAddress !== 'na@example.or
$email = new SimpleSAML_XHTML_EMail($toAddress, 'SimpleSAMLphp error report', $from);
$email->setBody($message);
$email->send();
SimpleSAML_Logger::error('Report with id '.$reportId.' sent to <'.$toAddress.'>.');
SimpleSAML\Logger::error('Report with id '.$reportId.' sent to <'.$toAddress.'>.');
}
// redirect the user back to this page to clear the POST request
......
......@@ -2,4 +2,4 @@
require_once('_include.php');
\SimpleSAML\Utils\HTTP::redirectTrustedURL(SimpleSAML_Module::getModuleURL('core/frontpage_welcome.php'));
\SimpleSAML\Utils\HTTP::redirectTrustedURL(SimpleSAML\Module::getModuleURL('core/frontpage_welcome.php'));
......@@ -64,7 +64,7 @@ try {
$url = '';
}
if (!SimpleSAML_Module::isModuleEnabled($module)) {
if (!SimpleSAML\Module::isModuleEnabled($module)) {
throw new SimpleSAML_Error_NotFound('The module \''.$module.'\' was either not found, or wasn\'t enabled.');
}
......@@ -78,7 +78,7 @@ try {
throw new SimpleSAML_Error_BadRequest('Requested URL contained \'./\'.');
}
$moduleDir = SimpleSAML_Module::getModuleDir($module).'/www/';
$moduleDir = SimpleSAML\Module::getModuleDir($module).'/www/';
// check for '.php/' in the path, the presence of which indicates that another php-script should handle the request
for ($phpPos = strpos($url, '.php/'); $phpPos !== false; $phpPos = strpos($url, '.php/', $phpPos + 1)) {
......@@ -117,7 +117,7 @@ try {
if (!file_exists($path)) {
// file not found
SimpleSAML_Logger::info('Could not find file \''.$path.'\'.');
SimpleSAML\Logger::info('Could not find file \''.$path.'\'.');
throw new SimpleSAML_Error_NotFound('The URL wasn\'t found in the module.');
}
......@@ -147,7 +147,7 @@ try {
$contentType = mime_content_type($path);
} else {
// mime_content_type doesn't exist. Return a default MIME type
SimpleSAML_Logger::warning('Unable to determine mime content type of file: '.$path);
SimpleSAML\Logger::warning('Unable to determine mime content type of file: '.$path);
$contentType = 'application/octet-stream';
}
}
......
......@@ -10,7 +10,7 @@
require_once('../../_include.php');
SimpleSAML_Logger::info('SAML2.0 - IdP.SSOService: Accessing SAML 2.0 IdP endpoint SSOService');
SimpleSAML\Logger::info('SAML2.0 - IdP.SSOService: Accessing SAML 2.0 IdP endpoint SSOService');
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
......
......@@ -10,7 +10,7 @@
require_once('../../_include.php');
SimpleSAML_Logger::info('SAML2.0 - IdP.SingleLogoutService: Accessing SAML 2.0 IdP endpoint SingleLogoutService');
SimpleSAML\Logger::info('SAML2.0 - IdP.SingleLogoutService: Accessing SAML 2.0 IdP endpoint SingleLogoutService');
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
......
......@@ -5,7 +5,7 @@ $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = SimpleSAML_IdP::getById('saml2:'.$idpEntityId);
SimpleSAML_Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout');
SimpleSAML\Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout');
if (!isset($_GET['RelayState'])) {
throw new SimpleSAML_Error_Error('NORELAYSTATE');
......
......@@ -10,7 +10,7 @@
require_once('../../_include.php');
SimpleSAML_Logger::info('Shib1.3 - IdP.SSOService: Accessing Shibboleth 1.3 IdP endpoint SSOService');
SimpleSAML\Logger::info('Shib1.3 - IdP.SSOService: Accessing Shibboleth 1.3 IdP endpoint SSOService');
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted');
......
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