VisualEditor.hooks: Sort keys

Change-Id: I68f9258f739532ca30d2fdc91e62d6a2f87a5180
This commit is contained in:
Timo Tijhof 2013-07-31 02:31:12 +02:00 committed by Krinkle
parent 221cef36a1
commit 7ca95e3d32

View file

@ -125,12 +125,12 @@ class VisualEditorHooks {
global $wgStylePath, $wgContLang;
$vars['wgVisualEditor'] = array(
'isPageWatched' => $out->getUser()->isWatched( $out->getTitle() ),
'pageLanguageCode' => $out->getTitle()->getPageLanguage()->getHtmlCode(),
'pageLanguageDir' => $out->getTitle()->getPageLanguage()->getDir(),
// Same as in Linker.php
'magnifyClipIconURL' => $wgStylePath .
'/common/images/magnify-clip' .
( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png'
( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png',
'pageLanguageCode' => $out->getTitle()->getPageLanguage()->getHtmlCode(),
'pageLanguageDir' => $out->getTitle()->getPageLanguage()->getDir(),
);
return true;
@ -140,18 +140,21 @@ class VisualEditorHooks {
* Adds extra variables to the global config
*/
public static function onResourceLoaderGetConfigVars( array &$vars ) {
global $wgVisualEditorEnableEventLogging, $wgVisualEditorPluginModules,
$wgVisualEditorEnableExperimentalCode, $wgVisualEditorTabLayout,
$wgVisualEditorDisableForAnons, $wgVisualEditorNamespaces;
global $wgVisualEditorDisableForAnons,
$wgVisualEditorEnableEventLogging,
$wgVisualEditorEnableExperimentalCode,
$wgVisualEditorNamespaces,
$wgVisualEditorPluginModules,
$wgVisualEditorTabLayout;
$vars['wgVisualEditorConfig'] = array(
'enableExperimentalCode' => $wgVisualEditorEnableExperimentalCode,
'enableEventLogging' => $wgVisualEditorEnableEventLogging,
'tabLayout' => $wgVisualEditorTabLayout,
'disableForAnons' => $wgVisualEditorDisableForAnons,
'enableEventLogging' => $wgVisualEditorEnableEventLogging,
'enableExperimentalCode' => $wgVisualEditorEnableExperimentalCode,
'namespaces' => $wgVisualEditorNamespaces,
'skins' => self::$supportedSkins,
'pluginModules' => $wgVisualEditorPluginModules,
'skins' => self::$supportedSkins,
'tabLayout' => $wgVisualEditorTabLayout,
);
return true;