aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-29 20:58:32 -0700
committerfriendica <info@friendica.com>2012-03-29 20:58:32 -0700
commitbb8beb26b4d87c27ce4c8dce3e1229a27a2d1a7e (patch)
tree48ca85a83dc21214ec056dd21798e04bacfc7936 /boot.php
parentcd47ba6ed1236b14c5da832b686eea0be926f65a (diff)
downloadvolse-hubzilla-bb8beb26b4d87c27ce4c8dce3e1229a27a2d1a7e.tar.gz
volse-hubzilla-bb8beb26b4d87c27ce4c8dce3e1229a27a2d1a7e.tar.bz2
volse-hubzilla-bb8beb26b4d87c27ce4c8dce3e1229a27a2d1a7e.zip
use zrl to get home again
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 4a4adbbc8..1f2b69077 100755
--- a/boot.php
+++ b/boot.php
@@ -1415,3 +1415,21 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
}}
+
+function get_my_url() {
+ if(x($_SESSION,'my_url'))
+ return $_SESSION['my_url'];
+ return false;
+}
+
+function zrl($s) {
+ if(! strlen($s))
+ return $s;
+ if(! strpos($s,'/profile/'))
+ return $s;
+ $achar = strpos($s,'?') ? '&' : '?';
+ $mine = get_my_url();
+ if($mine and ! link_compare($mine,$s))
+ return $s . $achar . 'zrl=' . urlencode($mine);
+ return $s;
+} \ No newline at end of file