Index: trunk/extensions/Narayam/Narayam.hooks.php |
— | — | @@ -9,23 +9,23 @@ |
10 | 10 | |
11 | 11 | protected static $disabled = false; |
12 | 12 | |
13 | | - public static function addModules($out, $skin) { |
| 13 | + public static function addModules( $out, $skin ) { |
14 | 14 | global $wgUser; |
15 | | - if ($wgUser->getOption('narayamDisable')) { |
| 15 | + if ( $wgUser->getOption( 'narayamDisable' ) ) { |
16 | 16 | // User disabled Narayam |
17 | 17 | return true; |
18 | 18 | } |
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' ); |
23 | 23 | } |
24 | 24 | return true; |
25 | 25 | } |
26 | 26 | |
27 | | - public static function addConfig(&$vars) { |
| 27 | + public static function addConfig( &$vars ) { |
28 | 28 | global $wgNarayamEnabledByDefault, $wgNarayamShortcutKey, $wgUser; |
29 | | - if ($wgUser->getOption('narayamDisable')) { |
| 29 | + if ( $wgUser->getOption( 'narayamDisable' ) ) { |
30 | 30 | // User disabled Narayam |
31 | 31 | return true; |
32 | 32 | } |
— | — | @@ -35,9 +35,9 @@ |
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | |
39 | | - public static function addVariables(&$vars) { |
| 39 | + public static function addVariables( &$vars ) { |
40 | 40 | global $wgUser; |
41 | | - if ($wgUser->getOption('narayamDisable')) { |
| 41 | + if ( $wgUser->getOption( 'narayamDisable' ) ) { |
42 | 42 | // User disabled Narayam |
43 | 43 | return true; |
44 | 44 | } |
— | — | @@ -52,19 +52,19 @@ |
53 | 53 | protected static function getSchemes() { |
54 | 54 | global $wgLanguageCode, $wgLang, $wgNarayamSchemes; |
55 | 55 | $userlangCode = $wgLang->getCode(); |
56 | | - $contlangSchemes = isset($wgNarayamSchemes[$wgLanguageCode]) ? |
| 56 | + $contlangSchemes = isset( $wgNarayamSchemes[$wgLanguageCode] ) ? |
57 | 57 | $wgNarayamSchemes[$wgLanguageCode] : array(); |
58 | | - $userlangSchemes = isset($wgNarayamSchemes[$userlangCode]) ? |
| 58 | + $userlangSchemes = isset( $wgNarayamSchemes[$userlangCode] ) ? |
59 | 59 | $wgNarayamSchemes[$userlangCode] : array(); |
60 | 60 | return $userlangSchemes + $contlangSchemes; |
61 | 61 | } |
62 | 62 | |
63 | | - public static function addPreference($user, &$preferences) { |
| 63 | + public static function addPreference( $user, &$preferences ) { |
64 | 64 | // A checkbox in preferences to diable Narayam |
65 | 65 | $preferences['narayamDisable'] = array( |
66 | 66 | 'type' => 'toggle', |
67 | 67 | '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 |
69 | 69 | ); |
70 | 70 | return true; |
71 | 71 | } |