From d69f479cba7382259ac63772fc1637254d9424e2 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Sat, 26 Oct 2019 16:10:44 +0100 Subject: [PATCH] [CORE] Allow to force non-fancy URLs Essential to allow toggling fancy urls later. In some cases it is critical to keep the URL an unique URI. --- lib/util/util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/util.php b/lib/util/util.php index bf3b4e8001..53c339279f 100644 --- a/lib/util/util.php +++ b/lib/util/util.php @@ -1383,7 +1383,7 @@ function common_relative_profile($sender, $nickname, $dt=null) return null; } -function common_local_url($action, $args=null, $params=null, $fragment=null, $addSession=true) +function common_local_url($action, $args=null, $params=null, $fragment=null, $addSession=true, $defancy = false) { if (Event::handle('StartLocalURL', [&$action, &$params, &$fragment, &$addSession, &$url])) { $r = Router::get(); @@ -1391,7 +1391,7 @@ function common_local_url($action, $args=null, $params=null, $fragment=null, $ad $ssl = GNUsocial::useHTTPS(); - if (common_config('site', 'fancy')) { + if (common_config('site', 'fancy') && !$defancy) { $url = common_path($path, $ssl, $addSession); } else { if (mb_strpos($path, '/index.php') === 0) {