http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10629
Revision: 10629 Author: xqt Date: 2012-10-31 11:01:24 +0000 (Wed, 31 Oct 2012) Log Message: ----------- edit restriction for some templates on zh-wiki where interlanguage keys are included in /doc sub-page
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2012-10-31 10:48:28 UTC (rev 10628) +++ trunk/pywikipedia/interwiki.py 2012-10-31 11:01:24 UTC (rev 10629) @@ -1654,14 +1654,21 @@ break else: for (site, page) in new.iteritems(): + # edit restriction for some templates on zh-wiki where interlanguage keys are included + # by /doc subpage + smallWikiAllowed = not (page.site.sitename() == 'wikipedia:zh' and + page.site.namespace() == 10 and + u'Country data' in page.title(withNamespace=False)) # edit restriction on is-wiki # http://is.wikipedia.org/wiki/Wikipediaspjall:V%C3%A9lmenni + # and zh-wiki for template namespace which prevents increasing the queue # allow edits for the same conditions as -whenneeded # or the last edit wasn't a bot # or the last edit was 1 month ago - smallWikiAllowed = True - if globalvar.autonomous and (page.site.sitename() == 'wikipedia:is' or - page.site.sitename() == 'wikipedia:zh'): + if smallWikiAllowed and globalvar.autonomous and \ + (page.site.sitename() == 'wikipedia:is' or + page.site.sitename() == 'wikipedia:zh' and + page.site.namespace() == 10): old={} try: for mypage in new[page.site].interwiki():
pywikipedia-svn@lists.wikimedia.org