$userlinks = array () ;
foreach ( $block AS $rcObj ) {
$oldid = $rcObj->mAttribs['rc_last_oldid'];
+ $newid = $rcObj->mAttribs['rc_this_oldid'];
if ( $rcObj->mAttribs['rc_new'] ) {
$isnew = true ;
}
$r .= ' ('.count($block).' ' ;
if ( $isnew ) $r .= wfMsg('changes');
else $r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle() , wfMsg('changes') ,
- $curIdEq.'&diff=0&oldid='.$oldid ) ;
+ $curIdEq."&diff=$oldid&oldid=$newid" ) ;
$r .= '; ' ;
# History
$curLink = $message['cur'];
$diffLink = $message['diff'];
} else {
- $query = $curIdEq.'&diff=0&oldid='.$rc_this_oldid;
+ # $query = $curIdEq.'&diff=0&oldid='.$rc_this_oldid;
+ $query = $curIdEq."&diff=$rc_this_oldid&oldid=$rc_last_oldid";
$aprops = ' tabindex="'.$baseRC->counter.'"';
$curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['cur'], $query, '' ,'' , $aprops );
$diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $message['diff'], $query . $rcIdQuery, '' ,'' , $aprops );
# 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 ),
}
# Makes a pseudo-RC entry from a cur row, for watchlists and things
- function loadFromCurRow( $row, $rc_last_oldid = 0 )
+ function loadFromCurRow( $row )
{
$this->mAttribs = array(
'rc_timestamp' => $row->rev_timestamp,
'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' => (int)$rc_last_oldid,
+ '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' => '',