Skip to content

Commit

Permalink
Merge pull request #264 from RheingoldRiver/movepage-update
Browse files Browse the repository at this point in the history
Add move_subpages, ignore_warnings to page.move
  • Loading branch information
AdamWill committed Feb 10, 2023
2 parents 8f0997d + 894bc57 commit b1eb977
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mwclient/page.py
Expand Up @@ -284,7 +284,8 @@ def touch(self):
return
self.append('')

def move(self, new_title, reason='', move_talk=True, no_redirect=False):
def move(self, new_title, reason='', move_talk=True, no_redirect=False,
move_subpages=False, ignore_warnings=False):
"""Move (rename) page to new_title.
If user account is an administrator, specify no_redirect as True to not
Expand All @@ -305,6 +306,10 @@ def move(self, new_title, reason='', move_talk=True, no_redirect=False):
data['movetalk'] = '1'
if no_redirect:
data['noredirect'] = '1'
if move_subpages:
data['movesubpages'] = '1'
if ignore_warnings:
data['ignorewarnings'] = '1'
result = self.site.post('move', ('from', self.name), to=new_title,
token=self.get_token('move'), reason=reason, **data)
return result['move']
Expand Down

0 comments on commit b1eb977

Please sign in to comment.