summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php9
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;
}