Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | /* |
4 | 4 | * WikiArticleFeeds.php - A MediaWiki extension for converting regular pages into feeds. |
5 | 5 | * @author Jim R. Wilson |
6 | | - * @version 0.6.5 |
| 6 | + * @version 0.6.6 |
7 | 7 | * @copyright Copyright (C) 2007 Jim R. Wilson |
8 | 8 | * @license The MIT License - http://www.opensource.org/licenses/mit-license.php |
9 | 9 | * ----------------------------------------------------------------------- |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * This is a MediaWiki (http://www.mediawiki.org/) extension which adds support |
12 | 12 | * for publishing RSS or Atom feeds generated from standard wiki articles. |
13 | 13 | * Requirements: |
14 | | - * MediaWiki 1.6.x or higher |
| 14 | + * MediaWiki 1.12.x or higher |
15 | 15 | * PHP 4.x, 5.x or higher |
16 | 16 | * Installation: |
17 | 17 | * 1. Drop this script (WikiArticleFeeds.php) in $IP/extensions |
— | — | @@ -35,6 +35,8 @@ |
36 | 36 | * {{#itemTags:dogs, cats}} |
37 | 37 | * {{#itemTags:dogs|cats}} |
38 | 38 | * Version Notes: |
| 39 | + * version 0.6.6: |
| 40 | + * Updated version requirement to MediaWiki 1.12 and up. |
39 | 41 | * version 0.6.5: |
40 | 42 | * Simplified many regular expression to get it working on MW 1.16 |
41 | 43 | * version 0.6.4: |
— | — | @@ -99,7 +101,7 @@ |
100 | 102 | # Confirm MW environment |
101 | 103 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
102 | 104 | |
103 | | -define( 'WIKIARTICLEFEEDS_VERSION', '0.6.4' ); |
| 105 | +define( 'WIKIARTICLEFEEDS_VERSION', '0.6.6' ); |
104 | 106 | |
105 | 107 | # Bring in supporting classes |
106 | 108 | require_once( "$IP/includes/Feed.php" ); |
— | — | @@ -116,7 +118,6 @@ |
117 | 119 | ); |
118 | 120 | |
119 | 121 | $dir = dirname( __FILE__ ) . '/'; |
120 | | - |
121 | 122 | $wgExtensionMessagesFiles['WikiArticleFeeds'] = $dir . 'WikiArticleFeeds.i18n.php'; |
122 | 123 | |
123 | 124 | /** |
— | — | @@ -165,30 +166,11 @@ |
166 | 167 | # Create global instance |
167 | 168 | $wgWikiArticleFeedsParser = new WikiArticleFeedsParser(); |
168 | 169 | // FIXME: update after 1.16 branching for new style magic words. This extension has not been branched yet. |
169 | | -if ( version_compare( $wgVersion, '1.7', '<' ) ) { |
170 | | - # Hack solution to resolve 1.6 array parameter nullification for hook args |
171 | | - function wfWAFParserItemTagsMagic( &$magicWords ) { |
172 | | - global $wgWikiArticleFeedsParser; |
173 | | - $wgWikiArticleFeedsParser->itemTagsMagic( $magicWords ); |
174 | | - return true; |
175 | | - } |
176 | | - function wfWAFParserPlaceholderCorrections( $parser, &$text ) { |
177 | | - global $wgWikiArticleFeedsParser; |
178 | | - $wgWikiArticleFeedsParser->itemTagsPlaceholderCorrections( $parser, $text ); |
179 | | - return true; |
180 | | - } |
181 | | - $wgHooks['LanguageGetMagic'][] = 'wfWAFParserItemTagsMagic'; |
182 | | - $wgHooks['ParserBeforeTidy'][] = 'wfWAFParserPlaceholderCorrections'; |
183 | | -} else { |
184 | | - $wgHooks['LanguageGetMagic'][] = array( $wgWikiArticleFeedsParser, 'itemTagsMagic' ); |
185 | | - $wgHooks['ParserBeforeTidy'][] = array( $wgWikiArticleFeedsParser, 'itemTagsPlaceholderCorrections' ); |
186 | | -} |
| 170 | +$wgHooks['LanguageGetMagic'][] = array( $wgWikiArticleFeedsParser, 'itemTagsMagic' ); |
| 171 | +$wgHooks['ParserBeforeTidy'][] = array( $wgWikiArticleFeedsParser, 'itemTagsPlaceholderCorrections' ); |
187 | 172 | |
188 | 173 | # Add Extension Functions |
189 | | -if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) |
190 | | - $wgHooks['ParserFirstCallInit'][] = 'wfWikiArticleFeedsParserSetup'; |
191 | | -else |
192 | | - $wgExtensionFunctions[] = 'wfWikiArticleFeedsParserSetup'; |
| 174 | +$wgHooks['ParserFirstCallInit'][] = 'wfWikiArticleFeedsParserSetup'; |
193 | 175 | |
194 | 176 | # Sets up the WikiArticleFeeds Parser hooks |
195 | 177 | function wfWikiArticleFeedsParserSetup() { |