Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php |
— | — | @@ -2,13 +2,13 @@ |
3 | 3 | |
4 | 4 | class WikiArticleFeeds{ |
5 | 5 | |
6 | | - function feedStart( $text, $params = array() ) { |
7 | | - global $wgParser, $wgWikiArticleFeedsTrackingCategory; |
| 6 | + function feedStart( $text, $params = array(), Parser $parser ) { |
| 7 | + global $wgWikiArticleFeedsTrackingCategory; |
8 | 8 | |
9 | 9 | if ( $wgWikiArticleFeedsTrackingCategory === true ) { |
10 | | - $wgParser->addTrackingCategory( 'wikiarticlefeeds-tracking-category' ); |
| 10 | + $parser->addTrackingCategory( 'wikiarticlefeeds-tracking-category' ); |
11 | 11 | } elseif ( is_string( $wgWikiArticleFeedsTrackingCategory ) ) { |
12 | | - $wgParser->addTrackingCategory( $wgWikiArticleFeedsTrackingCategory ); |
| 12 | + $parser->addTrackingCategory( $wgWikiArticleFeedsTrackingCategory ); |
13 | 13 | } |
14 | 14 | return '<!-- FEED_START -->'; |
15 | 15 | } |
— | — | @@ -25,13 +25,13 @@ |
26 | 26 | return ( $text ? '<!-- ITEM_TAGS ' . base64_encode( serialize( $text ) ) . ' -->':'' ); |
27 | 27 | } |
28 | 28 | |
29 | | - function itemTagsFunction( $parser ) { |
| 29 | + function itemTagsFunction( Parser $parser ) { |
30 | 30 | $tags = func_get_args(); |
31 | 31 | array_shift( $tags ); |
32 | 32 | return ( !empty( $tags ) ? '<pre>@ITEMTAGS@' . base64_encode( serialize( implode( ',', $tags ) ) ) . '@ITEMTAGS@</pre>':'' ); |
33 | 33 | } |
34 | 34 | |
35 | | - function itemTagsPlaceholderCorrections( $parser, &$text ) { |
| 35 | + function itemTagsPlaceholderCorrections( Parser $parser, &$text ) { |
36 | 36 | $text = preg_replace( |
37 | 37 | '|<pre>@ITEMTAGS@([0-9a-zA-Z\\+\\/]+=*)@ITEMTAGS@</pre>|', |
38 | 38 | '<!-- ITEM_TAGS $1 -->', |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | # Sets up the WikiArticleFeeds Parser hooks |
45 | | - static function wfWikiArticleFeedsSetup( $parser ) { |
| 45 | + static function wfWikiArticleFeedsSetup( Parser $parser ) { |
46 | 46 | global $wgWikiArticleFeeds; |
47 | 47 | |
48 | 48 | $parser->setHook( 'startFeed', array( $wgWikiArticleFeeds, 'feedStart' ) ); |