r34839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34838‎ | r34839 | r34840 >
Date:23:25, 14 May 2008
Author:aaron
Status:old
Tags:
Comment:
Offset il_from
Modified paths:
  • /trunk/phase3/includes/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialWhatlinkshere.php
@@ -99,7 +99,7 @@
100100 $hidetrans = $this->opts->getValue( 'hidetrans' );
101101 $hideimages = $target->getNamespace() != NS_IMAGE || $this->opts->getValue( 'hideimages' );
102102
103 - $fetchlinks = !$hidelinks || !$hideredirs;
 103+ $fetchlinks = (!$hidelinks || !$hideredirs);
104104
105105 // Make the query
106106 $plConds = array(
@@ -125,7 +125,7 @@
126126 );
127127
128128 $namespace = $this->opts->getValue( 'namespace' );
129 - if ( is_int($namespace) ){
 129+ if ( is_int($namespace) ) {
130130 $plConds['page_namespace'] = $namespace;
131131 $tlConds['page_namespace'] = $namespace;
132132 }
@@ -133,12 +133,13 @@
134134 if ( $from ) {
135135 $tlConds[] = "tl_from >= $from";
136136 $plConds[] = "pl_from >= $from";
 137+ $ilConds[] = "il_from >= $from";
137138 }
138139
139140 // Read an extra row as an at-end check
140141 $queryLimit = $limit + 1;
141142
142 - // enforce join order, sometimes namespace selector may
 143+ // Enforce join order, sometimes namespace selector may
143144 // trigger filesorts which are far less efficient than scanning many entries
144145 $options[] = 'STRAIGHT_JOIN';
145146
@@ -163,7 +164,7 @@
164165 $ilConds, __METHOD__, $options );
165166 }
166167
167 - if( ( !$fetchlinks || !$dbr->numRows( $plRes ) ) && ( $hidetrans || !$dbr->numRows( $tlRes ) ) && ( $hideimages || !$dbr->numRows( $ilRes ) ) ) {
 168+ if( ( !$fetchlinks || !$dbr->numRows($plRes) ) && ( $hidetrans || !$dbr->numRows($tlRes) ) && ( $hideimages || !$dbr->numRows($ilRes) ) ) {
168169 if ( 0 == $level ) {
169170 $wgOut->addHTML( $this->whatlinkshereForm() );
170171 $errMsg = is_int($namespace) ? 'nolinkshere-ns' : 'nolinkshere';

Status & tagging log