From a83634c1662f8498e5f1b63301330265c5c5f9e2 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 13 Dec 2011 00:18:49 +0100 Subject: [PATCH] Render information about the old revision to-be-deleted, not about the current one. --- src/IDF/Views/Wiki.php | 2 -- src/IDF/templates/idf/wiki/deleteResourceRev.html | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/IDF/Views/Wiki.php b/src/IDF/Views/Wiki.php index d394d43..8b6d7df 100644 --- a/src/IDF/Views/Wiki.php +++ b/src/IDF/Views/Wiki.php @@ -452,7 +452,6 @@ class IDF_Views_Wiki } $title = sprintf(__('Delete Old Revision of %s'), $resource->title); - $revision = $resource->get_current_revision(); $false = Pluf_DB_BooleanToDb(false, $resource->getDbConnection()); $revs = $resource->get_revisions_list(array('order' => 'creation_dtime DESC', 'filter' => 'is_head='.$false)); @@ -461,7 +460,6 @@ class IDF_Views_Wiki 'page_title' => $title, 'resource' => $resource, 'oldrev' => $oldrev, - 'rev' => $revision, 'revs' => $revs, ), $request); diff --git a/src/IDF/templates/idf/wiki/deleteResourceRev.html b/src/IDF/templates/idf/wiki/deleteResourceRev.html index 8523192..aac8ed7 100644 --- a/src/IDF/templates/idf/wiki/deleteResourceRev.html +++ b/src/IDF/templates/idf/wiki/deleteResourceRev.html @@ -21,16 +21,16 @@

{$resource.summary}

-{assign $preview = $rev.renderRaw()} +{assign $preview = $oldrev.renderRaw()} {if $preview == ''} {assign $preview = __('Unable to render preview for this MIME type.')} {/if}

{$preview|unsafe}

{/block} @@ -38,8 +38,8 @@ {block context} {assign $submitter = $resource.get_submitter()}

{trans 'Created:'} {$resource.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

-{if $rev.creation_dtime != $resource.creation_dtime}

{assign $submitter = $rev.get_submitter()} -{trans 'Updated:'} {$rev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} +{if $oldrev.creation_dtime != $resource.creation_dtime}

{assign $submitter = $oldrev.get_submitter()} +{trans 'Updated:'} {$oldrev.creation_dtime|dateago}
{blocktrans}by {$submitter}{/blocktrans}

{/if} {if $revs.count() > 0}

{trans 'Old Revisions'}