Skip to content
Snippets Groups Projects
Commit 6f6ae346 authored by Olav Morken's avatar Olav Morken
Browse files

Replace uses of utilities::selfURLhost() followed by config->getBaseURL with a...

Replace uses of utilities::selfURLhost() followed by config->getBaseURL with a call to utilities::getBaseURL().

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2389 44740490-163a-0410-bde0-09ae8108e29a
parent 725b94dc
No related branches found
No related tags found
No related merge requests found
......@@ -117,8 +117,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerFlatFile extends SimpleSAML_Meta
private function generateDynamicHostedEntityID($set) {
/* Get the configuration. */
$config = SimpleSAML_Configuration::getInstance();
$baseurl = SimpleSAML_Utilities::selfURLhost() . '/' . $config->getBaseURL();
$baseurl = SimpleSAML_Utilities::getBaseURL();
if ($set === 'saml20-idp-hosted') {
return $baseurl . 'saml2/idp/metadata.php';
......
......@@ -143,8 +143,7 @@ class SimpleSAML_Module {
assert('is_string($resource)');
assert('$resource[0] !== "/"');
$config = SimpleSAML_Configuration::getInstance();
$url = SimpleSAML_Utilities::selfURLhost() . '/' . $config->getBaseURL() . 'module.php/' . $resource;
$url = SimpleSAML_Utilities::getBaseURL() . 'module.php/' . $resource;
if (!empty($parameters)) {
$url = SimpleSAML_Utilities::addURLparameter($url, $parameters);
}
......
......@@ -618,7 +618,7 @@ class SimpleSAML_Utilities {
/* Check if there is a valid technical contact email address. */
if($config->getString('technicalcontact_email', 'na@example.org') !== 'na@example.org') {
/* Enable error reporting. */
$baseurl = SimpleSAML_Utilities::selfURLhost() . '/' . $config->getBaseURL();
$baseurl = SimpleSAML_Utilities::getBaseURL();
$t->data['errorReportAddress'] = $baseurl . 'errorreport.php';
}
......@@ -1229,8 +1229,7 @@ class SimpleSAML_Utilities {
*/
public static function resolveURL($url, $base = NULL) {
if($base === NULL) {
$config = SimpleSAML_Configuration::getInstance();
$base = self::selfURLhost() . '/' . $config->getBaseURL();
$base = SimpleSAML_Utilities::getBaseURL();
}
......
......@@ -89,7 +89,7 @@ if ($idpentityid === NULL) {
} elseif($config->getString('idpdisco.url.saml20', NULL) !== NULL) {
$discourl = $config->getString('idpdisco.url.saml20');
} else {
$discourl = SimpleSAML_Utilities::selfURLhost() . '/' . $config->getBaseURL() . 'saml2/sp/idpdisco.php';
$discourl = SimpleSAML_Utilities::getBaseURL() . 'saml2/sp/idpdisco.php';
}
if ($config->getBoolean('idpdisco.extDiscoveryStorage', NULL) != NULL) {
......
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