r72517 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72516‎ | r72517 | r72518 >
Date:03:43, 7 September 2010
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Typecast and comment tweaks
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php
@@ -223,13 +223,13 @@
224224 $this->mForm = $form;
225225 $this->live = (bool)$live;
226226 # Must be a content page...
227 -
228227 if ( !is_null( $namespace ) ) {
229 - $namespace = intval( $namespace );
 228+ $namespace = (int)$namespace;
230229 }
231230 $vnamespaces = FlaggedRevs::getReviewNamespaces();
 231+ # Must be a single NS for perfomance reasons
232232 if ( is_null( $namespace ) || !in_array( $namespace, $vnamespaces ) ) {
233 - $namespace = !$vnamespaces ? - 1 : $vnamespaces[0];
 233+ $namespace = !$vnamespaces ? -1 : $vnamespaces[0];
234234 }
235235 $this->namespace = $namespace;
236236 $this->category = $category ? str_replace( ' ', '_', $category ) : null;
@@ -270,6 +270,7 @@
271271 $fields[] = 'cl_sortkey';
272272 $conds['cl_to'] = $this->category;
273273 $conds[] = 'cl_from = page_id';
 274+ # Note: single NS always specified
274275 if( $this->namespace == NS_FILE ) {
275276 $conds['cl_type'] = 'file';
276277 } elseif( $this->namespace == NS_CATEGORY ) {

Comments

#Comment by Aaron Schulz (talk | contribs)   05:57, 8 September 2010

<Test comment to error hopefully.>

Status & tagging log