Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/274024

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/24/274024/1

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: newchange
Gerrit-Change-Id: Ia1ca9aec900425f1a7e950adf78c52ed0de69795
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to