Index: openacs-4/packages/forums/tcl/forums-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-callback-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/forums/tcl/forums-callback-procs.tcl 20 Mar 2005 00:47:07 -0000 1.1 +++ openacs-4/packages/forums/tcl/forums-callback-procs.tcl 19 Jul 2005 21:43:13 -0000 1.1.2.1 @@ -1,4 +1,7 @@ ad_library { + Library of callbacks implementations + for Forums + Navigation callbacks. @author Jeff Davis @@ -41,3 +44,49 @@ return $actions } + +ad_proc -callback merge::MergeShowUserInfo -impl forums { + -user_id:required +} { + Merge the *forums* of two users. + The from_user_id is the user_id of the user + that will be deleted and all the *forums* + of this user will be mapped to the to_user_id. + +} { + set msg "Forums items of $user_id" + ns_log Notice $msg + set result [list $msg] + + set last_poster [db_list_of_lists sel_poster {*SQL*} ] + set msg "Last Poster of $last_poster" + lappend result $msg + + set poster [db_list_of_lists sel_user_id {*SQL*} ] + set msg "Poster of $poster" + lappend result $msg + + return $result +} + +ad_proc -callback merge::MergePackageUser -impl forums { + -from_user_id:required + -to_user_id:required +} { + Merge the *forums* of two users. + The from_user_id is the user_id of the user + that will be deleted and all the *forums* + of this user will be mapped to the to_user_id. + +} { + set msg "Merging forums" + ns_log Notice $msg + set result [list $msg] + + db_dml upd_poster { *SQL* } + db_dml upd_user_id { *SQL* } + + lappend result "Merge of forums is done" + + return $result +} Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/tcl/forums-callback-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/tcl/forums-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-procs.tcl,v diff -u -r1.17.2.2 -r1.17.2.3 --- openacs-4/packages/forums/tcl/forums-procs.tcl 7 Jul 2005 23:02:30 -0000 1.17.2.2 +++ openacs-4/packages/forums/tcl/forums-procs.tcl 19 Jul 2005 21:43:13 -0000 1.17.2.3 @@ -11,53 +11,6 @@ namespace eval forum {} -ad_proc -callback merge::MergeShowUserInfo -impl forums { - -user_id:required -} { - Merge the *forums* of two users. - The from_user_id is the user_id of the user - that will be deleted and all the *forums* - of this user will be mapped to the to_user_id. - -} { - set msg "Forums items of $user_id" - ns_log Notice $msg - set result [list $msg] - - set last_poster [db_list_of_lists sel_poster {*SQL*} ] - set msg "Last Poster of $last_poster" - lappend result $msg - - set poster [db_list_of_lists sel_user_id {*SQL*} ] - set msg "Poster of $poster" - lappend result $msg - - return $result -} - -ad_proc -callback merge::MergePackageUser -impl forums { - -from_user_id:required - -to_user_id:required -} { - Merge the *forums* of two users. - The from_user_id is the user_id of the user - that will be deleted and all the *forums* - of this user will be mapped to the to_user_id. - -} { - set msg "Merging forums" - ns_log Notice $msg - set result [list $msg] - - db_dml upd_poster { *SQL* } - db_dml upd_user_id { *SQL* } - - lappend result "Merge of forums is done" - - return $result -} - - ad_proc -public forum::new { {-forum_id ""} {-name:required} Index: openacs-4/packages/forums/tcl/forums-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-procs.xql,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/forums/tcl/forums-procs.xql 15 Jun 2005 17:46:09 -0000 1.5.2.1 +++ openacs-4/packages/forums/tcl/forums-procs.xql 19 Jul 2005 21:43:13 -0000 1.5.2.2 @@ -55,37 +55,5 @@ where forum_id = :forum_id - - - - update forums_messages - set last_poster = :to_user_id - where last_poster = :from_user_id - - - - - - update forums_messages - set user_id = :to_user_id - where user_id = :from_user_id - - - - - - select message_id, subject - from forums_messages - where user_id = :user_id - - - - - - select message_id, subject - from forums_messages - where last_poster = :user_id - -