http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10154
Revision: 10154
Author: xqt
Date: 2012-04-25 21:06:18 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
update mw release 1.20wmf1, use default from family.py
Modified Paths:
--------------
trunk/pywikipedia/families/wikipedia_family.py
Modified: trunk/pywikipedia/families/wikipedia_family.py
===================================================================
--- trunk/pywikipedia/families/wikipedia_family.py 2012-04-25 18:39:37 UTC (rev 10153)
+++ trunk/pywikipedia/families/wikipedia_family.py 2012-04-25 21:06:18 UTC (rev 10154)
@@ -1486,12 +1486,6 @@
# xxwikipedia for Wikipedias.
return '%swiki_p' % code
- def version(self, code):
- """Return MediaWiki version number as a string."""
- # Don't use this, use versionnumber() instead. This only exists
- # to not break family files.
- return '1.19wmf1'
-
def code2encodings(self, code):
"""Return a list of historical encodings for a specific language
wikipedia"""
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10153
Revision: 10153
Author: xqt
Date: 2012-04-25 18:39:37 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
isPublic() method may depend from language code; update from rewrite
Modified Paths:
--------------
trunk/pywikipedia/family.py
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/family.py
===================================================================
--- trunk/pywikipedia/family.py 2012-04-25 18:16:32 UTC (rev 10152)
+++ trunk/pywikipedia/family.py 2012-04-25 18:39:37 UTC (rev 10153)
@@ -4207,7 +4207,7 @@
# TODO : If the local computer time is wrong, result will be wrong
return datetime.utcnow() + self.servergmtoffset
- def isPublic(self):
+ def isPublic(self, code):
"""Does the wiki require logging in before viewing it?"""
return True
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2012-04-25 18:16:32 UTC (rev 10152)
+++ trunk/pywikipedia/wikipedia.py 2012-04-25 18:39:37 UTC (rev 10153)
@@ -7668,7 +7668,7 @@
if key not in _sites:
_sites[key] = Site(code=code, fam=fam, user=user)
ret = _sites[key]
- if not ret.family.isPublic() and not noLogin:
+ if not ret.family.isPublic(code) and not noLogin:
ret.forceLogin()
return ret