r87448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87447‎ | r87448 | r87449 >
Date:20:28, 4 May 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Partially revert r87353, which per CR messed up GNSM
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php
@@ -276,20 +276,20 @@
277277 $conditions['page_namespace'] = $params['namespace'];
278278 }
279279
280 - $joins = array();
281 - wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions));
 280+ wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions, &$tables));
282281
283282 switch ( $params['redirects'] ) {
284283 case self::OPT_ONLY:
285284 $conditions['page_is_redirect'] = 1;
286 - break;
 285+ break;
287286 case self::OPT_EXCLUDE:
288287 $conditions['page_is_redirect'] = 0;
289 - break;
 288+ break;
290289 }
291290
292291 if ( $params['hourCount'] > 0
293 - && $params['orderMethod'] !== 'lastedit' ) {
 292+ && $params['orderMethod'] !== 'lastedit' )
 293+ {
294294 // Limit to last X number of hours added to category,
295295 // if hourcont is positive and we're sorting by
296296 // category add date.
@@ -341,6 +341,7 @@
342342 $options['ORDER BY'] = 'c1.cl_timestamp ' . $sortOrder;
343343 }
344344
 345+
345346 // earlier validation logic ensures this is a reasonable number
346347 $options['LIMIT'] = $params['count'];
347348
@@ -353,7 +354,7 @@
354355 * variables that make up the request.
355356 **/
356357 public function getParams() {
357 - global $wgRequest, $wgGNSMmaxCategories,
 358+ global $wgContLang, $wgRequest, $wgGNSMmaxCategories,
358359 $wgGNSMmaxResultCount, $wgGNSMfallbackCategory;
359360
360361 $params = array();
@@ -367,7 +368,8 @@
368369 $params['hourCount'] = $wgRequest->getInt( 'hourcount', -1 );
369370
370371 if ( ( $params['count'] > $wgGNSMmaxResultCount )
371 - || ( $params['count'] < 1 ) ) {
 372+ || ( $params['count'] < 1 ) )
 373+ {
372374 $params['count'] = $wgGNSMmaxResultCount;
373375 }
374376

Past revisions this follows-up on

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

Status & tagging log