Index: trunk/phase3/includes/SpecialWhatlinkshere.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | $hidetrans = $this->opts->getValue( 'hidetrans' ); |
101 | 101 | $hideimages = $target->getNamespace() != NS_IMAGE || $this->opts->getValue( 'hideimages' ); |
102 | 102 | |
103 | | - $fetchlinks = !$hidelinks || !$hideredirs; |
| 103 | + $fetchlinks = (!$hidelinks || !$hideredirs); |
104 | 104 | |
105 | 105 | // Make the query |
106 | 106 | $plConds = array( |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | ); |
127 | 127 | |
128 | 128 | $namespace = $this->opts->getValue( 'namespace' ); |
129 | | - if ( is_int($namespace) ){ |
| 129 | + if ( is_int($namespace) ) { |
130 | 130 | $plConds['page_namespace'] = $namespace; |
131 | 131 | $tlConds['page_namespace'] = $namespace; |
132 | 132 | } |
— | — | @@ -133,12 +133,13 @@ |
134 | 134 | if ( $from ) { |
135 | 135 | $tlConds[] = "tl_from >= $from"; |
136 | 136 | $plConds[] = "pl_from >= $from"; |
| 137 | + $ilConds[] = "il_from >= $from"; |
137 | 138 | } |
138 | 139 | |
139 | 140 | // Read an extra row as an at-end check |
140 | 141 | $queryLimit = $limit + 1; |
141 | 142 | |
142 | | - // enforce join order, sometimes namespace selector may |
| 143 | + // Enforce join order, sometimes namespace selector may |
143 | 144 | // trigger filesorts which are far less efficient than scanning many entries |
144 | 145 | $options[] = 'STRAIGHT_JOIN'; |
145 | 146 | |
— | — | @@ -163,7 +164,7 @@ |
164 | 165 | $ilConds, __METHOD__, $options ); |
165 | 166 | } |
166 | 167 | |
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) ) ) { |
168 | 169 | if ( 0 == $level ) { |
169 | 170 | $wgOut->addHTML( $this->whatlinkshereForm() ); |
170 | 171 | $errMsg = is_int($namespace) ? 'nolinkshere-ns' : 'nolinkshere'; |