mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Remove trailing whitespace
Fix documentation Remove unused global
This commit is contained in:
parent
9178c135fe
commit
8262e1db9a
Notes:
Sam Reed
2012-01-31 20:19:22 +00:00
|
@ -167,7 +167,8 @@ class WikiEditorHooks {
|
|||
* This method is public to allow other extensions that use WikiEditor to use the
|
||||
* same configuration as WikiEditor itself
|
||||
*
|
||||
* @param $name Name of the feature, should be a key of $features
|
||||
* @param $name string Name of the feature, should be a key of $features
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled( $name ) {
|
||||
global $wgWikiEditorFeatures, $wgUser;
|
||||
|
@ -198,6 +199,7 @@ class WikiEditorHooks {
|
|||
* Adds the modules to the edit form
|
||||
*
|
||||
* @param $toolbar array list of toolbar items
|
||||
* @return bool
|
||||
*/
|
||||
public static function editPageShowEditFormInitial( &$toolbar ) {
|
||||
global $wgOut;
|
||||
|
@ -218,6 +220,7 @@ class WikiEditorHooks {
|
|||
*
|
||||
* @param $user User current user
|
||||
* @param $defaultPreferences array list of default user preference controls
|
||||
* @return bool
|
||||
*/
|
||||
public static function getPreferences( $user, &$defaultPreferences ) {
|
||||
global $wgWikiEditorFeatures;
|
||||
|
@ -239,6 +242,8 @@ class WikiEditorHooks {
|
|||
* MakeGlobalVariablesScript hook
|
||||
*
|
||||
* Adds enabled/disabled switches for WikiEditor modules
|
||||
* @param $vars array
|
||||
* @return bool
|
||||
*/
|
||||
public static function resourceLoaderGetConfigVars( &$vars ) {
|
||||
global $wgWikiEditorFeatures;
|
||||
|
@ -261,9 +266,11 @@ class WikiEditorHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $vars array
|
||||
* @return bool
|
||||
*/
|
||||
public static function makeGlobalVariablesScript( &$vars ) {
|
||||
global $wgWikiEditorFeatures;
|
||||
|
||||
// Build and export old-style wgWikiEditorEnabledModules object for back compat
|
||||
$enabledModules = array();
|
||||
foreach ( self::$features as $name => $feature ) {
|
||||
|
|
|
@ -17,26 +17,26 @@
|
|||
|
||||
// Each module may be configured individually to be globally on/off or user preference based
|
||||
$wgWikiEditorFeatures = array(
|
||||
|
||||
|
||||
/* Textarea / i-frame compatible (OK to deploy) */
|
||||
|
||||
|
||||
'toolbar' => array( 'global' => false, 'user' => true ),
|
||||
// Provides interactive tools
|
||||
'dialogs' => array( 'global' => false, 'user' => true ),
|
||||
// Hide signature button from main namespace
|
||||
'hidesig' => array( 'global' => true, 'user' => false ),
|
||||
|
||||
|
||||
/* Textarea / i-frame compatible, but still experimental and unstable (do not deploy!) */
|
||||
|
||||
|
||||
// Adds a tab for previewing in-line
|
||||
'preview' => array( 'global' => false, 'user' => true ),
|
||||
// Adds a button for previewing in a dialog
|
||||
'previewDialog' => array( 'global' => false, 'user' => false ),
|
||||
// Adds a button and dialog for step-by-step publishing
|
||||
'publish' => array( 'global' => false, 'user' => true ),
|
||||
|
||||
|
||||
/* I-frame dependent (do not deploy!) */
|
||||
|
||||
|
||||
// Failry stable table of contents
|
||||
'toc' => array( 'global' => false, 'user' => true ),
|
||||
// Pretty broken template collapsing/editing
|
||||
|
@ -71,13 +71,13 @@ $wikiEditorTpl = array(
|
|||
|
||||
$wgResourceModules += array(
|
||||
/* Third-party modules */
|
||||
|
||||
|
||||
'contentCollector' => $wikiEditorTpl + array(
|
||||
'scripts' => 'contentCollector.js',
|
||||
),
|
||||
|
||||
|
||||
/* WikiEditor jQuery plugin Resources */
|
||||
|
||||
|
||||
'jquery.wikiEditor' => $wikiEditorTpl + array(
|
||||
'scripts' => 'jquery.wikiEditor.js',
|
||||
'styles' => 'jquery.wikiEditor.css',
|
||||
|
@ -392,9 +392,9 @@ $wgResourceModules += array(
|
|||
'wikieditor-toolbar-help-content-indent-result',
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
/* WikiEditor Resources */
|
||||
|
||||
|
||||
'ext.wikiEditor' => $wikiEditorTpl + array(
|
||||
'scripts' => 'ext.wikiEditor.js',
|
||||
'styles' => 'ext.wikiEditor.css',
|
||||
|
|
Loading…
Reference in a new issue