aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/url.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:08:42 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-05 16:08:42 +0000
commit36ef345eb6425106f061fb866d9fa66d051e16df (patch)
tree53fb2bd05f8b5e2010f9e3d1e93075ad7071ec1e /views/default/output/url.php
parent5571ca5b350fd1735f13af7ddfbb88afa6befb0c (diff)
downloadelgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.gz
elgg-36ef345eb6425106f061fb866d9fa66d051e16df.tar.bz2
Merged 5530:5604 from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@5622 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output/url.php')
-rw-r--r--views/default/output/url.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/views/default/output/url.php b/views/default/output/url.php
index 7e0281a43..87d3a68a1 100644
--- a/views/default/output/url.php
+++ b/views/default/output/url.php
@@ -20,14 +20,6 @@
$url = trim($vars['href']);
if (!empty($url)) {
- if ((substr_count($url, "http://") == 0) && (substr_count($url, "https://") == 0)) {
- $url = "http://" . $url;
- }
-
- if (array_key_exists('is_action', $vars) && $vars['is_action']) {
- $url = elgg_add_action_tokens_to_url($url);
- }
-
if (array_key_exists('target', $vars) && $vars['target']) {
$target = "target = \"{$vars['target']}\"";
} else {
@@ -52,5 +44,13 @@ if (!empty($url)) {
$text = htmlentities($url, ENT_QUOTES, 'UTF-8');
}
+ if ((substr_count($url, "http://") == 0) && (substr_count($url, "https://") == 0)) {
+ $url = "http://" . $url;
+ }
+
+ if (array_key_exists('is_action', $vars) && $vars['is_action']) {
+ $url = elgg_add_action_tokens_to_url($url);
+ }
+
echo "<a href=\"{$url}\" $target $class $js>$text</a>";
} \ No newline at end of file