Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.status.php |
— | — | @@ -140,11 +140,12 @@ |
141 | 141 | } |
142 | 142 | // If we track them, let's insert it to the table |
143 | 143 | $dbw = wfGetDB( DB_MASTER ); |
| 144 | + $timestamp = $dbw->timestamp(); |
144 | 145 | $row = array( |
145 | 146 | 'username' => $wgUser->getName(), |
146 | | - 'timestamp' => $dbw->timestamp(), |
| 147 | + 'timestamp' => $timestamp, |
147 | 148 | ); |
148 | | - self::setCache( $wgUser->getName(), '', ONLINESTATUSBAR_NORMAL_CACHE ); |
| 149 | + self::setCache( $wgUser->getName(), $timestamp, ONLINESTATUSBAR_NORMAL_CACHE ); |
149 | 150 | $dbw->insert( 'online_status', $row, __METHOD__ ); |
150 | 151 | return false; |
151 | 152 | } |
— | — | @@ -181,13 +182,14 @@ |
182 | 183 | |
183 | 184 | if ( $user_status == 'write' ) { |
184 | 185 | $dbw = wfGetDB( DB_MASTER ); |
| 186 | + $timestamp = $dbw->timestamp(); |
185 | 187 | $dbw->update( |
186 | 188 | 'online_status', |
187 | | - array( 'timestamp' => $dbw->timestamp() ), |
| 189 | + array( 'timestamp' => $timestamp ), |
188 | 190 | array( 'username' => $wgUser->getName() ), |
189 | 191 | __METHOD__ |
190 | 192 | ); |
191 | | - self::setCache( $wgUser->getName(), '', ONLINESTATUSBAR_NORMAL_CACHE ); |
| 193 | + self::setCache( $wgUser->getName(), $timestamp, ONLINESTATUSBAR_NORMAL_CACHE ); |
192 | 194 | self::deleteOld(); |
193 | 195 | } |
194 | 196 | return true; |