From 53408ea1811a73a4852fdf3940cf5b47b364deb0 Mon Sep 17 00:00:00 2001 From: serol1971 Date: Mon, 9 Jan 2012 11:43:05 +0100 Subject: [PATCH 1/2] Prolem: Switching between revisions was not possible as the URL parameter revision_id is overwritten by the revision_id of the first revision in line number 93 when revisions are retrieved from the database. Solution: introduction of new variale keeping the original (current) revision id --- www/view-comment.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/view-comment.tcl b/www/view-comment.tcl index 254f2e0..7edfd89 100644 --- a/www/view-comment.tcl +++ b/www/view-comment.tcl @@ -10,6 +10,7 @@ ad_page_contract { } { comment_id:notnull { revision_id {} } + { curr_revision_id {} } { object_name {} } { return_url {} } } -properties { @@ -42,6 +43,7 @@ set admin_p [ad_permission_p $package_id admin] # if the user has write permissions then allow # viewing of selected revision +set curr_revision_id $revision_id if { $write_perm_p == 1 } { if { [empty_string_p $revision_id] } { # get the latest revision @@ -122,7 +124,7 @@ set action_url_add_url [export_vars -base "url-add" {{parent_id $comment_id} ret # Revisions section set return_url_view "../${return_url_view}" -if { $live_revision ne $revision_id } { +if { $live_revision ne $curr_revision_id } { set font_color "red" set pre_text [_ general-comments.lt_This_revision_is_not_] set admin_toggle_url [export_vars -base "admin/toggle-approval" {comment_id revision_id {return_url $return_url_view}}] From a0cd00ad3ee31b1c853e8b3e2a99dfa980e18159 Mon Sep 17 00:00:00 2001 From: serol1971 Date: Mon, 9 Jan 2012 11:45:59 +0100 Subject: [PATCH 2/2] Replaced variable revision_id with curr_revision_id as a consequence of other commit to view-comment.tcl --- www/view-comment.adp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/view-comment.adp b/www/view-comment.adp index 9bed01e..e38c856 100644 --- a/www/view-comment.adp +++ b/www/view-comment.adp @@ -70,7 +70,7 @@

#general-comments.Revisions#