r84608 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84607‎ | r84608 | r84609 >
Date:17:19, 23 March 2011
Author:junaidpv
Status:ok
Tags:
Comment:
Narayam: Fix white space issue in r84597
Modified paths:
  • /trunk/extensions/Narayam/Narayam.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/Narayam.hooks.php
@@ -9,23 +9,23 @@
1010
1111 protected static $disabled = false;
1212
13 - public static function addModules($out, $skin) {
 13+ public static function addModules( $out, $skin ) {
1414 global $wgUser;
15 - if ($wgUser->getOption('narayamDisable')) {
 15+ if ( $wgUser->getOption( 'narayamDisable' ) ) {
1616 // User disabled Narayam
1717 return true;
1818 }
19 - $schemes = array_values(self::getSchemes ());
20 - if (count($schemes)) {
21 - $out->addModules($schemes);
22 - $out->addModules('ext.narayam');
 19+ $schemes = array_values( self::getSchemes () );
 20+ if ( count( $schemes ) ) {
 21+ $out->addModules( $schemes );
 22+ $out->addModules( 'ext.narayam' );
2323 }
2424 return true;
2525 }
2626
27 - public static function addConfig(&$vars) {
 27+ public static function addConfig( &$vars ) {
2828 global $wgNarayamEnabledByDefault, $wgNarayamShortcutKey, $wgUser;
29 - if ($wgUser->getOption('narayamDisable')) {
 29+ if ( $wgUser->getOption( 'narayamDisable' ) ) {
3030 // User disabled Narayam
3131 return true;
3232 }
@@ -35,9 +35,9 @@
3636 return true;
3737 }
3838
39 - public static function addVariables(&$vars) {
 39+ public static function addVariables( &$vars ) {
4040 global $wgUser;
41 - if ($wgUser->getOption('narayamDisable')) {
 41+ if ( $wgUser->getOption( 'narayamDisable' ) ) {
4242 // User disabled Narayam
4343 return true;
4444 }
@@ -52,19 +52,19 @@
5353 protected static function getSchemes() {
5454 global $wgLanguageCode, $wgLang, $wgNarayamSchemes;
5555 $userlangCode = $wgLang->getCode();
56 - $contlangSchemes = isset($wgNarayamSchemes[$wgLanguageCode]) ?
 56+ $contlangSchemes = isset( $wgNarayamSchemes[$wgLanguageCode] ) ?
5757 $wgNarayamSchemes[$wgLanguageCode] : array();
58 - $userlangSchemes = isset($wgNarayamSchemes[$userlangCode]) ?
 58+ $userlangSchemes = isset( $wgNarayamSchemes[$userlangCode] ) ?
5959 $wgNarayamSchemes[$userlangCode] : array();
6060 return $userlangSchemes + $contlangSchemes;
6161 }
6262
63 - public static function addPreference($user, &$preferences) {
 63+ public static function addPreference( $user, &$preferences ) {
6464 // A checkbox in preferences to diable Narayam
6565 $preferences['narayamDisable'] = array(
6666 'type' => 'toggle',
6767 'label-message' => 'narayam-disable-preference', // a system message
68 - 'section' => 'editing/advancedediting', // under 'Advanced options' section of 'Editing' tab
 68+ 'section' => 'editing/advancedediting', // under 'Advanced options' section of 'Editing' tab
6969 );
7070 return true;
7171 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84597Narayam: Add a checkbox under 'Advanced options' section of 'Editing' tab toa...junaidpv15:14, 23 March 2011

Status & tagging log