r87153 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87152‎ | r87153 | r87154 >
Date:00:17, 30 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix undefined variable used in hook call

Fix whitespace/braces/indenting

Remove another unused global
Modified paths:
  • /trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php
@@ -275,20 +275,20 @@
276276 $conditions['page_namespace'] = $params['namespace'];
277277 }
278278
 279+ $joins = array();
279280 wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions));
280281
281282 switch ( $params['redirects'] ) {
282283 case self::OPT_ONLY:
283284 $conditions['page_is_redirect'] = 1;
284 - break;
 285+ break;
285286 case self::OPT_EXCLUDE:
286287 $conditions['page_is_redirect'] = 0;
287 - break;
 288+ break;
288289 }
289290
290291 if ( $params['hourCount'] > 0
291 - && $params['orderMethod'] !== 'lastedit' )
292 - {
 292+ && $params['orderMethod'] !== 'lastedit' ) {
293293 // Limit to last X number of hours added to category,
294294 // if hourcont is positive and we're sorting by
295295 // category add date.
@@ -341,7 +341,6 @@
342342 $options['ORDER BY'] = 'c1.cl_timestamp ' . $sortOrder;
343343 }
344344
345 -
346345 // earlier validation logic ensures this is a reasonable number
347346 $options['LIMIT'] = $params['count'];
348347
@@ -354,7 +353,7 @@
355354 * variables that make up the request.
356355 **/
357356 public function getParams() {
358 - global $wgContLang, $wgRequest, $wgGNSMmaxCategories,
 357+ global $wgRequest, $wgGNSMmaxCategories,
359358 $wgGNSMmaxResultCount, $wgGNSMfallbackCategory;
360359
361360 $params = array();
@@ -368,8 +367,7 @@
369368 $params['hourCount'] = $wgRequest->getInt( 'hourcount', -1 );
370369
371370 if ( ( $params['count'] > $wgGNSMmaxResultCount )
372 - || ( $params['count'] < 1 ) )
373 - {
 371+ || ( $params['count'] < 1 ) ) {
374372 $params['count'] = $wgGNSMmaxResultCount;
375373 }
376374

Follow-up revisions

RevisionCommit summaryAuthorDate
r873531.17wmf1: MFT r85546, r86409, r86450, r86625, r86788, r86805, r86841, r86904,...catrope20:27, 3 May 2011

Status & tagging log