[Pywikipedia-l] [ pywikipediabot-Feature Requests-2255146 ] Page moves should not suppress redirects by default
SourceForge.net
noreply at sourceforge.net
Tue Nov 25 14:59:52 UTC 2008
Feature Requests item #2255146, was opened at 2008-11-10 12:44
Message generated for change (Comment added) made by yannforget
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2255146&group_id=93107
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Closed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Multichill (multichill)
Summary: Page moves should not suppress redirects by default
Initial Comment:
When moving pages with Page.move(), a redirect should be created by default. Users with the 'suppressredirect' right (e.g. bots on Wikimedia projects) should be able to suppress redirects. I propose adding a parameter leaveRedirect=True (or possibly suppresRedirect=False) to the function.
----------------------------------------------------------------------
Comment By: Yann Forget (yannforget)
Date: 2008-11-25 15:59
Message:
Thanks to Andre Engels who helped for this, please add to movepages.py:
86c86
< def __init__(self, generator, addprefix, delete, always,
skipredirects, summary, leaveRedirect):
---
> def __init__(self, generator, addprefix, delete, always,
skipredirects, summary):
93d92
< self.leaveRedirect = leaveRedirect
101c100
< if page.move(newPageTitle, msg, throttle=True,
leaveRedirect=self.leaveRedirect) and self.delete:
---
> if page.move(newPageTitle, msg, throttle=True) and
self.delete:
223d221
< leaveRedirect = True
249,250d246
< elif arg == '-noredirect':
< leaveRedirect = False
284c280
< bot = MovePagesBot(None, prefix, delete, always, skipredirects,
summary, leaveRedirect)
---
> bot = MovePagesBot(None, prefix, delete, always, skipredirects,
summary)
288c284
< bot = MovePagesBot(preloadingGen, prefix, delete, always,
skipredirects, summary, leaveRedirect)
---
> bot = MovePagesBot(preloadingGen, prefix, delete, always,
skipredirects, summary)
----------------------------------------------------------------------
Comment By: Yann Forget (yannforget)
Date: 2008-11-25 13:41
Message:
https://sourceforge.net/tracker/index.php?func=detail&aid=2082329&group_id=93107&atid=603138
----------------------------------------------------------------------
Comment By: Multichill (multichill)
Date: 2008-11-13 12:44
Message:
In svn revision 6084 i implemented leaveRedirect. By default this is true.
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:
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=2255146&group_id=93107
More information about the Pywikipedia-l
mailing list