Revision: 5749 Author: nicdumz Date: 2008-07-23 16:59:16 +0000 (Wed, 23 Jul 2008)
Log Message: ----------- Adding support for the very recent double redirect fixer on page move
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-07-23 16:17:26 UTC (rev 5748) +++ trunk/pywikipedia/wikipedia.py 2008-07-23 16:59:16 UTC (rev 5749) @@ -2077,9 +2077,11 @@ return users
def move(self, newtitle, reason=None, movetalkpage=True, sysop=False, - throttle=True, deleteAndMove=False, safe=True): + throttle=True, deleteAndMove=False, safe=True, fixredirects=True): """Move this page to new title given by newtitle. If safe, don't try - to move and delete if not directly requested.""" + to move and delete if not directly requested. + + * fixredirects has no effect in MW < 1.13""" # Login try: self.get() @@ -2113,6 +2115,13 @@ predata['wpMovetalk'] = '1' else: predata['wpMovetalk'] = '0' + if self.versionnumber() > 12: + # introduced in MW 1.13 : + # http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/39072 + if fixredirects: + predata['wpFixRedirects'] = '1' + else: + predate['wpFixRedirects'] = '0' if token: predata['wpEditToken'] = token if self.site().hostname() in config.authenticate.keys():