http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9379
Revision: 9379 Author: russblau Date: 2011-07-15 14:28:43 +0000 (Fri, 15 Jul 2011) Log Message: ----------- Fix Bug 3309460: page.editTime() fails when using site.allpages()
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2011-07-15 05:58:03 UTC (rev 9378) +++ branches/rewrite/pywikibot/page.py 2011-07-15 14:28:43 UTC (rev 9379) @@ -363,19 +363,28 @@ """Return name or IP address of last user to edit page.
""" - return self._revisions[self.latestRevision()].user + rev = self.latestRevision() + if rev not in self._revisions: + self.site.loadrevisions(self) + return self._revisions[rev].user
def isIpEdit(self): """Return True if last editor was unregistered.
""" - return self._revisions[self.latestRevision()].anon + rev = self.latestRevision() + if rev not in self._revisions: + self.site.loadrevisions(self) + return self._revisions[rev].anon
def editTime(self): """Return timestamp (in ISO 8601 format) of last revision to page.
""" - return self._revisions[self.latestRevision()].timestamp + rev = self.latestRevision() + if rev not in self._revisions: + self.site.loadrevisions(self) + return self._revisions[rev].timestamp
def previousRevision(self): """Return the revision id for the previous revision of this Page."""
pywikipedia-svn@lists.wikimedia.org