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