Revision: 6084
Author: multichill
Date: 2008-11-11 21:51:31 +0000 (Tue, 11 Nov 2008)
Log Message:
-----------
Adding leaveRedirect to move (default True).
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-11-11 21:42:04 UTC (rev 6083)
+++ trunk/pywikipedia/wikipedia.py 2008-11-11 21:51:31 UTC (rev 6084)
@@ -2183,7 +2183,7 @@
return users
def move(self, newtitle, reason=None, movetalkpage=True, sysop=False,
- throttle=True, deleteAndMove=False, safe=True, fixredirects=True):
+ throttle=True, deleteAndMove=False, safe=True, fixredirects=True, leaveRedirect=True):
"""Move this page to new title given by newtitle. If safe, don't try
to move and delete if not directly requested.
@@ -2226,6 +2226,10 @@
predata['wpFixRedirects'] = '1'
else:
predata['wpFixRedirects'] = '0'
+ if leaveRedirect:
+ predata['wpLeaveRedirect'] = '1'
+ else:
+ predata['wpLeaveRedirect'] = '0'
if token:
predata['wpEditToken'] = token
if self.site().hostname() in config.authenticate.keys():