Mercurial > moin > 2.0
changeset 910:5b7e522d97af storage-ng
fix destroy
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Fri, 30 Sep 2011 18:38:43 +0200 |
parents | a61b3eb8aaa0 |
children | 0fb6c5bfe6a8 |
files | MoinMoin/apps/frontend/views.py MoinMoin/items/__init__.py MoinMoin/templates/destroy.html |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py Fri Sep 30 18:20:33 2011 +0200 +++ b/MoinMoin/apps/frontend/views.py Fri Sep 30 18:38:43 2011 +0200 @@ -571,7 +571,7 @@ def destroy_item(item_name, rev): if rev is None: # no revision given - _rev = -1 # for item creation + _rev = CURRENT # for item creation destroy_item = True else: _rev = rev
--- a/MoinMoin/items/__init__.py Fri Sep 30 18:20:33 2011 +0200 +++ b/MoinMoin/items/__init__.py Fri Sep 30 18:38:43 2011 +0200 @@ -414,10 +414,10 @@ # called from destroy UI/POST if destroy_item: # destroy complete item with all revisions, metadata, etc. - self.rev.item.destroy() + self.rev.item.destroy_all_revisions() else: # just destroy this revision - self.rev.destroy() + self.rev.item.destroy_revision(self.rev.revid) def modify(self): # called from modify UI/POST
--- a/MoinMoin/templates/destroy.html Fri Sep 30 18:20:33 2011 +0200 +++ b/MoinMoin/templates/destroy.html Fri Sep 30 18:38:43 2011 +0200 @@ -14,7 +14,7 @@ {{ gen.form.close() }} </div> {% else %} - <h1>{{ _("DESTROY REVISION '%(item_name)s' (rev %(rev_id)d)", item_name=item.name, rev_id=rev_id) }}</h1> + <h1>{{ _("DESTROY REVISION '%(item_name)s' (rev %(rev_id)s)", item_name=item.name, rev_id=rev_id) }}</h1> <div class="moin-form"> {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name, rev=rev_id)) }} {{ forms.render_errors(form) }}