From aa58f44af40508c94e700d888d6d23d3a587be15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 9 Aug 2009 16:20:14 +0000 Subject: [PATCH] Support script loader --- includes/AutoLoader.php | 1 + includes/HTMLForm.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 ) { -- 2.20.1