handle empty path better

darcs-hash:20080517161548-84dde-8b011466dcf6a0e95e5e0b9c6a5ddcf4cd4bd145.gz
This commit is contained in:
Evan Prodromou 2008-05-17 12:15:48 -04:00
parent e705ef4eda
commit 62d0284595
1 changed files with 2 additions and 1 deletions

View File

@ -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) {