aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 21:34:52 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 21:34:52 +0000
commit59bbd848d809da169e0d6baadce4890ac375b90b (patch)
tree06db4a13fba5a4d96a3eb68fefe75b0874e02738
parent9dc88628c96d2c959b30a55d19fc39a31b434589 (diff)
downloadelgg-59bbd848d809da169e0d6baadce4890ac375b90b.tar.gz
elgg-59bbd848d809da169e0d6baadce4890ac375b90b.tar.bz2
Refs #2463: Added URL normalization support for entity and extender url handlers
git-svn-id: http://code.elgg.org/elgg/trunk@7203 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/actions.php2
-rw-r--r--engine/lib/entities.php2
-rw-r--r--engine/lib/extender.php5
3 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index 38fdef1ee..bcd7e759e 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -77,7 +77,7 @@ function action($action, $forwarder = "") {
action_gatekeeper();
}
- $forwarder = str_replace($CONFIG->url, "", $forwarder);
+ $forwarder = str_replace(elgg_get_site_url(), "", $forwarder);
$forwarder = str_replace("http://", "", $forwarder);
$forwarder = str_replace("@", "", $forwarder);
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 58afd178c..1fe657808 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -2215,7 +2215,7 @@ function default_entity_icon_hook($hook, $entity_type, $returnvalue, $params) {
}
if (@file_exists($CONFIG->path . $url)) {
- return $CONFIG->url . $url;
+ return elgg_get_site_url().$url;
}
}
}
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 0f7ab24ea..845cfd85f 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -229,9 +229,10 @@ function get_extender_url(ElggExtender $extender) {
if ($type == 'volatile') {
$nameid == $extender->name;
}
- $url = $CONFIG->wwwroot . "export/$view/$guid/$type/$nameid/";
+ $url = "export/$view/$guid/$type/$nameid/";
}
- return $url;
+
+ return elgg_normalize_url($url);
}
/** Register the hook */