http://www.mediawiki.org/wiki/Special:Code/pywikipedia/8951
Revision: 8951 Author: russblau Date: 2011-02-14 14:44:06 +0000 (Mon, 14 Feb 2011) Log Message: ----------- Avoid recursive categorization (a category description page should not be a member of its own category).
Modified Paths: -------------- branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py =================================================================== --- branches/rewrite/scripts/category_redirect.py 2011-02-14 02:08:30 UTC (rev 8950) +++ branches/rewrite/scripts/category_redirect.py 2011-02-14 14:44:06 UTC (rev 8951) @@ -218,7 +218,7 @@
""" oldtext = article.get(get_redirect=True, force=True) - if newCat in article.categories(): + if newCat in article.categories() or newcat == article: newtext = pywikibot.replaceCategoryInPlace(oldtext, oldCat, None, site=self.site) else: