aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php6
-rw-r--r--mod/directory.php2
2 files changed, 5 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 5ba3b1b4a..0bd201a25 100644
--- a/boot.php
+++ b/boot.php
@@ -1494,11 +1494,13 @@ function get_my_url() {
return false;
}
-function zrl($s) {
+function zrl($s,$force = false) {
if(! strlen($s))
return $s;
- if(! strpos($s,'/profile/'))
+ if((! strpos($s,'/profile/')) && (! $force))
return $s;
+ if($force && substr($s,-1,1) !== '/')
+ $s = $s . '/';
$achar = strpos($s,'?') ? '&' : '?';
$mine = get_my_url();
if($mine and ! link_compare($mine,$s))
diff --git a/mod/directory.php b/mod/directory.php
index 7f18bd026..367438845 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -44,7 +44,7 @@ function directory_content(&$a) {
$gdirpath = dirname(get_config('system','directory_submit_url'));
if(strlen($gdirpath)) {
$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 = '';