Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php |
— | — | @@ -223,13 +223,13 @@ |
224 | 224 | $this->mForm = $form; |
225 | 225 | $this->live = (bool)$live; |
226 | 226 | # Must be a content page... |
227 | | - |
228 | 227 | if ( !is_null( $namespace ) ) { |
229 | | - $namespace = intval( $namespace ); |
| 228 | + $namespace = (int)$namespace; |
230 | 229 | } |
231 | 230 | $vnamespaces = FlaggedRevs::getReviewNamespaces(); |
| 231 | + # Must be a single NS for perfomance reasons |
232 | 232 | if ( is_null( $namespace ) || !in_array( $namespace, $vnamespaces ) ) { |
233 | | - $namespace = !$vnamespaces ? - 1 : $vnamespaces[0]; |
| 233 | + $namespace = !$vnamespaces ? -1 : $vnamespaces[0]; |
234 | 234 | } |
235 | 235 | $this->namespace = $namespace; |
236 | 236 | $this->category = $category ? str_replace( ' ', '_', $category ) : null; |
— | — | @@ -270,6 +270,7 @@ |
271 | 271 | $fields[] = 'cl_sortkey'; |
272 | 272 | $conds['cl_to'] = $this->category; |
273 | 273 | $conds[] = 'cl_from = page_id'; |
| 274 | + # Note: single NS always specified |
274 | 275 | if( $this->namespace == NS_FILE ) { |
275 | 276 | $conds['cl_type'] = 'file'; |
276 | 277 | } elseif( $this->namespace == NS_CATEGORY ) { |