mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
use zrl to get home again
This commit is contained in:
parent
cd47ba6ed1
commit
bb8beb26b4
7 changed files with 54 additions and 17 deletions
18
boot.php
18
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue