diff options
-rw-r--r-- | lib/util.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index e2c9c67a1..4e318a770 100644 --- a/lib/util.php +++ b/lib/util.php @@ -685,9 +685,11 @@ function common_fancy_url($action, $args=NULL) { case 'userbyid': return common_path('user/'.$args['id']); case 'recoverpassword': - return common_path('main/recoverpassword' . - ($args['code']) ? ('/' . $args['code']) : - ''); + $path = 'main/recoverpassword'; + if ($args['code']) { + $path .= '/' . $args['code']; + } + return common_path($path); default: return common_simple_url($action, $args); } |