r110423 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110422‎ | r110423 | r110424 >
Date:20:19, 31 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Remove trailing whitespace

Fix documentation

Remove unused global
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/WikiEditor/WikiEditor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.php
@@ -17,26 +17,26 @@
1818
1919 // Each module may be configured individually to be globally on/off or user preference based
2020 $wgWikiEditorFeatures = array(
21 -
 21+
2222 /* Textarea / i-frame compatible (OK to deploy) */
23 -
 23+
2424 'toolbar' => array( 'global' => false, 'user' => true ),
2525 // Provides interactive tools
2626 'dialogs' => array( 'global' => false, 'user' => true ),
2727 // Hide signature button from main namespace
2828 'hidesig' => array( 'global' => true, 'user' => false ),
29 -
 29+
3030 /* Textarea / i-frame compatible, but still experimental and unstable (do not deploy!) */
31 -
 31+
3232 // Adds a tab for previewing in-line
3333 'preview' => array( 'global' => false, 'user' => true ),
3434 // Adds a button for previewing in a dialog
3535 'previewDialog' => array( 'global' => false, 'user' => false ),
3636 // Adds a button and dialog for step-by-step publishing
3737 'publish' => array( 'global' => false, 'user' => true ),
38 -
 38+
3939 /* I-frame dependent (do not deploy!) */
40 -
 40+
4141 // Failry stable table of contents
4242 'toc' => array( 'global' => false, 'user' => true ),
4343 // Pretty broken template collapsing/editing
@@ -71,13 +71,13 @@
7272
7373 $wgResourceModules += array(
7474 /* Third-party modules */
75 -
 75+
7676 'contentCollector' => $wikiEditorTpl + array(
7777 'scripts' => 'contentCollector.js',
7878 ),
79 -
 79+
8080 /* WikiEditor jQuery plugin Resources */
81 -
 81+
8282 'jquery.wikiEditor' => $wikiEditorTpl + array(
8383 'scripts' => 'jquery.wikiEditor.js',
8484 'styles' => 'jquery.wikiEditor.css',
@@ -392,9 +392,9 @@
393393 'wikieditor-toolbar-help-content-indent-result',
394394 ),
395395 ),
396 -
 396+
397397 /* WikiEditor Resources */
398 -
 398+
399399 'ext.wikiEditor' => $wikiEditorTpl + array(
400400 'scripts' => 'ext.wikiEditor.js',
401401 'styles' => 'ext.wikiEditor.css',
Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php
@@ -167,7 +167,8 @@
168168 * This method is public to allow other extensions that use WikiEditor to use the
169169 * same configuration as WikiEditor itself
170170 *
171 - * @param $name Name of the feature, should be a key of $features
 171+ * @param $name string Name of the feature, should be a key of $features
 172+ * @return bool
172173 */
173174 public static function isEnabled( $name ) {
174175 global $wgWikiEditorFeatures, $wgUser;
@@ -198,6 +199,7 @@
199200 * Adds the modules to the edit form
200201 *
201202 * @param $toolbar array list of toolbar items
 203+ * @return bool
202204 */
203205 public static function editPageShowEditFormInitial( &$toolbar ) {
204206 global $wgOut;
@@ -218,6 +220,7 @@
219221 *
220222 * @param $user User current user
221223 * @param $defaultPreferences array list of default user preference controls
 224+ * @return bool
222225 */
223226 public static function getPreferences( $user, &$defaultPreferences ) {
224227 global $wgWikiEditorFeatures;
@@ -239,6 +242,8 @@
240243 * MakeGlobalVariablesScript hook
241244 *
242245 * Adds enabled/disabled switches for WikiEditor modules
 246+ * @param $vars array
 247+ * @return bool
243248 */
244249 public static function resourceLoaderGetConfigVars( &$vars ) {
245250 global $wgWikiEditorFeatures;
@@ -261,9 +266,11 @@
262267 return true;
263268 }
264269
 270+ /**
 271+ * @param $vars array
 272+ * @return bool
 273+ */
265274 public static function makeGlobalVariablesScript( &$vars ) {
266 - global $wgWikiEditorFeatures;
267 -
268275 // Build and export old-style wgWikiEditorEnabledModules object for back compat
269276 $enabledModules = array();
270277 foreach ( self::$features as $name => $feature ) {

Status & tagging log