r103141 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103140‎ | r103141 | r103142 >
Date:10:20, 15 November 2011
Author:petrb
Status:deferred
Tags:
Comment:
because it's better to have it scheduled for performance reasons I inserted a variable which can turn off deletes
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.status.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.status.php
@@ -126,6 +126,10 @@
127127 * @return int
128128 */
129129 public static function deleteOld() {
 130+ global $wgOnlineStatusBarAutoDelete;
 131+ if ( !$wgOnlineStatusBarAutoDelete ) {
 132+ return 0;
 133+ }
130134 $dbw = wfGetDB( DB_MASTER );
131135 // calculate time and convert it back to mediawiki format
132136 $time = OnlineStatusBar::getTimeoutDate();
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php
@@ -84,6 +84,8 @@
8585
8686 // default for anonymous and uknown users
8787 $wgOnlineStatusBarTrackIpUsers = false;
 88+// it's better to cron this for performance reasons
 89+$wgOnlineStatusBarAutoDelete = true;
8890 // delay between db updates
8991 $wgOnlineStatusBar_WriteTime = 300;
9092 // default for online

Status & tagging log