r114170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114169‎ | r114170 | r114171 >
Date:19:02, 19 March 2012
Author:wikinaut
Status:new
Tags:
Comment:
removed the redundant code for handling tracking categories. By using '-' for the message text wikiarticlefeeds-tracking-category , this can be disabled easily.
Modified paths:
  • /trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php (modified) (history)
  • /trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php
@@ -3,13 +3,7 @@
44 class WikiArticleFeeds{
55
66 function feedStart( $text, $params = array(), Parser $parser ) {
7 - global $wgWikiArticleFeedsTrackingCategory;
8 -
9 - if ( $wgWikiArticleFeedsTrackingCategory === true ) {
10 - $parser->addTrackingCategory( 'wikiarticlefeeds-tracking-category' );
11 - } elseif ( is_string( $wgWikiArticleFeedsTrackingCategory ) ) {
12 - $parser->addTrackingCategory( $wgWikiArticleFeedsTrackingCategory );
13 - }
 7+ $parser->addTrackingCategory( 'wikiarticlefeeds-tracking-category' );
148 return '<!-- FEED_START -->';
159 }
1610
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
@@ -4,7 +4,7 @@
55 * @author Jim R. Wilson, Thomas Gries
66 * @maintainer Thomas Gries
77 *
8 - * @version 0.703
 8+ * @version 0.71
99 * @copyright Copyright (C) 2007 Jim R. Wilson
1010 * @copyright Copyright (C) 2012 Thomas Gries
1111 * @license The MIT License - http://www.opensource.org/licenses/mit-license.php
@@ -56,6 +56,7 @@
5757 *
5858 * Versions
5959 *
 60+ * 0.71 removed $wgWikiArticleFeedsTrackingCategory parameter for tracking category
6061 * 0.703 adds the feed icon to the bottom of the toolbox in Monobook or like-minded skins.
6162 * 0.701 version string constant renamed to make it wiki-unique
6263 * 0.700 rewritten into a four-file version with class
@@ -124,7 +125,7 @@
125126 die( "This is not a valid entry point.\n" );
126127 }
127128
128 -define( 'EXTENSION_WIKIARTICLEFEEDS_VERSION', '0.703 20120312' );
 129+define( 'EXTENSION_WIKIARTICLEFEEDS_VERSION', '0.71 20120319' );
129130
130131 # Bring in supporting classes
131132 require_once( "$IP/includes/Feed.php" );
@@ -158,16 +159,3 @@
159160
160161 $wgWikiArticleFeeds = new WikiArticleFeeds();
161162 $wgHooks['ParserBeforeTidy'][] = array( $wgWikiArticleFeeds, 'WikiArticleFeeds::itemTagsPlaceholderCorrections' );
162 -
163 -// Parameter to enable the automatic tracking category
164 -// for all pages using this parser extension
165 -//
166 -// Category name [[MediaWiki:Wikiarticlefeeds-tracking-category]] (default)
167 -// $wgWikiArticleFeedsTrackingCategory = true;
168 -//
169 -// you can assign a specific category name [[MediaWiki:Wikiarticlefeeds-mycategory]]
170 -// $wgWikiArticleFeedsTrackingCategory = 'wikiarticlefeeds-mycategory';
171 -//
172 -// you can disable the use of a tracking category
173 -// $wgWikiArticleFeedsTrackingCategory = false;
174 -$wgWikiArticleFeedsTrackingCategory = true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113517add tracking category feature (enabled by default). Each page using this exte...wikinaut20:10, 9 March 2012

Status & tagging log