r49941 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49940‎ | r49941 | r49942 >
Date:11:17, 27 April 2009
Author:nikerabbit
Status:reverted (Comments)
Tags:
Comment:
Fix for r49939: hide navigation links in higher level
Modified paths:
  • /trunk/phase3/includes/Pager.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Pager.php
@@ -517,6 +517,8 @@
518518 function getNavigationBar() {
519519 global $wgLang;
520520
 521+ if ( $this->mIsFirst && $this->mIsLast ) return '';
 522+
521523 if( isset( $this->mNavigationBar ) ) {
522524 return $this->mNavigationBar;
523525 }
@@ -598,6 +600,8 @@
599601 function getNavigationBar() {
600602 global $wgLang;
601603
 604+ if ( $this->mIsFirst && $this->mIsLast ) return '';
 605+
602606 if ( isset( $this->mNavigationBar ) ) {
603607 return $this->mNavigationBar;
604608 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r50013Workaround for undefined varible access related to r49941 -- $this->mIsFirst ...brion19:30, 28 April 2009
r51450Revert r49941 and r50013: hackish attempted use of mIsFirst before initialisa...tstarling06:17, 4 June 2009
r52189Reimplement r49941 as an overridable method, as suggested by Tim (hiding navi...nikerabbit06:41, 20 June 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49939* (bug 17614) Prev / Next links not need on ImagePage file history if less th...nikerabbit10:21, 27 April 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   19:31, 28 April 2009

I found this spits out a big fun E_NOTICE error for the access of $this->mIsFirst at least for the AbuseFilter log.

I've worked around that in r50013, but this might be a problem elsewhere in which case things need to be smarter about when they run queries, or do some lazy loading.

#Comment by Tim Starling (talk | contribs)   06:14, 4 June 2009

I saw one of these from Special:RevisionDelete. Adding a variable declaration would cover up the notice, but then you'd have a subtle logic error instead. I'm going to revert, there's no sense adding special-case hacks everywhere for the sake of this minor feature.

Status & tagging log