Index: openacs-4/packages/photo-album/www/photos-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/www/photos-edit-2.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/photo-album/www/photos-edit-2.tcl 19 Nov 2003 00:16:32 -0000 1.6 +++ openacs-4/packages/photo-album/www/photos-edit-2.tcl 12 Dec 2003 23:03:01 -0000 1.7 @@ -9,6 +9,7 @@ photo_story:array photo_description:array photo_title:array + sequence:array,integer } -validate { valid_album -requires {album_id:integer} { if [string equal [pa_is_album_p $album_id] "f"] { @@ -34,11 +35,12 @@ } else { lappend shows $id } - + set acaption $caption($id) set aphoto_story $photo_story($id) set aphoto_description $photo_description($id) set aphoto_title $photo_title($id) + set asequence $sequence($id) set aphoto_id $id set arevision_id [db_string get_rev_id "select coalesce(live_revision,latest_revision) from cr_items where item_id = :id"] set auser_id [ad_conn user_id] @@ -54,6 +56,13 @@ where pa_photo_id = (select latest_revision from cr_items where item_id = :id) } + db_dml update_sequence { + update cr_child_rels + set order_n = :asequence + where child_id = :id + and parent_id = :album_id + } + if {[llength $hides]} { db_dml update_hides "update cr_items set live_revision = null where item_id in ([join $hides ,])" }