summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 8e0ea56b6..bcfca0fc0 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -273,7 +273,8 @@ function common_local_url($action, $args=NULL) {
$extra .= "&${key}=${value}";
}
}
- return "http://".$config['site']['server'].'/'.$config['site']['path']."/index.php?action=${action}${extra}";
+ $pathpart = ($config['site']['path']) ? $config['site']['path']."/" : '';
+ return "http://".$config['site']['server'].'/'.$pathpart."index.php?action=${action}${extra}";
}
function commmon_date_string($dt) {