Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php |
— | — | @@ -276,20 +276,20 @@ |
277 | 277 | $conditions['page_namespace'] = $params['namespace']; |
278 | 278 | } |
279 | 279 | |
280 | | - $joins = array(); |
281 | | - wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions)); |
| 280 | + wfRunHooks('GoogleNewsSitemap::Query', array($params, &$joins, &$conditions, &$tables)); |
282 | 281 | |
283 | 282 | switch ( $params['redirects'] ) { |
284 | 283 | case self::OPT_ONLY: |
285 | 284 | $conditions['page_is_redirect'] = 1; |
286 | | - break; |
| 285 | + break; |
287 | 286 | case self::OPT_EXCLUDE: |
288 | 287 | $conditions['page_is_redirect'] = 0; |
289 | | - break; |
| 288 | + break; |
290 | 289 | } |
291 | 290 | |
292 | 291 | if ( $params['hourCount'] > 0 |
293 | | - && $params['orderMethod'] !== 'lastedit' ) { |
| 292 | + && $params['orderMethod'] !== 'lastedit' ) |
| 293 | + { |
294 | 294 | // Limit to last X number of hours added to category, |
295 | 295 | // if hourcont is positive and we're sorting by |
296 | 296 | // category add date. |
— | — | @@ -341,6 +341,7 @@ |
342 | 342 | $options['ORDER BY'] = 'c1.cl_timestamp ' . $sortOrder; |
343 | 343 | } |
344 | 344 | |
| 345 | + |
345 | 346 | // earlier validation logic ensures this is a reasonable number |
346 | 347 | $options['LIMIT'] = $params['count']; |
347 | 348 | |
— | — | @@ -353,7 +354,7 @@ |
354 | 355 | * variables that make up the request. |
355 | 356 | **/ |
356 | 357 | public function getParams() { |
357 | | - global $wgRequest, $wgGNSMmaxCategories, |
| 358 | + global $wgContLang, $wgRequest, $wgGNSMmaxCategories, |
358 | 359 | $wgGNSMmaxResultCount, $wgGNSMfallbackCategory; |
359 | 360 | |
360 | 361 | $params = array(); |
— | — | @@ -367,7 +368,8 @@ |
368 | 369 | $params['hourCount'] = $wgRequest->getInt( 'hourcount', -1 ); |
369 | 370 | |
370 | 371 | if ( ( $params['count'] > $wgGNSMmaxResultCount ) |
371 | | - || ( $params['count'] < 1 ) ) { |
| 372 | + || ( $params['count'] < 1 ) ) |
| 373 | + { |
372 | 374 | $params['count'] = $wgGNSMmaxResultCount; |
373 | 375 | } |
374 | 376 | |