Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -354,7 +354,8 @@ |
355 | 355 | if( $this->lastRow ) { |
356 | 356 | $latest = ($this->counter == 1 && $this->mIsFirst); |
357 | 357 | $firstInList = $this->counter == 1; |
358 | | - $s = $this->historyLine( $this->lastRow, $row, $this->counter++, |
| 358 | + $this->counter++; |
| 359 | + $s = $this->historyLine( $this->lastRow, $row, |
359 | 360 | $this->title->getNotificationTimestamp(), $latest, $firstInList ); |
360 | 361 | } else { |
361 | 362 | $s = ''; |
— | — | @@ -441,7 +442,8 @@ |
442 | 443 | # The next row is the past-the-end row |
443 | 444 | $next = $this->mPastTheEndRow; |
444 | 445 | } |
445 | | - $s = $this->historyLine( $this->lastRow, $next, $this->counter++, |
| 446 | + $this->counter++; |
| 447 | + $s = $this->historyLine( $this->lastRow, $next, |
446 | 448 | $this->title->getNotificationTimestamp(), $latest, $firstInList ); |
447 | 449 | } else { |
448 | 450 | $s = ''; |
— | — | @@ -478,13 +480,12 @@ |
479 | 481 | * |
480 | 482 | * @param $row Object: the database row corresponding to the previous line. |
481 | 483 | * @param $next Mixed: the database row corresponding to the next line. |
482 | | - * @param $counter Integer: apparently a counter of what row number we're at, counted from the top row = 1. |
483 | 484 | * @param $notificationtimestamp |
484 | 485 | * @param $latest Boolean: whether this row corresponds to the page's latest revision. |
485 | 486 | * @param $firstInList Boolean: whether this row corresponds to the first displayed on this history page. |
486 | 487 | * @return String: HTML output for the row |
487 | 488 | */ |
488 | | - function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, |
| 489 | + function historyLine( $row, $next, $notificationtimestamp = false, |
489 | 490 | $latest = false, $firstInList = false ) |
490 | 491 | { |
491 | 492 | global $wgUser, $wgLang; |
— | — | @@ -492,8 +493,8 @@ |
493 | 494 | $rev->setTitle( $this->title ); |
494 | 495 | |
495 | 496 | $curlink = $this->curLink( $rev, $latest ); |
496 | | - $lastlink = $this->lastLink( $rev, $next, $counter ); |
497 | | - $diffButtons = $this->diffButtons( $rev, $firstInList, $counter ); |
| 497 | + $lastlink = $this->lastLink( $rev, $next ); |
| 498 | + $diffButtons = $this->diffButtons( $rev, $firstInList ); |
498 | 499 | $histLinks = Html::rawElement( |
499 | 500 | 'span', |
500 | 501 | array( 'class' => 'mw-history-histlinks' ), |
— | — | @@ -659,10 +660,9 @@ |
660 | 661 | * |
661 | 662 | * @param $prevRev Revision: the previous revision |
662 | 663 | * @param $next Mixed: the newer revision |
663 | | - * @param $counter Integer: what row on the history list this is |
664 | 664 | * @return String |
665 | 665 | */ |
666 | | - function lastLink( $prevRev, $next, $counter ) { |
| 666 | + function lastLink( $prevRev, $next ) { |
667 | 667 | $last = $this->historyPage->message['last']; |
668 | 668 | # $next may either be a Row, null, or "unkown" |
669 | 669 | $nextRev = is_object($next) ? new Revision( $next ) : $next; |
— | — | @@ -704,10 +704,10 @@ |
705 | 705 | * |
706 | 706 | * @param $rev Revision object |
707 | 707 | * @param $firstInList Boolean: is this version the first one? |
708 | | - * @param $counter Integer: a counter of what row number we're at, counted from the top row = 1. |
| 708 | + * |
709 | 709 | * @return String: HTML output for the radio buttons |
710 | 710 | */ |
711 | | - function diffButtons( $rev, $firstInList, $counter ) { |
| 711 | + function diffButtons( $rev, $firstInList ) { |
712 | 712 | if( $this->getNumRows() > 1 ) { |
713 | 713 | $id = $rev->getId(); |
714 | 714 | $radio = array( 'type' => 'radio', 'value' => $id ); |