r75825 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75824‎ | r75825 | r75826 >
Date:20:35, 1 November 2010
Author:catrope
Status:ok (Comments)
Tags:
Comment:
(bug 25610) Put ResourceLoader in debug mode when resourceLoaderDebug cookie is present and set to something that evaluates to true in PHP. The ?debug= request parameter, if present, overrides this, and both override $wgResourceLoaderDebugMode
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2304,9 +2304,13 @@
23052305 }
23062306 // TODO: Should this be a static function of ResourceLoader instead?
23072307 // TODO: Divide off modules starting with "user", and add the user parameter to them
 2308+ // Determine whether we're in debug mode
 2309+ // Order of priority is 1) request param, 2) cookie, 3) $wg setting
 2310+ $debug = $wgRequest->getFuzzyBool( 'debug',
 2311+ $wgRequest->getCookie( 'resourceLoaderModule', '', $wgResourceLoaderDebug ) );
23082312 $query = array(
23092313 'lang' => $wgLang->getCode(),
2310 - 'debug' => $wgRequest->getFuzzyBool( 'debug', $wgResourceLoaderDebug ) ? 'true' : 'false',
 2314+ 'debug' => $debug ? 'true' : 'false',
23112315 'skin' => $wgUser->getSkin()->getSkinName(),
23122316 'only' => $only,
23132317 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r76138Followup r75825: per bug 25610 comment #3, check for debug mode in all other ...catrope20:36, 5 November 2010

Comments

#Comment by Platonides (talk | contribs)   00:38, 5 December 2010

resourceLoaderModule doesn't look a good name for enabling the debug mode. Fixed in r76138

Is this cookie documented anywhere?

Summons Zak Greant

#Comment by Catrope (talk | contribs)   10:17, 5 December 2010

No it's not documented, would be good to do so :)

Status & tagging log