diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-05-17 12:15:48 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-05-17 12:15:48 -0400 |
commit | 62d028459574c3aa2dc58fe71adf4e6ddfb8fa2a (patch) | |
tree | 077d9634b68bb70f2cc300b69a5496137d0e1d08 /lib/common.php | |
parent | e705ef4eda51d0d62bb8554ef22973a88aba09a2 (diff) |
handle empty path better
darcs-hash:20080517161548-84dde-8b011466dcf6a0e95e5e0b9c6a5ddcf4cd4bd145.gz
Diffstat (limited to 'lib/common.php')
-rw-r--r-- | lib/common.php | 3 |
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) { |