From: Alexandre Emsenhuber Date: Thu, 18 Dec 2008 19:45:58 +0000 (+0000) Subject: Moving check for "$rc_type == RC_LOG" before check for special pages since log entrie... X-Git-Tag: 1.31.0-rc.0~43896 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=3a438f8b3932f464d21308b799b36ec0a9aaa23c;p=lhc%2Fweb%2Fwiklou.git 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 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) --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index f8b8d305fb..c1aade60bb 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -438,7 +438,7 @@ class EnhancedChangesList extends ChangesList { $curIdEq = 'curid=' . $rc_cur_id; # If it's a new day, add the headline and flush the cache - $date = $wgLang->date( $rc_timestamp, true); + $date = $wgLang->date( $rc_timestamp, true ); $ret = ''; if( $date != $this->lastdate ) { # Process current cache @@ -462,22 +462,12 @@ class EnhancedChangesList extends ChangesList { $msg = ( $rc_type == RC_MOVE ) ? "1movedto2" : "1movedto2_redir"; $clink = wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ), $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) ); - // Log entries (old format) and special pages - } elseif( $rc_namespace == NS_SPECIAL ) { - list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title ); - if ( $specialName == 'Log' ) { - # Log updates, etc - $logname = LogPage::logName( $logtype ); - $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')'; - } else { - wfDebug( "Unexpected special page in recentchanges\n" ); - $clink = ''; - } // New unpatrolled pages } else if( $rc->unpatrolled && $rc_type == RC_NEW ) { $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" ); // Log entries } else if( $rc_type == RC_LOG ) { + var_dump( $rc_log_type ); if( $rc_log_type ) { $logtitle = SpecialPage::getTitleFor( 'Log', $rc_log_type ); $clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, LogPage::logName($rc_log_type) ) . ')'; @@ -485,6 +475,17 @@ class EnhancedChangesList extends ChangesList { $clink = $this->skin->makeLinkObj( $rc->getTitle(), '' ); } $watched = false; + // Log entries (old format) and special pages + } elseif( $rc_namespace == NS_SPECIAL ) { + list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title ); + if ( $specialName == 'Log' ) { + # Log updates, etc + $logname = LogPage::logName( $logtype ); + $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')'; + } else { + wfDebug( "Unexpected special page in recentchanges\n" ); + $clink = ''; + } // Edits } else { $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '' );