r44775 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44774‎ | r44775 | r44776 >
Date:19:45, 18 December 2008
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
Moving check for "$rc_type == RC_LOG" before check for special pages since log entries can now have a tagert in NS_SPECIAL, this happens for log item deletion (rev_deleted stuff) and thus breaking recent changes display, (see the current version of http://test.wikipedia.org/wiki/Special:RecentChanges, where the deletion log appears as "block log" since the last entry is hiding an item from the block log)
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -438,7 +438,7 @@
439439 $curIdEq = 'curid=' . $rc_cur_id;
440440
441441 # If it's a new day, add the headline and flush the cache
442 - $date = $wgLang->date( $rc_timestamp, true);
 442+ $date = $wgLang->date( $rc_timestamp, true );
443443 $ret = '';
444444 if( $date != $this->lastdate ) {
445445 # Process current cache
@@ -462,22 +462,12 @@
463463 $msg = ( $rc_type == RC_MOVE ) ? "1movedto2" : "1movedto2_redir";
464464 $clink = wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
465465 $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
466 - // Log entries (old format) and special pages
467 - } elseif( $rc_namespace == NS_SPECIAL ) {
468 - list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
469 - if ( $specialName == 'Log' ) {
470 - # Log updates, etc
471 - $logname = LogPage::logName( $logtype );
472 - $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
473 - } else {
474 - wfDebug( "Unexpected special page in recentchanges\n" );
475 - $clink = '';
476 - }
477466 // New unpatrolled pages
478467 } else if( $rc->unpatrolled && $rc_type == RC_NEW ) {
479468 $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
480469 // Log entries
481470 } else if( $rc_type == RC_LOG ) {
 471+ var_dump( $rc_log_type );
482472 if( $rc_log_type ) {
483473 $logtitle = SpecialPage::getTitleFor( 'Log', $rc_log_type );
484474 $clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, LogPage::logName($rc_log_type) ) . ')';
@@ -485,6 +475,17 @@
486476 $clink = $this->skin->makeLinkObj( $rc->getTitle(), '' );
487477 }
488478 $watched = false;
 479+ // Log entries (old format) and special pages
 480+ } elseif( $rc_namespace == NS_SPECIAL ) {
 481+ list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
 482+ if ( $specialName == 'Log' ) {
 483+ # Log updates, etc
 484+ $logname = LogPage::logName( $logtype );
 485+ $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
 486+ } else {
 487+ wfDebug( "Unexpected special page in recentchanges\n" );
 488+ $clink = '';
 489+ }
489490 // Edits
490491 } else {
491492 $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r44784Fix for r44775: remove debug lineaaron21:30, 18 December 2008

Comments

#Comment by Aaron Schulz (talk | contribs)   20:41, 18 December 2008

var_dump( $rc_log_type ); ?

#Comment by Aaron Schulz (talk | contribs)   21:31, 18 December 2008

Fixed in r44784

Status & tagging log