r44470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44469‎ | r44470 | r44471 >
Date:21:34, 11 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Fix log list regression and fix funky $allLogs case while at it
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -582,7 +582,7 @@
583583 $curId = $currentRevision = 0;
584584 # Some catalyst variables...
585585 $namehidden = true;
586 - $alllogs = true;
 586+ $allLogs = true;
587587 foreach( $block as $rcObj ) {
588588 $oldid = $rcObj->mAttribs['rc_last_oldid'];
589589 if( $rcObj->mAttribs['rc_new'] ) {
@@ -601,7 +601,7 @@
602602 $unpatrolled = true;
603603 }
604604 if( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
605 - $alllogs = false;
 605+ $allLogs = false;
606606 }
607607 # Get the latest entry with a page_id and oldid
608608 # since logs may not have these.
@@ -652,6 +652,8 @@
653653 # Article link
654654 if( $namehidden ) {
655655 $r .= ' <span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>';
 656+ } else if( $allLogs ) {
 657+ $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
656658 } else {
657659 $this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
658660 }
@@ -667,7 +669,7 @@
668670 }
669671 # Total change link
670672 $r .= ' ';
671 - if( !$alllogs ) {
 673+ if( !$allLogs ) {
672674 $r .= '(';
673675 if( !ChangesList::userCan($rcObj,Revision::DELETED_TEXT) ) {
674676 $r .= $nchanges[$n];
@@ -680,7 +682,7 @@
681683 }
682684
683685 # History
684 - if( $alllogs ) {
 686+ if( $allLogs ) {
685687 // don't show history link for logs
686688 } else if( $namehidden || !$block[0]->getTitle()->exists() ) {
687689 $r .= $this->message['semicolon-separator'] . $this->message['hist'] . ')';
@@ -691,7 +693,7 @@
692694 $r .= ' . . ';
693695
694696 # Character difference (does not apply if only log items)
695 - if( $wgRCShowChangedSize && !$alllogs ) {
 697+ if( $wgRCShowChangedSize && !$allLogs ) {
696698 $last = 0;
697699 $first = count($block) - 1;
698700 # Some events (like logs) have an "empty" size, so we need to skip those...

Status & tagging log