From: Niklas Laxström Date: Sun, 9 Aug 2009 16:20:14 +0000 (+0000) Subject: Support script loader X-Git-Tag: 1.31.0-rc.0~40400 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=aa58f44af40508c94e700d888d6d23d3a587be15;p=lhc%2Fweb%2Fwiklou.git Support script loader --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 0f7e6c7bb4..c03eeb314b 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -599,6 +599,7 @@ $wgJSAutoloadLocalClasses = array( 'edit' => 'skins/common/edit.js', 'enhancedchanges.js' => 'skins/common/enhancedchanges.js', 'history' => 'skins/common/history.js', + 'htmlform' => 'skins/common/htmlform.js', 'IEFixes' => 'skins/common/IEFixes.js', 'metadata' => 'skins/common/metadata.js', 'mwsuggest' => 'skins/common/mwsuggest.js', diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 30f85bee01..59429c9077 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -73,9 +73,9 @@ class HTMLForm { static function addJS() { if( self::$jsAdded ) return; - global $wgOut, $wgStylePath; + global $wgOut; - $wgOut->addScriptFile( "$wgStylePath/common/htmlform.js" ); + $wgOut->addScriptClass( 'htmlform' ); } static function loadInputFromParameters( $descriptor ) {