Index: openacs-4/packages/photo-album/tcl/photo-album-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-procs.tcl,v
diff -u -r1.14 -r1.14.2.1
--- openacs-4/packages/photo-album/tcl/photo-album-procs.tcl 19 Mar 2005 17:35:43 -0000 1.14
+++ openacs-4/packages/photo-album/tcl/photo-album-procs.tcl 15 Jun 2005 18:07:09 -0000 1.14.2.1
@@ -1258,4 +1258,34 @@
}
return [site_node::get_element -node_id $node_id -element url]
-}
\ No newline at end of file
+}
+
+namespace eval photo_album::merge {
+ ad_proc -callback MergeShowUserInfo -impl photo_album {
+ -user_id:required
+ } {
+ Show the items of user_id
+ } {
+ set result [list "photo_album items of $user_id"]
+ set user_items [db_list_of_lists sel_collections { *SQL* }]
+ lappend result $user_items
+ return $result
+ }
+
+ ad_proc -callback MergePackageUser -impl photo_album {
+ -from_user_id:required
+ -to_user_id:required
+ } {
+ Merge the photo_album items of two users.
+ } {
+ set msg "Merging photo album"
+ set result [list $msg]
+ ns_log Notice $msg
+
+ db_transaction {
+ db_dml upd_collections { *SQL* }
+ lappend result "Photo album merge is done"
+ }
+ return $result
+ }
+}
Index: openacs-4/packages/photo-album/tcl/photo-album-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/tcl/photo-album-procs.xql,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/photo-album/tcl/photo-album-procs.xql 26 Jul 2004 13:07:42 -0000 1.4
+++ openacs-4/packages/photo-album/tcl/photo-album-procs.xql 15 Jun 2005 18:07:09 -0000 1.4.2.1
@@ -50,4 +50,20 @@
+
+
+ update pa_collections
+ set owner_id = :to_user_id
+ where owner_id = :from_user_id
+
+
+
+
+
+ select collection_id, title
+ from pa_collections
+ where owner_id = :user_id
+
+
+