Revision: 6017
Author: misza13
Date: 2008-10-25 12:13:08 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Fix post parameters - when saving a new page, edittime and starttime must also be
non-empty (changed in r42037 of mediawiki).
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-10-25 11:32:44 UTC (rev 6016)
+++ trunk/pywikipedia/wikipedia.py 2008-10-25 12:13:08 UTC (rev 6017)
@@ -1375,14 +1375,11 @@
# Add server lag parameter (see config.py for details)
if config.maxlag:
predata['maxlag'] = str(config.maxlag)
- # Except if the page is new, we need to supply the time of the
- # previous version to the wiki to prevent edit collisions
- if newPage:
- predata['wpEdittime'] = ''
- predata['wpStarttime'] = ''
- else:
- predata['wpEdittime'] = self._editTime
- predata['wpStarttime'] = self._startTime
+ # <s>Except if the page is new, we need to supply the time of the
+ # previous version to the wiki to prevent edit collisions</s>
+ # As of Oct 2008, these must be filled also for new pages
+ predata['wpEdittime'] = self._editTime
+ predata['wpStarttime'] = self._startTime
if self._revisionId:
predata['baseRevId'] = self._revisionId
# Pass the minorEdit and watchArticle arguments to the Wiki.
Show replies by date