diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-03-06 21:11:19 -0800 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-03-06 21:11:19 -0800 |
commit | 597e1988b0dbe0b3eacbeadadad2655b457d2496 (patch) | |
tree | 17616121fdb659856cebb3b28e2aafe75bd00978 /lib/util.php | |
parent | ac7170bf6cbf36699cf182ccb1bd5214f6e8741e (diff) | |
parent | 16a6aa53907de29c6d993fd18e62d45e4380f451 (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index 9637dc506..ca8376f28 100644 --- a/lib/util.php +++ b/lib/util.php @@ -722,12 +722,15 @@ function common_local_url($action, $args=null, $params=null, $fragment=null) { $r = Router::get(); $path = $r->build($action, $args, $params, $fragment); - if ($path) { - } + if (common_config('site','fancy')) { $url = common_path(mb_substr($path, 1)); } else { - $url = common_path('index.php'.$path); + if (mb_strpos($path, '/index.php') === 0) { + $url = common_path(mb_substr($path, 1)); + } else { + $url = common_path('index.php'.$path); + } } return $url; } |