Merge pull request #81 from doordash/rename-page-fix

Fix bug with rename page to also delete old page
This commit is contained in:
Matthew Scragg 2015-09-30 14:33:37 -05:00
當前提交 4441cfafd0
共有 2 個文件被更改,包括 4 次插入1 次删除

查看文件

@ -118,6 +118,9 @@ class Wiki(HookMixin):
# old doesn't exist
return None
if old_filename == new_filename:
return
if new_filename in self.gittle.index:
# file is being overwritten, but that is ok, it's git!
pass

查看文件

@ -140,7 +140,7 @@ def page_write(name):
if edit_cname in current_app.config.get('WIKI_LOCKED_PAGES'):
return dict(error=True, message="Page is locked"), 403
if edit_cname != cname.lower():
if edit_cname != cname:
g.current_wiki.rename_page(cname, edit_cname)
sha = g.current_wiki.write_page(edit_cname,