r47713 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47712‎ | r47713 | r47714 >
Date:17:46, 23 February 2009
Author:dale
Status:deferred
Tags:
Comment:
added support for ?debug on webpage request to invoke debug on the script loader.
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -341,7 +341,7 @@
342342 * enables linkback and autocomplete for search
343343 */
344344 function mvfAutoAllPageHeader() {
345 - global $mvgScriptPath, $wgJsMimeType, $wgOut, $mvExtraHeader, $wgTitle, $mvgJSDebug, $wgEnableScriptLoader;
 345+ global $mvgScriptPath, $wgJsMimeType, $wgOut, $mvExtraHeader, $wgTitle, $mvgJSDebug, $wgEnableScriptLoader, $wgRequest;;
346346 $mvgScriptPath = htmlspecialchars( $mvgScriptPath );
347347 $wgJsMimeType = htmlspecialchars( $wgJsMimeType ) ;
348348 //set the unquie request value
@@ -354,7 +354,10 @@
355355
356356 /* (moved to on_dom ready) but here as well*/
357357 if( $wgEnableScriptLoader ){
358 - $debug_param = ($mvgJSDebug) ? '&debug=true' : '';
 358+ $debug_param = ( $mvgJSDebug ||
 359+ $wgRequest->getVal('debug')=='true' ||
 360+ $wgRequest->getVal('debug')=='1' )
 361+ ? '&debug=true' : '';
359362 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/mvwScriptLoader.php?" .
360363 "class=window.jQuery,j.fn.autocomplete,j.fn.hoverIntent,mv_embed,mv_allpages,mv_search" .
361364 '&urid=' .$unique_req_param . $debug_param . "\"></script>"

Status & tagging log