Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.status.php |
— | — | @@ -126,6 +126,10 @@ |
127 | 127 | * @return int |
128 | 128 | */ |
129 | 129 | public static function deleteOld() { |
| 130 | + global $wgOnlineStatusBarAutoDelete; |
| 131 | + if ( !$wgOnlineStatusBarAutoDelete ) { |
| 132 | + return 0; |
| 133 | + } |
130 | 134 | $dbw = wfGetDB( DB_MASTER ); |
131 | 135 | // calculate time and convert it back to mediawiki format |
132 | 136 | $time = OnlineStatusBar::getTimeoutDate(); |
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php |
— | — | @@ -84,6 +84,8 @@ |
85 | 85 | |
86 | 86 | // default for anonymous and uknown users |
87 | 87 | $wgOnlineStatusBarTrackIpUsers = false; |
| 88 | +// it's better to cron this for performance reasons |
| 89 | +$wgOnlineStatusBarAutoDelete = true; |
88 | 90 | // delay between db updates |
89 | 91 | $wgOnlineStatusBar_WriteTime = 300; |
90 | 92 | // default for online |