r104729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104728‎ | r104729 | r104730 >
Date:19:46, 30 November 2011
Author:petrb
Status:deferred
Tags:
Comment:
updated options so that now it must be matching criteria for valid input
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php
@@ -112,7 +112,7 @@
113113 * @return bool
114114 */
115115 public static function preferencesHook( User $user, array &$preferences ) {
116 - global $wgOnlineStatusBarDefaultOnline, $wgOnlineStatusBarDefaultEnabled, $wgOnlineStatusBar_AwayTime, $wgOnlineStatusBarModes;
 116+ global $wgOnlineStatusBarDefaultOnline, $wgOnlineStatusBarDefaultEnabled, $wgOnlineStatusBar_AwayTime, $wgOnlineStatusBar_LogoutTime, $wgOnlineStatusBarModes;
117117 $preferences['OnlineStatusBar_active'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-used', 'section' => 'misc/onlinestatus' );
118118 $preferences['OnlineStatusBar_hide'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-hide', 'section' => 'misc/onlinestatus' );
119119 $preferences['OnlineStatusBar_away'] = array( 'type' => 'toggle', 'label-message' => 'onlinestatusbar-away', 'section' => 'misc/onlinestatus' );
@@ -125,7 +125,7 @@
126126 wfMessage( 'onlinestatusbar-status-hidden' )->escaped() => 'hidden'
127127 ),
128128 );
129 - $preferences['OnlineStatusBar_awaytime'] = array( 'type' => 'text', 'label-message' => 'onlinestatusbar-away-time', 'section' => 'misc/onlinestatus' );
 129+ $preferences['OnlineStatusBar_awaytime'] = array( 'min' => 2, 'max' => $wgOnlineStatusBar_LogoutTime, 'type' => 'int', 'label-message' => 'onlinestatusbar-away-time', 'section' => 'misc/onlinestatus' );
130130 return true;
131131 }
132132

Status & tagging log