Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php |
— | — | @@ -13,14 +13,14 @@ |
14 | 14 | * Parameters |
15 | 15 | * * categories = string ; default = Published |
16 | 16 | * * notcategories = string ; default = null |
17 | | - * * namespace = string ; default = null |
| 17 | + * * namespace = string ; default = 0 (main) |
18 | 18 | * * count = integer ; default = $wgGNSMmaxResultCount = 50 |
19 | 19 | * * hourcont = integer ; default -1 (disabled), how many hours before cutoff |
20 | 20 | * * order = string ; default = descending |
21 | 21 | * * ordermethod = string ; default = categoryadd |
22 | 22 | * * redirects = string ; default = exclude |
23 | | - * * stablepages = string ; default = null |
24 | | - * * qualitypages = string ; default = null |
| 23 | + * * stablepages = string ; default = only |
| 24 | + * * qualitypages = string ; default = include |
25 | 25 | * * feed = string ; default = sitemap |
26 | 26 | **/ |
27 | 27 | |
— | — | @@ -281,15 +281,14 @@ |
282 | 282 | switch ( $params['redirects'] ) { |
283 | 283 | case self::OPT_ONLY: |
284 | 284 | $conditions['page_is_redirect'] = 1; |
285 | | - break; |
| 285 | + break; |
286 | 286 | case self::OPT_EXCLUDE: |
287 | 287 | $conditions['page_is_redirect'] = 0; |
288 | | - break; |
| 288 | + break; |
289 | 289 | } |
290 | 290 | |
291 | 291 | if ( $params['hourCount'] > 0 |
292 | | - && $params['orderMethod'] !== 'lastedit' ) |
293 | | - { |
| 292 | + && $params['orderMethod'] !== 'lastedit' ) { |
294 | 293 | // Limit to last X number of hours added to category, |
295 | 294 | // if hourcont is positive and we're sorting by |
296 | 295 | // category add date. |
— | — | @@ -341,7 +340,6 @@ |
342 | 341 | $options['ORDER BY'] = 'c1.cl_timestamp ' . $sortOrder; |
343 | 342 | } |
344 | 343 | |
345 | | - |
346 | 344 | // earlier validation logic ensures this is a reasonable number |
347 | 345 | $options['LIMIT'] = $params['count']; |
348 | 346 | |
— | — | @@ -354,7 +352,7 @@ |
355 | 353 | * variables that make up the request. |
356 | 354 | **/ |
357 | 355 | public function getParams() { |
358 | | - global $wgContLang, $wgRequest, $wgGNSMmaxCategories, |
| 356 | + global $wgRequest, $wgGNSMmaxCategories, |
359 | 357 | $wgGNSMmaxResultCount, $wgGNSMfallbackCategory; |
360 | 358 | |
361 | 359 | $params = array(); |
— | — | @@ -368,8 +366,7 @@ |
369 | 367 | $params['hourCount'] = $wgRequest->getInt( 'hourcount', -1 ); |
370 | 368 | |
371 | 369 | if ( ( $params['count'] > $wgGNSMmaxResultCount ) |
372 | | - || ( $params['count'] < 1 ) ) |
373 | | - { |
| 370 | + || ( $params['count'] < 1 ) ) { |
374 | 371 | $params['count'] = $wgGNSMmaxResultCount; |
375 | 372 | } |
376 | 373 | |
— | — | @@ -377,8 +374,8 @@ |
378 | 375 | $params['orderMethod'] = $wgRequest->getVal( 'ordermethod', 'categoryadd' ); |
379 | 376 | |
380 | 377 | $params['redirects'] = $this->getIEOVal( 'redirects', self::OPT_EXCLUDE ); |
381 | | - $params['stable'] = $this->getIEOVal( 'stable', self::OPT_ONLY ); |
382 | | - $params['quality'] = $this->getIEOVal( 'qualitypages', self::OPT_ONLY ); |
| 378 | + $params['stable'] = $this->getIEOVal( 'stablepages', self::OPT_ONLY ); |
| 379 | + $params['quality'] = $this->getIEOVal( 'qualitypages', self::OPT_INCLUDE ); |
383 | 380 | |
384 | 381 | // feed parameter is validated later in the execute method. |
385 | 382 | $params['feed'] = $wgRequest->getVal( 'feed', 'sitemap' ); |
Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php |
— | — | @@ -17,11 +17,10 @@ |
18 | 18 | * - 0.92 http://www.rssboard.org/rss-0-9-2 |
19 | 19 | * Atom feed output - 2005 http://tools.ietf.org/html/rfc4287 |
20 | 20 | ** |
21 | | - * This page can be accessed from Special:GoogleNewsSitemap[/][|category=Catname] |
22 | | - * [|notcategory=OtherCatName][|namespace=0][|notnamespace=User] |
23 | | - * [|feed=sitemap][|count=10][|mode=ul][|ordermethod=lastedit] |
24 | | - * [|order=ascending] as well as being included like |
25 | | - * {{Special:GoogleNewsSitemap/[options][...]}} |
| 21 | + * This page can be accessed from Special:GoogleNewsSitemap?[categories=Catname] |
| 22 | + * [¬categories=OtherCatName][&namespace=0] |
| 23 | + * [&feed=sitemap][&count=10][&ordermethod=lastedit] |
| 24 | + * [&order=ascending] |
26 | 25 | ** |
27 | 26 | * This program is free software; you can redistribute it and/or modify it |
28 | 27 | * under the terms of the GNU General Public License as published by the Free |
— | — | @@ -56,9 +55,10 @@ |
57 | 56 | $wgExtensionCredits['specialpage'][] = array( |
58 | 57 | 'path' => __FILE__, |
59 | 58 | 'name' => 'GoogleNewsSitemap', |
60 | | - 'author' => 'Amgine', |
| 59 | + 'author' => array( 'Amgine', '[http://mediawiki.org/wiki/User:Bawolff Brian Wolff]' ), |
61 | 60 | 'descriptionmsg' => 'googlenewssitemap-desc', |
62 | 61 | 'url' => 'http://www.mediawiki.org/wiki/Extension:GoogleNewsSitemap', |
| 62 | + 'version' => 1, |
63 | 63 | ); |
64 | 64 | |
65 | 65 | $dir = dirname( __FILE__ ) . '/'; |
Index: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap/GoogleNewsSitemap.alias.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * @author Amgine |
14 | 14 | */ |
15 | 15 | $specialPageAliases['en'] = array( |
16 | | - 'GoogleNewsSitemap' => array( 'GoogleNewsSitemap' ), |
| 16 | + 'GoogleNewsSitemap' => array( 'NewsFeed', 'GoogleNewsSitemap' ), |
17 | 17 | ); |
18 | 18 | |
19 | 19 | /** Arabic (العربية) */ |
— | — | @@ -73,4 +73,4 @@ |
74 | 74 | /** |
75 | 75 | * For backwards compatibility with MediaWiki 1.15 and earlier. |
76 | 76 | */ |
77 | | -$aliases =& $specialPageAliases; |
\ No newline at end of file |
| 77 | +$aliases =& $specialPageAliases; |
Property changes on: branches/wmf/1.17wmf1/extensions/GoogleNewsSitemap |
___________________________________________________________________ |
Modified: svn:mergeinfo |
78 | 78 | Merged /trunk/extensions/GoogleNewsSitemap:r87153,87157,87458 |