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'
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10662
Revision: 10662
Author: xqt
Date: 2012-11-04 19:09:01 +0000 (Sun, 04 Nov 2012)
Log Message:
-----------
fix for r8629, import as pywikibot
Modified Paths:
--------------
trunk/pywikipedia/rcsort.py
Modified: trunk/pywikipedia/rcsort.py
===================================================================
--- trunk/pywikipedia/rcsort.py 2012-11-04 12:26:58 UTC (rev 10661)
+++ trunk/pywikipedia/rcsort.py 2012-11-04 19:09:01 UTC (rev 10662)
@@ -9,7 +9,7 @@
usable.
Permission has been asked to run this on the toolserver.
"""
-# (C) Pywikipedia bot team, 2007-2010
+# (C) Pywikipedia bot team, 2007-2012
#
# Distributed under the terms of the MIT license.
#
@@ -19,7 +19,7 @@
import cgi
import cgitb
import re
-import wikipedia
+import wikipedia as pywikibot
cgitb.enable()