diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/actions.php | 2 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 6 | ||||
-rw-r--r-- | engine/lib/entities.php | 9 | ||||
-rw-r--r-- | engine/lib/navigation.php | 2 | ||||
-rw-r--r-- | engine/lib/views.php | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php index fef6004cc..38fdef1ee 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -113,7 +113,7 @@ function action($action, $forwarder = "") { register_error(sprintf(elgg_echo('actionundefined'), $action)); } - forward($CONFIG->url . $forwarder); + forward($forwarder); } /** diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 282b69fce..e45b231d4 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1565,7 +1565,7 @@ function elgg_http_build_url(array $parts, $html_encode = TRUE) { * @link http://docs.elgg.org/Tutorials/Actions */ function elgg_add_action_tokens_to_url($url, $html_encode = TRUE) { - $components = parse_url($url); + $components = parse_url(elgg_normalize_url($url)); if (isset($components['query'])) { $query = elgg_parse_str($components['query']); @@ -1680,11 +1680,11 @@ function elgg_http_url_is_identical($url1, $url2, $ignore_params = array('offset // if the server portion is missing but it starts with / then add the url in. if (elgg_substr($url1, 0, 1) == '/') { - $url1 = $CONFIG->url . ltrim($url1, '/'); + $url1 = elgg_get_site_url() . ltrim($url1, '/'); } if (elgg_substr($url1, 0, 1) == '/') { - $url2 = $CONFIG->url . ltrim($url2, '/'); + $url2 = elgg_get_site_url() . ltrim($url2, '/'); } // @todo - should probably do something with relative URLs diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 1c8db655b..34dc39de5 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2097,10 +2097,10 @@ function get_entity_icon_url(ElggEntity $entity, $size = 'medium') { return $overrideurl; } - $url = $CONFIG->url . "_graphics/icons/default/$size.png"; + $url = "_graphics/icons/default/$size.png"; } - return $url; + return elgg_normalize_url($url); } /** @@ -2137,9 +2137,10 @@ function get_entity_url($entity_guid) { } if ($url == "") { - $url = $CONFIG->url . "pg/view/" . $entity_guid; + $url = "pg/view/" . $entity_guid; } - return $url; + + return elgg_noramlize_url($url); } diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index beb154f30..fcfc553fd 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -196,7 +196,7 @@ function elgg_prepare_submenu($context = 'main', $sort = FALSE) { $item->href = $child->href; } else { // @todo There are no URLs anywhere in this tree. - $item->href = $CONFIG->url; + $item->href = elgg_get_site_url(); } } } diff --git a/engine/lib/views.php b/engine/lib/views.php index d8564c5e3..82be10118 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -279,7 +279,7 @@ function elgg_view($view, $vars = array(), $bypass = false, $debug = false, $vie $vars['config'] = $CONFIG; } - $vars['url'] = $CONFIG->url; + $vars['url'] = elgg_get_site_url(); // Load page owner variables into $vars if (is_callable('page_owner')) { |