jenkins-bot has submitted this change and it was merged. Change subject: XHGui: Use $_SERVER['SCRIPT_NAME'] as the URI ......................................................................
XHGui: Use $_SERVER['SCRIPT_NAME'] as the URI It's useful to aggregate requests by script name rather than pretty URLs, so that /wiki/Foo and /wiki/Bar are placed together. Change-Id: Ia1ca9aec900425f1a7e950adf78c52ed0de69795 --- M wmf-config/StartProfiler.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php index 746ad26..d14c313 100644 --- a/wmf-config/StartProfiler.php +++ b/wmf-config/StartProfiler.php @@ -158,8 +158,8 @@ // Strip everything from the query string except 'action=' param: preg_match( '/action=[^&]+/', $_SERVER['REQUEST_URI'], $matches ); - $repl = $matches ? '?' . $matches[0] : ''; - $url = preg_replace( '/\?.*/', $repl, $_SERVER['REQUEST_URI'] ); + $qs = $matches ? '?' . $matches[0] : ''; + $url = $_SERVER['SCRIPT_NAME'] . $qs; // Re-insert scrubbed URL as REQUEST_URL: $server['REQUEST_URI'] = $url; -- To view, visit https://gerrit.wikimedia.org/r/274024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia1ca9aec900425f1a7e950adf78c52ed0de69795 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits