$wgTitle and $wgOut weren't needed here

EditPage::showForm::initial was wrong about its parameters.

Change-Id: I7f2194dee00090a0c4ff35684607384cfc6897a9
This commit is contained in:
Chad Horohoe 2014-02-05 10:30:22 -08:00
parent f399b074ab
commit d9b9580e6f

View file

@ -25,19 +25,16 @@ class CodeEditorHooks {
return $lang;
}
public static function editPageShowEditFormInitial( &$toolbar ) {
global $wgOut, $wgTitle;
$lang = self::getPageLanguage( $wgTitle );
public static function editPageShowEditFormInitial( $editpage, $output ) {
$lang = self::getPageLanguage( $editpage->getContextTitle() );
if ( $lang ) {
$wgOut->addModules( 'ext.codeEditor' );
$output->addModules( 'ext.codeEditor' );
}
return true;
}
public static function onMakeGlobalVariablesScript( &$vars, $output ) {
global $wgTitle;
$lang = self::getPageLanguage( $wgTitle );
$lang = self::getPageLanguage( $output->getTitle() );
if( $lang ) {
$vars['wgCodeEditorCurrentLanguage'] = $lang;
}