Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | $wgHooks['GetPreferences'][] = 'wfOnlineStatusBar_PreferencesHook'; |
114 | 114 | function wfOnlineStatusBar_PreferencesHook( $user, &$preferences ) { |
115 | 115 | global $wgOnlineStatusBarDefaultOnline, $wgOnlineStatusBarDefaultEnabled, $wgOnlineStatusBarModes; |
116 | | - $preferences['OnlineStatusBar_active'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-used', 'section' => 'misc/onlinestatus' ); |
| 116 | + $preferences['OnlineStatusBar_active'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-used', 'section' => 'misc/onlinestatus', 'default' => $wgOnlineStatusBarDefaultEnabled ); |
117 | 117 | $preferences['OnlineStatusBar_status'] = array( 'type' => 'radio', 'label-message' => 'onlinestatusbar-status', 'section' => 'misc/onlinestatus', |
118 | 118 | 'options' => array( |
119 | 119 | $wgOnlineStatusBarModes['online'] => 'online', |
— | — | @@ -122,11 +122,5 @@ |
123 | 123 | ), |
124 | 124 | 'default' => 'online', |
125 | 125 | ); |
126 | | - if ( $wgOnlineStatusBarDefaultEnabled == true ) { |
127 | | - if ($user->getOption ( "OnlineStatusBar_active" ) == null) { |
128 | | - $user->setOption ( "OnlineStatusBar_active", true ); |
129 | | - $user->setOption ( "OnlineStatusBar_status", $wgOnlineStatusBarDefaultOnline ); |
130 | | - } |
131 | | - } |
132 | 126 | return true; |
133 | 127 | } |