Ori.livneh has uploaded a new change for review.

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


Change subject: Disable debug toolbar unless 'debug' present on request
......................................................................

Disable debug toolbar unless 'debug' present on request

This change set makes the debug toolbar activate only if 'debug' is present on
the request, either as a URL parameter or a cookie. I find that the debug
toolbar, while useful, makes MediaWiki feel perceptibly more sluggish. This
seems like a good compromise.

Change-Id: I5b16cf6ab2bef9bac0c28d915e13d7adb7a26133
---
M LocalSettings.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/73/61173/1

diff --git a/LocalSettings.php b/LocalSettings.php
index 2558480..3623bce 100644
--- a/LocalSettings.php
+++ b/LocalSettings.php
@@ -6,8 +6,13 @@
 
 $wgArticlePath = "/wiki/$1";
 
+// Show the debug toolbar if 'debug' is set on the request, either as a
+// parameter or a cookie.
+if ( !empty( $_REQUEST['debug'] ) ) {
+       $wgDebugToolbar = true;
+}
+
 // Expose debug info for PHP errors.
-$wgDebugToolbar = true;
 $wgShowExceptionDetails = true;
 $wgDebugLogFile = __DIR__ . '/vagrant/logs/mediawiki-debug.log';
 

-- 
To view, visit https://gerrit.wikimedia.org/r/61173
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b16cf6ab2bef9bac0c28d915e13d7adb7a26133
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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