https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114170

Revision: 114170
Author:   wikinaut
Date:     2012-03-19 19:02:42 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
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
    trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php

Modified: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
===================================================================
--- trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php      2012-03-19 
18:57:30 UTC (rev 114169)
+++ trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php      2012-03-19 
19:02:42 UTC (rev 114170)
@@ -4,7 +4,7 @@
  * @author Jim R. Wilson, Thomas Gries
  * @maintainer Thomas Gries
  *
- * @version 0.703
+ * @version 0.71
  * @copyright Copyright (C) 2007 Jim R. Wilson
  * @copyright Copyright (C) 2012 Thomas Gries
  * @license The MIT License - 
http://www.opensource.org/licenses/mit-license.php
@@ -56,6 +56,7 @@
  *
  * Versions
  *
+ * 0.71    removed $wgWikiArticleFeedsTrackingCategory parameter for tracking 
category
  * 0.703   adds the feed icon to the bottom of the toolbox in Monobook or 
like-minded skins.
  * 0.701   version string constant renamed to make it wiki-unique
  * 0.700   rewritten into a four-file version with class
@@ -124,7 +125,7 @@
        die( "This is not a valid entry point.\n" );
 }
 
-define( 'EXTENSION_WIKIARTICLEFEEDS_VERSION', '0.703 20120312' );
+define( 'EXTENSION_WIKIARTICLEFEEDS_VERSION', '0.71 20120319' );
 
 # Bring in supporting classes
 require_once( "$IP/includes/Feed.php" );
@@ -158,16 +159,3 @@
 
 $wgWikiArticleFeeds = new WikiArticleFeeds();
 $wgHooks['ParserBeforeTidy'][] = array( $wgWikiArticleFeeds, 
'WikiArticleFeeds::itemTagsPlaceholderCorrections' );
-
-// Parameter to enable the automatic tracking category
-// for all pages using this parser extension
-//
-// Category name [[MediaWiki:Wikiarticlefeeds-tracking-category]] (default)
-// $wgWikiArticleFeedsTrackingCategory = true;
-//
-// you can assign a specific category name 
[[MediaWiki:Wikiarticlefeeds-mycategory]]
-// $wgWikiArticleFeedsTrackingCategory = 'wikiarticlefeeds-mycategory';
-//
-// you can disable the use of a tracking category
-// $wgWikiArticleFeedsTrackingCategory = false;
-$wgWikiArticleFeedsTrackingCategory = true;

Modified: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php
===================================================================
--- trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php 2012-03-19 
18:57:30 UTC (rev 114169)
+++ trunk/extensions/WikiArticleFeeds/WikiArticleFeeds_body.php 2012-03-19 
19:02:42 UTC (rev 114170)
@@ -3,13 +3,7 @@
 class WikiArticleFeeds{
 
        function feedStart( $text, $params = array(), Parser $parser ) {
-               global $wgWikiArticleFeedsTrackingCategory;
-
-               if ( $wgWikiArticleFeedsTrackingCategory === true ) {
-                       $parser->addTrackingCategory( 
'wikiarticlefeeds-tracking-category' );
-               } elseif ( is_string( $wgWikiArticleFeedsTrackingCategory ) ) {
-                       $parser->addTrackingCategory( 
$wgWikiArticleFeedsTrackingCategory );
-               }
+               $parser->addTrackingCategory( 
'wikiarticlefeeds-tracking-category' );
                return '<!-- FEED_START -->';
        }
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to