]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
handle empty path better
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 16:15:48 +0000 (12:15 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 16:15:48 +0000 (12:15 -0400)
darcs-hash:20080517161548-84dde-8b011466dcf6a0e95e5e0b9c6a5ddcf4cd4bd145.gz

lib/common.php

index 8e0ea56b6b8a8716759f1b3c4e5c7fc41c3c392b..bcfca0fc047f5bf0028c0bdb8a9000db539dd881 100644 (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) {