http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10663
Revision: 10663 Author: xqt Date: 2012-11-04 19:53:31 +0000 (Sun, 04 Nov 2012) Log Message: ----------- we only need permission on namespace 2 for .js and .css, not for the talk page I guess. bugfix for bug #3583461
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-11-04 19:09:01 UTC (rev 10662) +++ trunk/pywikipedia/wikipedia.py 2012-11-04 19:53:31 UTC (rev 10663) @@ -1963,13 +1963,13 @@ raise LockedPage( u'Not allowed to edit %s because of a restricting template' % self.title(asLink=True)) - elif self.site().has_api() and self.namespace() in [2,3] \ + elif self.site().has_api() and self.namespace() == 2 \ and (self.title().endswith('.css') or \ self.title().endswith('.js')): titleparts = self.title().split("/") userpageowner = titleparts[0].split(":")[1] if userpageowner != username: - # API enable: if title ends with .css or .js in ns2,3 + # API enable: if title ends with .css or .js in ns2 # it needs permission to edit user pages if self.title().endswith('css'): permission = 'editusercss'