r100868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100867‎ | r100868 | r100869 >
Date:20:48, 26 October 2011
Author:petrb
Status:deferred
Tags:
Comment:
now it overrides default config
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php
@@ -111,7 +111,7 @@
112112
113113 $wgHooks['GetPreferences'][] = 'wfOnlineStatusBar_PreferencesHook';
114114 function wfOnlineStatusBar_PreferencesHook( $user, &$preferences ) {
115 - global $wgOnlineStatusBarModes;
 115+ global $wgOnlineStatusBarDefaultOnline, $wgOnlineStatusBarDefaultEnabled, $wgOnlineStatusBarModes;
116116 $preferences['OnlineStatusBar_active'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-used', 'section' => 'misc/onlinestatus' );
117117 $preferences['OnlineStatusBar_status'] = array( 'type' => 'radio', 'label-message' => 'onlinestatusbar-status', 'section' => 'misc/onlinestatus',
118118 'options' => array(
@@ -122,5 +122,11 @@
123123 ),
124124 'default' => 'online',
125125 );
 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+ }
126132 return true;
127133 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r100873fixedpetrb21:07, 26 October 2011

Status & tagging log