comparison MoinMoin/PageEditor.py @ 3721:497c47e00539

revert 384135a7bb0a ("PageEditor.renamePage: bugfix added missing comment var") The comment isn't really missing, it may be empty if the user didn't provide one and in that case if you want to know what it was renamed from you have to look at the 'extra' field in the edit log, RecentChanges does that and displays "#01 Renamed from 'test'." or similar.
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 18 Jun 2008 15:13:37 +0200
parents 78f1b1c0affb
children fd63e84632df
comparison
equal deleted inserted replaced
3720:aae5351b8a1e 3721:497c47e00539
618 # exists. We should have global edit-lock to avoid this. 618 # exists. We should have global edit-lock to avoid this.
619 # See http://docs.python.org/lib/os-file-dir.html 619 # See http://docs.python.org/lib/os-file-dir.html
620 try: 620 try:
621 os.rename(oldpath, newpath) 621 os.rename(oldpath, newpath)
622 self.error = None 622 self.error = None
623 if not comment:
624 comment = u"## page was renamed from %s" % self.page_name
625 # Save page text with a comment about the old name 623 # Save page text with a comment about the old name
626 savetext = u"## page was renamed from %s\n%s" % (self.page_name, savetext) 624 savetext = u"## page was renamed from %s\n%s" % (self.page_name, savetext)
627 newpage.saveText(savetext, 0, comment=comment, extra=self.page_name, action='SAVE/RENAME', notify=False) 625 newpage.saveText(savetext, 0, comment=comment, extra=self.page_name, action='SAVE/RENAME', notify=False)
628 # delete pagelinks 626 # delete pagelinks
629 arena = newpage 627 arena = newpage