http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10815
Revision: 10815 Author: btongminh Date: 2012-12-23 16:01:12 +0000 (Sun, 23 Dec 2012) Log Message: ----------- Report all replacements, not just the ones from this process
Modified Paths: -------------- trunk/pywikipedia/commonsdelinker/image_replacer.py
Modified: trunk/pywikipedia/commonsdelinker/image_replacer.py =================================================================== --- trunk/pywikipedia/commonsdelinker/image_replacer.py 2012-12-23 15:29:48 UTC (rev 10814) +++ trunk/pywikipedia/commonsdelinker/image_replacer.py 2012-12-23 16:01:12 UTC (rev 10815) @@ -193,12 +193,12 @@
self.cursor.execute('START TRANSACTION WITH CONSISTENT SNAPSHOT') self.cursor.execute("""SELECT old_image, new_image, user, comment FROM - %s WHERE status = 'done' AND timestamp >= %i""" % \ - (self.config['replacer_table'], self.first_revision)) + %s WHERE status = 'done'""" % \ + (self.config['replacer_table'], )) finished_images = list(self.cursor) self.cursor.execute("""UPDATE %s SET status = 'reported' - WHERE status = 'done' AND timestamp >= %i""" % \ - (self.config['replacer_table'], self.first_revision)) + WHERE status = 'done'""" % \ + (self.config['replacer_table'], )) self.cursor.commit()
for old_image, new_image, user, comment in finished_images: