http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10701
Revision: 10701
Author: xqt
Date: 2012-11-11 12:35:46 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
replace getimageinfo with site method loadimageinfo
Modified Paths:
--------------
branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py
===================================================================
--- branches/rewrite/pywikibot/page.py 2012-11-11 12:18:44 UTC (rev 10700)
+++ branches/rewrite/pywikibot/page.py 2012-11-11 12:35:46 UTC (rev 10701)
@@ -1532,7 +1532,7 @@
"""Return the URL for the image described on this page."""
# TODO add scaling option?
if not hasattr(self, '_imageinfo'):
- self._imageinfo = self.site.getimageinfo(self) #FIXME
+ self._imageinfo = self.site.loadimageinfo(self)
return self._imageinfo['url']
@deprecated("fileIsShared")
@@ -1568,7 +1568,7 @@
def getFileSHA1Sum(self):
"""Return image file's SHA1 checksum."""
if not hasattr(self, '_imageinfo'):
- self._imageinfo = self.site.getimageinfo(self) #FIXME
+ self._imageinfo = self.site.loadimageinfo(self)
return self._imageinfo['sha1']
def getFileVersionHistory(self):
@@ -1579,7 +1579,7 @@
"""
#TODO; return value may need to change
- return self.site.getimageinfo(self, history=True) #FIXME
+ return self.site.loadimageinfo(self, history=True)
def getFileVersionHistoryTable(self):
"""Return the version history in the form of a wiki table."""