mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
pass zrl's to/through global directory
This commit is contained in:
parent
7c63ca8364
commit
0d869ceb65
2 changed files with 5 additions and 3 deletions
6
boot.php
6
boot.php
|
@ -1494,11 +1494,13 @@ function get_my_url() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function zrl($s) {
|
function zrl($s,$force = false) {
|
||||||
if(! strlen($s))
|
if(! strlen($s))
|
||||||
return $s;
|
return $s;
|
||||||
if(! strpos($s,'/profile/'))
|
if((! strpos($s,'/profile/')) && (! $force))
|
||||||
return $s;
|
return $s;
|
||||||
|
if($force && substr($s,-1,1) !== '/')
|
||||||
|
$s = $s . '/';
|
||||||
$achar = strpos($s,'?') ? '&' : '?';
|
$achar = strpos($s,'?') ? '&' : '?';
|
||||||
$mine = get_my_url();
|
$mine = get_my_url();
|
||||||
if($mine and ! link_compare($mine,$s))
|
if($mine and ! link_compare($mine,$s))
|
||||||
|
|
|
@ -44,7 +44,7 @@ function directory_content(&$a) {
|
||||||
$gdirpath = dirname(get_config('system','directory_submit_url'));
|
$gdirpath = dirname(get_config('system','directory_submit_url'));
|
||||||
if(strlen($gdirpath)) {
|
if(strlen($gdirpath)) {
|
||||||
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
|
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
|
||||||
. $gdirpath . '">' . t('Global Directory') . '</a></div></li></ul>';
|
. zrl($gdirpath,true) . '">' . t('Global Directory') . '</a></div></li></ul>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$admin = '';
|
$admin = '';
|
||||||
|
|
Loading…
Reference in a new issue