mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
VisualEditor.hooks: Sort keys
Change-Id: I68f9258f739532ca30d2fdc91e62d6a2f87a5180
This commit is contained in:
parent
221cef36a1
commit
7ca95e3d32
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue