return $rc;
}
- /* static */ function newFromCurRow( $row )
+ /* static */ function newFromCurRow( $row, $rc_this_oldid = 0 )
{
$rc = new RecentChange;
- $rc->loadFromCurRow( $row );
+ $rc->loadFromCurRow( $row, $rc_this_oldid );
$rc->notificationtimestamp = false;
$rc->numberofWatchingusers = false;
return $rc;
# been purged, it just locks up the indexes needlessly.
global $wgRCMaxAge;
$age = time() - wfTimestamp( TS_UNIX, $lastTime );
-# if( $age < $wgRCMaxAge ) {
-# # Update rc_this_oldid for the entries which were current
-# $dbw->update( 'recentchanges',
-# array( /* SET */
-# 'rc_this_oldid' => $oldid
-# ), array( /* WHERE */
-# 'rc_namespace' => $ns,
-# 'rc_title' => $title,
-# 'rc_timestamp' => $dbw->timestamp( $lastTime )
-# ), $fname
-# );
-# }
+ if( $age < $wgRCMaxAge ) {
+ # live hack, will commit once tested - kate
+ # Update rc_this_oldid for the entries which were current
+ #$dbw->update( 'recentchanges',
+ # array( /* SET */
+ # 'rc_this_oldid' => $oldid
+ # ), array( /* WHERE */
+ # 'rc_namespace' => $ns,
+ # 'rc_title' => $title,
+ # 'rc_timestamp' => $dbw->timestamp( $lastTime )
+ # ), $fname
+ #);
+ }
# Update rc_cur_time
$dbw->update( 'recentchanges', array( 'rc_cur_time' => $now ),
'rc_minor' => $row->rev_minor_edit ? 1 : 0,
'rc_type' => $row->page_is_new ? RC_NEW : RC_EDIT,
'rc_cur_id' => $row->page_id,
- 'rc_this_oldid' => (int)$row->rev_id,
- 'rc_last_oldid' => 0,
+ 'rc_this_oldid' => $row->rev_id,
+ 'rc_last_oldid' => isset($row->rc_last_oldid) ? $row->rc_last_oldid : 0,
'rc_bot' => 0,
'rc_moved_to_ns' => 0,
'rc_moved_to_title' => '',