summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2010-07-09 06:54:25 +0000
committerOlav Morken <olav.morken@uninett.no>2010-07-09 06:54:25 +0000
commit6f6ae34629637d7e4042e4282b44eb3ba8238aa2 (patch)
tree9298a890e40ca89129fcb4c5747b2cc5fe4a11d6 /lib/SimpleSAML
parent725b94dcd19b0a09a4ba848a4791890774d63a3d (diff)
downloadsimplesamlphp-6f6ae34629637d7e4042e4282b44eb3ba8238aa2.zip
simplesamlphp-6f6ae34629637d7e4042e4282b44eb3ba8238aa2.tar.gz
simplesamlphp-6f6ae34629637d7e4042e4282b44eb3ba8238aa2.tar.bz2
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
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r--lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php3
-rw-r--r--lib/SimpleSAML/Module.php3
-rw-r--r--lib/SimpleSAML/Utilities.php5
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
index 64f4624..51a4aa3 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerFlatFile.php
@@ -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';
diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php
index f626bbd..3ae590d 100644
--- a/lib/SimpleSAML/Module.php
+++ b/lib/SimpleSAML/Module.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);
}
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index 98a2a10..64ba72d 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -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();
}