Revision: 7036 Author: multichill Date: 2009-07-09 12:16:32 +0000 (Thu, 09 Jul 2009)
Log Message: ----------- Fix bug introduced in 6770: Links in delinks by a local delinker shouldn't be redirected to Commons. Only change link to Commons when the bot is running in global mode.
Modified Paths: -------------- trunk/pywikipedia/commonsdelinker/delinker.py
Modified: trunk/pywikipedia/commonsdelinker/delinker.py =================================================================== --- trunk/pywikipedia/commonsdelinker/delinker.py 2009-07-09 10:14:28 UTC (rev 7035) +++ trunk/pywikipedia/commonsdelinker/delinker.py 2009-07-09 12:16:32 UTC (rev 7036) @@ -343,8 +343,8 @@ def get_summary(self, site, image, admin, reason, replacement): """ Get the summary template and substitute the correct values.""" - # FIXME: Hardcode is EVIL - if site.lang != 'commons': + # FIXME: Hardcode is EVIL, but now only the global bot uses this + if (site.lang != 'commons' and self.CommonsDelinker.config['global']): reason = reason.replace('[[', '[[commons:') if replacement: tlp = self.CommonsDelinker.SummaryCache.get(site, 'replace-I18n')
pywikipedia-svn@lists.wikimedia.org