Index: trunk/extensions/FeaturedFeeds/ApiFeaturedFeeds.php |
— | — | @@ -28,10 +28,10 @@ |
29 | 29 | $this->dieUsage( 'Invalid language code', 'language-invalid' ); |
30 | 30 | } |
31 | 31 | $feeds = FeaturedFeeds::getFeeds( $language ); |
32 | | - $ourFeed = $feeds[$params['channel']]; |
| 32 | + $ourFeed = $feeds[$params['feed']]; |
33 | 33 | |
34 | 34 | $feedClass = new $wgFeedClasses[$params['feedformat']] ( |
35 | | - $ourFeed['name'], |
| 35 | + $ourFeed['title'], |
36 | 36 | $ourFeed['description'], |
37 | 37 | FeaturedFeeds::getFeedURL( $ourFeed, $params['feedformat'] ) |
38 | 38 | ); |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | ApiBase::PARAM_DFLT => 'rss', |
51 | 51 | ApiBase::PARAM_TYPE => $feedFormatNames |
52 | 52 | ), |
53 | | - 'channel' => array( |
| 53 | + 'feed' => array( |
54 | 54 | ApiBase::PARAM_TYPE => $availableFeeds, |
55 | 55 | ApiBase::PARAM_REQUIRED => true, |
56 | 56 | ), |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | public function getParamDescription() { |
64 | 64 | return array( |
65 | 65 | 'feedformat' => 'The format of the feed', |
66 | | - 'channel' => 'Feed channel', |
| 66 | + 'feed' => 'Feed name', |
67 | 67 | 'language' => 'Feed language code. Ignored by some feeds.' |
68 | 68 | ); |
69 | 69 | } |
— | — | @@ -80,22 +80,22 @@ |
81 | 81 | |
82 | 82 | public function getExamples() { |
83 | 83 | global $wgVersion; |
84 | | - // attempt to find a valid channel name |
| 84 | + // attempt to find a valid feed name |
85 | 85 | // if none available, just use an example value |
86 | 86 | $availableFeeds = array_keys( FeaturedFeeds::getFeeds( false ) ); |
87 | | - $channel = reset( $availableFeeds ); |
88 | | - if ( !$channel ) { |
89 | | - $channel = 'featured'; |
| 87 | + $feed = reset( $availableFeeds ); |
| 88 | + if ( !$feed ) { |
| 89 | + $feed = 'featured'; |
90 | 90 | } |
91 | 91 | |
92 | 92 | if ( version_compare( $wgVersion, '1.19alpha', '>=' ) ) { |
93 | 93 | return array( |
94 | | - "api.php?action=featuredfeed&channel=$channel" => "Retrieve feed for channel `$channel'", |
| 94 | + "api.php?action=featuredfeed&feed=$feed" => "Retrieve feed `$feed'", |
95 | 95 | ); |
96 | 96 | } else { |
97 | 97 | return array( |
98 | | - "Retrieve feed for channel `$channel'", |
99 | | - " api.php?action=featuredfeed&channel=$channel", |
| 98 | + "Retrieve feed `$feed'", |
| 99 | + " api.php?action=featuredfeed&feed=$feed", |
100 | 100 | ); |
101 | 101 | } |
102 | 102 | } |
Index: trunk/extensions/FeaturedFeeds/FeaturedFeedsWMF.php |
— | — | @@ -15,13 +15,13 @@ |
16 | 16 | $media = array( |
17 | 17 | 'potd' => array( // Picture Of The Day |
18 | 18 | 'page' => 'ffeed-potd-page', |
19 | | - 'feedName' => 'ffeed-potd-title', |
| 19 | + 'title' => 'ffeed-potd-title', |
20 | 20 | 'description' => 'ffeed-potd-desc', |
21 | 21 | 'entryName' => 'ffeed-potd-entry', |
22 | 22 | ), |
23 | 23 | 'motd' => array( // Media Of The Day |
24 | 24 | 'page' => 'ffeed-motd-page', |
25 | | - 'feedName' => 'ffeed-motd-title', |
| 25 | + 'title' => 'ffeed-motd-title', |
26 | 26 | 'description' => 'ffeed-motd-desc', |
27 | 27 | 'entryName' => 'ffeed-motd-entry', |
28 | 28 | ), |
— | — | @@ -31,13 +31,13 @@ |
32 | 32 | $feeds += array( |
33 | 33 | 'featured' => array( |
34 | 34 | 'page' => 'ffeed-fa-page', |
35 | | - 'feedName' => 'ffeed-fa-title', |
| 35 | + 'title' => 'ffeed-fa-title', |
36 | 36 | 'description' => 'ffeed-fa-desc', |
37 | 37 | 'entryName' => 'ffeed-fa-entry', |
38 | 38 | ), |
39 | 39 | 'onthisday' => array( |
40 | 40 | 'page' => 'ffeed-onthisday-page', |
41 | | - 'feedName' => 'ffeed-onthisday-title', |
| 41 | + 'title' => 'ffeed-onthisday-title', |
42 | 42 | 'description' => 'ffeed-onthisday-desc', |
43 | 43 | 'entryName' => 'ffeed-onthisday-entry', |
44 | 44 | ), |
Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | $out->addLink( array( |
48 | 48 | 'rel' => 'alternate', |
49 | 49 | 'type' => "application/$type+xml", |
50 | | - 'title' => $feed['name'], |
| 50 | + 'title' => $feed['title'], |
51 | 51 | 'href' => self::getFeedURL( $feed, $type ), |
52 | 52 | ) ); |
53 | 53 | } |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | $requestedLang = Language::factory( $langCode ); |
78 | 78 | $parser = new Parser(); |
79 | 79 | foreach ( $feedDefs as $name => $opts ) { |
80 | | - $feed = array( 'channel' => $name ); |
| 80 | + $feed = array( 'name' => $name ); |
81 | 81 | |
82 | 82 | $pageMsg = wfMessage( $opts['page'] )->inContentLanguage(); |
83 | 83 | if ( $pageMsg->isDisabled() ) { |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | $feed['inUserLanguage'] = $opts['inUserLanguage']; |
89 | 89 | $lang = $opts['inUserLanguage'] ? $requestedLang : $wgContLang; |
90 | 90 | $feed['language'] = $lang->getCode(); |
91 | | - $feed['name'] = wfMessage( $opts['feedName'] )->inLanguage( $lang )->text(); |
| 91 | + $feed['title'] = wfMessage( $opts['title'] )->inLanguage( $lang )->text(); |
92 | 92 | $feed['description'] = wfMessage( $opts['description'] )->inLanguage( $lang )->text(); |
93 | 93 | $entryName = wfMessage( $opts['entryName'] )->inLanguage( $lang )->plain(); |
94 | 94 | $feed['entries'] = array(); |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | |
160 | 160 | $options = array( |
161 | 161 | 'action' => 'featuredfeed', |
162 | | - 'channel' => $feed['channel'], |
| 162 | + 'feed' => $feed['name'], |
163 | 163 | 'feedformat' => $format, |
164 | 164 | ); |
165 | 165 | if ( $feed['inUserLanguage'] && $feed['language'] != $wgContLang->getCode() ) { |