Administrar
Administraci�n
An�nimo
Aprobar
�Est� seguro que quiere borrar este mensaje y sus respuestas?
+ �Est� seguro de que quiere mover este mensaje y todas sus respuestas?
+ �Est�s seguro que quieres mover este hilo y todos sus hijos?
+
�Adjuntar archivo(s)?
Archivos adjuntos:
Autor
@@ -18,6 +21,7 @@
cerrado
�Es correcto?
Confirmaci�n para eliminar:
+ Confirmar mover mensaje
Confirmaci�n de su mensaje para el foro de discusi�n:
Crear nuevo foro de discusi�n
Crear nuevo foro de discusi�n
@@ -49,12 +53,15 @@
Enviando mensaje al foro de discusi�n
ForoID
Foros de Discusi�n
+ Foros historia
+ Foros historia
Foros de Discusi�n: Historia de mensajes de
Reenviar
Re-enviar:
html
�ltimo Mensaje
�ltimos mensajes del hilo
+ Usuarios que escribieron en el foro:
Enviar una copia del siguiente mensaje:
Primer mensaje del hilo
Administraci�n de Foros de Discusi�n
@@ -72,15 +79,32 @@
Administrar Foro de Discusi�n:
Administrar/Moderar
Mensaje ID
+ T�tulo
Moderar
moderado
+ Mover mensaje
+ Mover mensaje al foro:
+ Mover mensaje a otro mensaje
+ Mover hilo
+ Mover hilo a otro foro
+ Mover mensaje al mensaje:
+ Mover hilo a otro foro
+ Mover hilo a otro hilo
+ Mover hilo al hilo
+ Mover hilo a otro hilo
+ Mover
+ Mover a otro hilo
Nombre
+ Nombre del foro
+ Nombre del foro
Nuevo Foro de Discusi�n
No
No existen foro de discusi�n
No existen mensajes
No existen mensajes enviados.
Ninguno
+ N�mero de mensajes
+ del foro
Un Mensaje
Un hilo
abierto
@@ -112,12 +136,21 @@
Buscar
Buscar:
Buscar en Foros de Discusi�n
+ Seleccionado
+ Lo sentimos. No puedes mover este mensaje a otro hilo. No hay otros hilos en este foro.
+ Lo sentimos. No puedes mover este hilo a otro hilo porque solo existe �ste.
+ Lo sentimos. No puedes mover este hilo a otro foro porque no hay m�s foros.
+ Estad�sticas
T�tulo
�Suscribir?
+ Resumen de mensajes enviados
+ Resumen de mensajes enviados
texto
Este Foro de Discusi�n es
Con hilos
Hilos
+ Usuario
+ Usuarios que escribieron en el foro
Ver
S�
Puedes
Index: openacs-4/packages/forums/lib/forums/forums-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-chunk.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/forums/lib/forums/forums-chunk.tcl 1 Mar 2005 00:01:37 -0000 1.5
+++ openacs-4/packages/forums/lib/forums/forums-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.6
@@ -55,12 +55,19 @@
label {\#forums.Last_Post\#}
display_col last_modified_pretty
}
+ statistic {
+ label {\#forums.Statistics\#}
+ link_url_col forum_view_statistic
+ display_col statistic
+ }
}
-db_multirow -extend { forum_view_url last_modified_pretty n_threads_pretty } forums select_forums {} {
+db_multirow -extend { forum_view_url last_modified_pretty n_threads_pretty forum_view_statistic statistic} forums select_forums {} {
set last_modified_pretty [lc_time_fmt $last_post_ansi "%x %X"]
set forum_view_url [export_vars -base forum-view { forum_id }]
set n_threads_pretty [lc_numeric $n_threads]
+ set forum_view_statistic [export_vars -base forum-view-statistic { forum_id }]
+ set statistic "[_ forums.Statistics]"
}
if {[exists_and_not_null alt_template]} {
Index: openacs-4/packages/forums/lib/forums/forums-history-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-history-chunk.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/forums/forums-history-chunk.adp 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,42 @@
+
+ #forums.Users_that_wrote_in_the_forum# @name@
+
+
+
+
+
+
+
+ #forums.User#
+ #forums.Number_of_Posts#
+ #forums.Posted#
+
+
+
+
+
+
+
+
+
+
+
+ @persons.first_names@ @persons.last_name@
+ @persons.num_msg@
+ @persons.last_post@
+
+
+
+
+
+
+
+
+ #forums.No_Postings#
+
+
+
+
+
+
+
Index: openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/forums/forums-history-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,22 @@
+ad_page_contract {
+
+ Forums History
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-17
+
+}
+
+set package_id [ad_conn package_id]
+
+# get the colors from the params
+set table_border_color [parameter::get -parameter table_border_color]
+set table_bgcolor [parameter::get -parameter table_bgcolor]
+set table_other_bgcolor [parameter::get -parameter table_other_bgcolor]
+
+
+db_multirow persons select_users_wrote_post {}
+
+if {[exists_and_not_null alt_template]} {
+ ad_return_template $alt_template
+}
Index: openacs-4/packages/forums/lib/forums/forums-history-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/forums/Attic/forums-history-chunk.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/forums/forums-history-chunk.xql 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select distinct forums_messages.user_id, persons.first_names, persons.last_name, count(user_id) as num_msg, to_char(max(last_child_post), 'YYYY-MM-DD HH24:MI:SS') as last_post
+ from persons, forums_messages
+ where forums_messages.user_id = persons.person_id and forums_messages.forum_id = :forum_id
+ group by forums_messages.user_id, persons.first_names, persons.last_name
+
+
+
Index: openacs-4/packages/forums/lib/message/choose_forum_move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_forum_move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_forum_move.adp 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,17 @@
+@title;noquote@
+@context;noquote@
+
+ #forums.Move_thread_to_forum#
+
+
\ No newline at end of file
Index: openacs-4/packages/forums/lib/message/choose_forum_move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_forum_move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_forum_move.tcl 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,49 @@
+# packages/forums/admin/moderate/choose_forum_move.tcl
+
+ad_page_contract {
+
+ Show a list of available forums so that user can choose one.
+
+ @author Natalia Perez (nperper@it.uc3m.es)
+ @creation-date 2005-03-15
+} {
+ {return_url "../message-view"}
+} -properties {
+ context:onevalue
+} -validate {
+} -errors {
+}
+
+
+ template::list::create \
+ -name available_forums \
+ -multirow forums \
+ -key forum_id \
+ -elements {
+ selected {
+ label #forums.Selected#
+ display_template {
+
+ }
+ }
+ forum_id {
+ hide_p 1
+ }
+ forum_name {
+ label #forums.Forum_Name#
+ display_col name
+ }
+ }
+
+db_0or1row get_package_id "select distinct(package_id) from forums_forums where forum_id = $message(forum_id)"
+db_multirow forums get_forums "
+ select forum_id, name from forums_forums where forum_id <> $message(forum_id) and package_id = :package_id and enabled_p = 't'
+"
+
+set message_id $message(message_id)
+
+# set context & title
+set context [list "[_ forums.Available_Forums]"]
+set title "[_ forums.Available_Forums]"
+
+
Index: openacs-4/packages/forums/lib/message/choose_message_move-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_message_move-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_message_move-oracle.xql 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+ oracle 8.1.6
+
+
+
+ select substr(tree_sortkey, 0, 6) as father_tree_sortkey
+ from forums_messages
+ where message_id=$message(message_id)
+
+
+
+
+
+
+
+ select parent_id
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey between tree.left('$father_tree_sortkey') and tree.right('$father_tree_sortkey')
+ order by tree_sortkey desc
+
+
+
+
+
Index: openacs-4/packages/forums/lib/message/choose_message_move-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_message_move-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_message_move-postgresql.xql 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,26 @@
+
+
+
+ postgresql 7.1
+
+
+
+ select substring(tree_sortkey, 0, 9) as father_tree_sortkey
+ from forums_messages
+ where message_id=$message(message_id)
+
+
+
+
+
+
+
+ select parent_id
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey between tree_left('$father_tree_sortkey') and tree_right('$father_tree_sortkey')
+ order by tree_sortkey desc
+
+
+
+
+
Index: openacs-4/packages/forums/lib/message/choose_message_move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_message_move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_message_move.adp 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,17 @@
+@title;noquote@
+@context;noquote@
+
+ #forums.Move_message_to_message#
+
+
\ No newline at end of file
Index: openacs-4/packages/forums/lib/message/choose_message_move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_message_move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_message_move.tcl 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,51 @@
+# packages/forums/admin/moderate/choose_message_move.tcl
+
+ad_page_contract {
+
+ Show a list of available messages so that user can choose one.
+
+ @author Natalia Perez (nperper@it.uc3m.es)
+ @creation-date 2005-03-17
+} {
+ {return_url "../message-view"}
+} -properties {
+ context:onevalue
+} -validate {
+} -errors {
+}
+
+ template::list::create \
+ -name available_messages \
+ -multirow messages \
+ -key message_id \
+ -elements {
+ selected {
+ label #forums.Selected#
+ display_template {
+
+ }
+ }
+ message_id {
+ hide_p 1
+ }
+ message_subject {
+ label #forums.Message_Subject#
+ display_col subject
+ }
+ }
+
+db_0or1row get_tree_sortkey { }
+
+db_foreach get_parent_id { } {
+ db_multirow messages get_messages "
+ select message_id, subject from forums_messages where forum_id = $message(forum_id) and message_id <> $message(message_id) and parent_id is null and message_id <> :parent_id
+ "
+}
+
+set msg_id $message(message_id)
+
+# set context & title
+set context [list "[_ forums.Available_Messages]"]
+set title "[_ forums.Available_Messages]"
+
+
Index: openacs-4/packages/forums/lib/message/choose_thread_move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_thread_move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_thread_move.adp 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,17 @@
+@title;noquote@
+@context;noquote@
+
+ #forums.Move_thread_to_thread#
+
+
\ No newline at end of file
Index: openacs-4/packages/forums/lib/message/choose_thread_move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/choose_thread_move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/lib/message/choose_thread_move.tcl 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,58 @@
+# packages/forums/admin/moderate/choose_message_move.tcl
+
+ad_page_contract {
+
+ Show a list of available messages so that user can choose one.
+
+ @author Natalia Perez (nperper@it.uc3m.es)
+ @creation-date 2005-03-17
+} {
+ {return_url "../message-view"}
+} -properties {
+ context:onevalue
+} -validate {
+} -errors {
+}
+
+ template::list::create \
+ -name available_messages \
+ -multirow messages \
+ -key message_id \
+ -elements {
+ selected {
+ label #forums.Selected#
+ display_template {
+
+ }
+ }
+ message_id {
+ hide_p 1
+ }
+ forum_id {
+ label #forums.Name_of_forum#
+ display_col name
+ }
+ message_subject {
+ label #forums.Message_Subject#
+ display_col subject
+ }
+ }
+
+
+db_0or1row get_package_id "select distinct(package_id) from forums_forums where forum_id = $message(forum_id)"
+db_multirow messages get_messages "
+ select fm.forum_id, fm.message_id, fm.subject, ff.name
+ from forums_messages fm, forums_forums ff
+ where ff.package_id = :package_id and ff.enabled_p='t' and fm.message_id <> $message(message_id) and fm.parent_id is null
+ and fm.forum_id = ff.forum_id
+ order by fm.forum_id
+"
+
+
+set msg_id $message(message_id)
+
+# set context & title
+set context [list "[_ forums.Available_Messages]"]
+set title "[_ forums.Available_Messages]"
+
+
Index: openacs-4/packages/forums/lib/message/row.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/message/row.adp,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/forums/lib/message/row.adp 26 Mar 2005 20:29:20 -0000 1.9
+++ openacs-4/packages/forums/lib/message/row.adp 8 Apr 2005 08:28:08 -0000 1.10
@@ -7,7 +7,14 @@
#forums.forward#
#forums.edit#
- #forums.delete#
+ #forums.delete#
+
+ #forums.Move_thread_to_other_forum#
+ #forums.Move_thread_to_other_thread#
+
+
+ #forums.Move_to_other_thread#
+
#forums.approve#
Index: openacs-4/packages/forums/lib/user/post-history-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/lib/user/post-history-chunk.adp 17 Dec 2003 15:45:30 -0000 1.1
+++ openacs-4/packages/forums/lib/user/post-history-chunk.adp 8 Apr 2005 08:28:08 -0000 1.2
@@ -56,9 +56,47 @@
+
+
+ #forums.Summary_Posting_history_for#
+
+
+
+ #forums.Forum#
+ #forums.Number_of_Posts#
+ #forums.Posted#
+
+
+
+
+
+
+
+
+
+
+
+ @posts.name@
+ @posts.num_msg@
+ @posts.last_post@
+
+
+
+
+
+
+
+ #forums.No_Postings#
+
+
+
+
+
+
+
Index: openacs-4/packages/forums/lib/user/post-history-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/lib/user/post-history-chunk.tcl 17 Dec 2003 15:45:30 -0000 1.1
+++ openacs-4/packages/forums/lib/user/post-history-chunk.tcl 8 Apr 2005 08:28:08 -0000 1.2
@@ -35,6 +35,9 @@
set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"]
}
+# select number of post from this user
+db_multirow posts select_num_post {}
+
set dimensional_chunk [ad_dimensional $dimensional_list]
if {[exists_and_not_null alt_template]} {
Index: openacs-4/packages/forums/lib/user/post-history-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/lib/user/post-history-chunk.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/forums/lib/user/post-history-chunk.xql 17 Dec 2003 15:45:30 -0000 1.1
+++ openacs-4/packages/forums/lib/user/post-history-chunk.xql 8 Apr 2005 08:28:08 -0000 1.2
@@ -34,5 +34,15 @@
forums_messages.posting_date desc
+
+
+
+ select count(user_id) as num_msg, to_char(max(last_child_post), 'YYYY-MM-DD HH24:MI:SS') as last_post, forums_forums.name, forums_forums.forum_id
+ from forums_messages, forums_forums
+ where forums_messages.user_id = :user_id and forums_forums.forum_id = forums_messages.forum_id and package_id = :package_id
+ group by forums_forums.name, forums_forums.forum_id
+ order by forums_forums.name asc
+
+
Index: openacs-4/packages/forums/www/forum-view-statistic.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view-statistic.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/forum-view-statistic.adp 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,9 @@
+
+#forums.Forums_hist_lt# @name;noquote@
+@context;noquote@
+
+
+
+
+
+
Index: openacs-4/packages/forums/www/forum-view-statistic.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view-statistic.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/forum-view-statistic.tcl 8 Apr 2005 08:28:08 -0000 1.1
@@ -0,0 +1,16 @@
+ad_page_contract {
+
+ Forums History
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-17
+
+} {
+ forum_id:integer,notnull
+}
+
+# Get user information
+db_1row get_forum_name "select name from forums_forums where forum_id= :forum_id"
+set context [list [_ forums.Forums_History]]
+
+ad_return_template
Index: openacs-4/packages/forums/www/moderate/message-move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/message-move.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,5 @@
+
+#forums.Confirm_Move_to# @message.subject;noquote@
+#forums.Move_to#
+
+
Index: openacs-4/packages/forums/www/moderate/message-move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/message-move.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,20 @@
+ad_page_contract {
+
+ Move a Message to other forum
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-14
+
+} {
+ message_id:integer,notnull
+ {return_url "../message-view"}
+ {confirm_p 0}
+}
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $message_id
+
+# Select the stuff
+forum::message::get -message_id $message_id -array message
+
+ad_return_template
Index: openacs-4/packages/forums/www/moderate/move-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-oracle.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,46 @@
+
+
+
+ oracle 8.1.6
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id,
+ tree_sortkey = tree.increment_key(:max_tree_sortkey)
+ where message_id = $message(message_id)
+
+
+
+
+
+
+ select message_id, substr(tree_sortkey, 7, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = $message(forum_id)
+ and tree_sortkey between tree.left('$message(tree_sortkey)') and tree.right ('$message(tree_sortkey)')
+ order by tree_sortkey desc
+
+
+
+
+
+
+ update forums_forums
+ set thread_count = :thread_count + 1, approved_thread_count = :approved_thread_count + 1, max_child_sortkey = tree.increment_key(max_child_sortkey), last_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id)
+ where forum_id = :forum_id
+
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id, tree_sortkey = '000000'
+ where message_id = $message(message_id)
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-postgresql.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,44 @@
+
+
+
+ postgresql 7.2
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id,
+ tree_sortkey = tree_increment_key(:max_tree_sortkey)
+ where message_id = $message(message_id)
+
+
+
+
+
+
+ select message_id, substring(tree_sortkey, 9, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey between tree_left('$message(tree_sortkey)') and tree_right ('$message(tree_sortkey)') order by tree_sortkey desc
+
+
+
+
+
+
+ update forums_forums
+ set thread_count = :thread_count + 1, approved_thread_count = :approved_thread_count + 1, max_child_sortkey = tree_increment_key(max_child_sortkey), last_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id)
+ where forum_id = :forum_id
+
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id, tree_sortkey = '00000000'
+ where message_id = $message(message_id)
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-oracle.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,58 @@
+
+
+
+ oracle 8.1.6
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1, max_child_sortkey = tree.increment_key(max_child_sortkey)
+ where message_id = :message_id
+
+
+
+
+
+
+ select message_id as msge_id, substr(tree_sortkey, 13, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree.left('$message(tree_sortkey)') and tree.right('$message(tree_sortkey)')
+ order by tree_sortkey desc
+
+
+
+
+
+
+ select substr(tree_sortkey, 13, length(tree_sortkey)) as final_tree_sortkey, substr(tree_sortkey, 0, 6) as initial_tree_sortkey
+ from forums_messages
+ where message_id = $message(message_id)
+
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree.left((select tree_sortkey from forums_messages where message_id = $father_message_id)) and tree.right((select tree_sortkey from forums_messages where message_id = $father_message_id))
+ )
+ where message_id = $father_message_id
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree.left((select tree_sortkey from forums_messages where message_id = :message_id)) and tree.right((select tree_sortkey from forums_messages where message_id = :message_id))
+ )
+ where message_id = :message_id
+
+
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-postgresql.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,55 @@
+
+
+
+ postgresql 7.2
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1, max_child_sortkey = tree_increment_key(max_child_sortkey)
+ where message_id = :message_id
+
+
+
+
+
+
+ select message_id as msge_id, substring(tree_sortkey, 17, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree_left('$message(tree_sortkey)') and tree_right('$message(tree_sortkey)')
+ order by tree_sortkey desc
+
+
+
+
+
+
+ select substring(tree_sortkey, 17, length(tree_sortkey)) as final_tree_sortkey, substring(tree_sortkey, 0, 9) as initial_tree_sortkey
+ from forums_messages
+ where message_id = $message(message_id)
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree_left((select tree_sortkey from forums_messages where message_id = $father_message_id)) and tree_right((select tree_sortkey from forums_messages where message_id = $father_message_id))
+ )
+ where message_id = $father_message_id
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree_left((select tree_sortkey from forums_messages where message_id = :message_id)) and tree_right((select tree_sortkey from forums_messages where message_id = :message_id))
+ )
+ where message_id = :message_id
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-thread-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-thread-oracle.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,35 @@
+
+
+
+ oracle 8.1.6
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1, max_child_sortkey = tree.increment_key(max_child_sortkey)
+ where message_id = :message_id
+
+
+
+
+
+
+ select message_id as msge_id, substr(tree_sortkey, 7, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey between tree.left('$message(tree_sortkey)') and tree.right('$message(tree_sortkey)')
+ order by tree_sortkey desc
+
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree.left((select tree_sortkey from forums_messages where message_id = :message_id)) and tree.right((select tree_sortkey from forums_messages where message_id = :message_id)))
+ where message_id = :message_id
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-thread-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-thread-postgresql.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+ postgresql 7.2
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1, max_child_sortkey = tree_increment_key(max_child_sortkey)
+ where message_id = :message_id
+
+
+
+
+
+
+ select message_id as msge_id, substring(tree_sortkey, 9, length(tree_sortkey)) as child_tree_sortkey
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey between tree_left('$message(tree_sortkey)') and tree_right('$message(tree_sortkey)') order by tree_sortkey desc
+
+
+
+
+
+ update forums_messages
+ set last_child_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id and tree_sortkey between tree_left((select tree_sortkey from forums_messages where message_id = :message_id)) and tree_right((select tree_sortkey from forums_messages where message_id = :message_id)))
+ where message_id = :message_id
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-thread.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-thread.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+ #forums.Move_thread_to_the_thread# @subject@ #forums.of_forum# @name@
+
+ #forums.Are_you_sure_you_want_to_move_this_message_and_obviously_all_of_its_descendents_lt#
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread-thread.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-thread.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,91 @@
+ad_page_contract {
+
+ Move a thread to other thread of same forum or other forum.
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-29
+
+} {
+ msg_id:integer,notnull
+ selected_message:integer,notnull
+ {confirm_p 0}
+}
+
+set table_border_color [parameter::get -parameter table_border_color]
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $msg_id
+
+# Select the stuff
+forum::message::get -message_id $msg_id -array message
+
+#form to confirm
+ad_form -name confirmed_move -mode {display} -actions [list [list [_ forums.Yes] yes] [list No no] ] -export { msg_id return_url selected_message} -html {enctype multipart/form-data} -form {
+ {data:text(hidden) {value 0}}
+}
+#get the clicked button
+set action [template::form::get_action confirmed_move]
+
+if {$action == "yes"} {
+ set confirm_p 1
+}
+if {$action == "no"} {
+ set confirm_p 2
+}
+
+set message_id $selected_message
+db_0or1row forums::move_thread_thread::get_forum_name { }
+
+# Confirmed
+if {$confirm_p == 1} {
+
+ #update the final message: increase reply_count, approved_reply_count and max_child_sortkey
+ db_dml forums::move_thread_thread::update_final_message {}
+
+ #get the tree_sortkey and max_child_sortkey of final message
+ db_0or1row forums::move_thread_thread::get_father_tree_sortkey {}
+
+ #get all descendents
+ db_foreach forums::move_thread_thread::get_all_child {} {
+ set join_tree_sortkey $father_tree_sortkey
+ append join_tree_sortkey $father_max_child_sortkey
+ append join_tree_sortkey $child_tree_sortkey
+ #update the children's initial message: update tree_sortkey
+ db_dml forums::move_thread_thread::update_child_thread_father {}
+ #update the final message: increase reply_count and approved_reply_count
+ db_dml forums::move_thread_thread::update_final_reply_count {}
+ }
+
+ #update the initial message
+ set join_tree_sortkey $father_tree_sortkey
+ append join_tree_sortkey $father_max_child_sortkey
+ db_dml forums::move_thread_thread::update_thread_father {}
+
+ #update last_child_post final father message
+ db_dml forums::move_thread_thread::update_last_child_post {}
+
+ #update the initial forum: decrease thread_count, approved_thread_count and max_child_sortkey
+ db_0or1row forums::move_thread_thread::select_data_forum_initial {}
+ db_dml forums::move_thread_thread::update_forum_initial {}
+
+
+ #update the final forum
+ db_dml forums::move_thread_thread::update_forums_final {}
+
+ # Redirect to the forum
+ ad_returnredirect "../forum-view?forum_id=$forum_id"
+ ad_script_abort
+}
+
+
+set msg_id $message(message_id)
+set return_url "../message-view"
+
+if {$confirm_p == 2} {
+ ad_returnredirect "../message-view?message_id=$message(message_id)"
+}
+set url_vars [export_url_vars msg_id return_url selected_message]
+
+if {[exists_and_not_null alt_template]} {
+ ad_return_template $alt_template
+}
Index: openacs-4/packages/forums/www/moderate/move-thread-thread.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread-thread.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread-thread.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,79 @@
+
+
+
+
+
+ select ff.name, fm.subject, fm.forum_id
+ from forums_forums ff, forums_messages fm
+ where fm.message_id =:message_id and ff.forum_id=fm.forum_id
+
+
+
+
+
+
+ select tree_sortkey as father_tree_sortkey, max_child_sortkey as father_max_child_sortkey
+ from forums_messages
+ where message_id= :message_id
+
+
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id, tree_sortkey = :join_tree_sortkey
+ where message_id = :msge_id
+
+
+
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1
+ where message_id = :message_id
+
+
+
+
+
+
+ update forums_messages
+ set parent_id = :message_id, tree_sortkey = :join_tree_sortkey, forum_id = :forum_id
+ where message_id = $message(message_id)
+
+
+
+
+
+
+ select ff.max_child_sortkey, ff.thread_count, ff.approved_thread_count
+ from forums_forums ff
+ where ff.forum_id = $message(forum_id)
+
+
+
+
+
+
+ update forums_forums
+ set thread_count = :thread_count - 1, approved_thread_count = :approved_thread_count - 1, last_post = (select max(fm.last_child_post)
+ from forums_messages fm
+ where fm.forum_id = $message(forum_id))
+ where forum_id = $message(forum_id)
+
+
+
+
+
+
+ update forums_forums
+ set last_post = (select max(last_child_post)
+ from forums_messages
+ where forum_id = :forum_id)
+ where forum_id = :forum_id
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ #forums.Move_message_to_thread# @subject@
+
+ #forums.Are_you_sure_you_want_to_move_this_message_and_obviously_all_of_its_descendents_lt#
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move-thread.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,96 @@
+ad_page_contract {
+
+ Move a Message to other thread in the same forum.
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-14
+
+} {
+ msg_id:integer,notnull
+ selected_message:integer,notnull
+ {confirm_p 0}
+}
+
+set table_border_color [parameter::get -parameter table_border_color]
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $msg_id
+
+# Select the stuff
+forum::message::get -message_id $msg_id -array message
+
+#form to confirm
+ad_form -name confirmed_move -mode {display} -actions [list [list [_ forums.Yes] yes] [list No no] ] -export { msg_id return_url selected_message} -html {enctype multipart/form-data} -form {
+ {data:text(hidden) {value 0}}
+}
+#get the clicked button
+set action [template::form::get_action confirmed_move]
+if {$action == "yes"} {
+ set confirm_p 1
+}
+if {$action == "no"} {
+ set confirm_p 2
+}
+
+#information about final message
+db_0or1row forums::move_thread::get_subject_message {}
+
+# Confirmed
+if {$confirm_p == 1} {
+
+ set message_id $selected_message
+
+ #update the final message: increase reply_count, approved_reply_count and max_child_sortkey
+ db_dml forums::move_thread::update_final_message {}
+
+ #get the tree_sortkey of final message
+ db_0or1row forums::move_thread::get_father_tree_sortkey {}
+
+ #update the initial message
+ db_0or1row forums::move_thread::get_final_tree_sortkey {}
+
+ #update the initial father message: decreasing reply_count and approved_reply_count
+ db_0or1row forums::move_thread::get_father_message_id {}
+ db_dml forums::move_thread::update_father_reply_count {}
+
+ #get all descendents
+ db_foreach forums::move_thread::get_all_child {} {
+ #update los ocho primeros d�gitos de tree_sortkey
+ set join_tree_sortkey $father_tree_sortkey
+ append join_tree_sortkey $father_max_child_sortkey
+ append join_tree_sortkey $child_tree_sortkey
+ #update the children's initial message: update tree_sortkey
+ db_dml forums::move_thread::update_child_thread_father {}
+ #update the final message: increasing reply_count and approved_reply_count
+ db_dml forums::move_thread::update_final_reply_count {}
+ #update the initial father message: decreasing reply_count and approved_reply_count
+ db_dml forums::move_thread::update_father_reply_count {}
+ }
+
+ #update the initial message
+ set join_tree_sortkey $father_tree_sortkey
+ append join_tree_sortkey $father_max_child_sortkey
+ db_dml forums::move_thread::update_thread_father {}
+
+ #update the last_child_post final thread and last_child_post initial father thread
+ db_dml forums::move_thread::update_last_child_post_initial {}
+ db_dml forums::move_thread::update_last_child_post_final {}
+
+ # Redirect to the forum
+ ad_returnredirect "../forum-view?forum_id=$message(forum_id)"
+ ad_script_abort
+}
+
+set msg_id $message(message_id)
+set return_url "../message-view"
+
+#if confirm is no
+if {$confirm_p == 2} {
+ ad_returnredirect "../message-view?message_id=$message(message_id)"
+}
+
+set url_vars [export_url_vars msg_id return_url selected_message]
+
+if {[exists_and_not_null alt_template]} {
+ ad_return_template $alt_template
+}
Index: openacs-4/packages/forums/www/moderate/move-thread.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move-thread.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move-thread.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,65 @@
+
+
+
+
+
+ select subject, forum_id
+ from forums_messages
+ where message_id=:selected_message
+
+
+
+
+
+
+ select tree_sortkey as father_tree_sortkey, max_child_sortkey as father_max_child_sortkey
+ from forums_messages
+ where message_id= :message_id
+
+
+
+
+
+ select message_id as father_message_id
+ from forums_messages
+ where forum_id = $message(forum_id) and tree_sortkey = '$initial_tree_sortkey'
+
+
+
+
+
+
+ update forums_messages
+ set reply_count = reply_count - 1, approved_reply_count = approved_reply_count - 1
+ where message_id = $father_message_id
+
+
+
+
+
+
+ update forums_messages
+ set tree_sortkey = :join_tree_sortkey
+ where message_id = :msge_id
+
+
+
+
+
+ update forums_messages
+ set reply_count = reply_count + 1, approved_reply_count = approved_reply_count + 1
+ where message_id = :message_id
+
+
+
+
+
+
+ update forums_messages
+ set parent_id = :message_id, tree_sortkey = :join_tree_sortkey
+ where message_id = $message(message_id)
+
+
+
+
+
\ No newline at end of file
Index: openacs-4/packages/forums/www/moderate/move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ #forums.Move_thread_to_forum# @name@
+
+ #forums.Are_you_sure_you_want_to_move_this_thread_and_obviously_all_of_its_descendents_lt#
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,89 @@
+ad_page_contract {
+
+ Move a thread to other forum.
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-14
+
+} {
+ message_id:integer,notnull
+ selected_forum:integer,notnull
+ {confirm_p 0}
+}
+
+set table_border_color [parameter::get -parameter table_border_color]
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $message_id
+
+# Select the stuff
+forum::message::get -message_id $message_id -array message
+
+#form to confirm if a user want to move the thread
+ad_form -name confirmed_move -mode {display} -actions [list [list [_ forums.Yes] yes] [list No no] ] -export { message_id return_url selected_forum} -html {enctype multipart/form-data} -form {
+ {data:text(hidden) {value 0}}
+}
+#get the clicked button
+set action [template::form::get_action confirmed_move]
+
+if {$action == "yes"} {
+ set confirm_p 1
+}
+if {$action == "no"} {
+ set confirm_p 2
+}
+
+#get the name of forum where the thread will be moved
+db_0or1row get_forum_name "select name from forums_forums where forum_id=:selected_forum"
+
+# Confirmed
+if {$confirm_p == 1} {
+
+ set forum_id $selected_forum
+
+ #update the initial father message: update forum_id and tree_sortkey. If in final forum there is no any thread then tree_sortkey is 0,
+ #else tree_sortkey=tree_sortkey+1
+ db_0or1row forums::move_message::select_num_msg {}
+ if {$num_post == 0 } {
+ db_dml forums::move_message::update_msg {}
+ } else {
+ db_foreach forums::move_message::select_tree_sortkey {} {
+ set max_tree_sortkey $tree_sortkey
+ }
+ db_dml forums::move_message::update_moved_msg {}
+ }
+
+ #get all descendents
+ db_0or1row forums::move_message::select_tree_sortkey_new {}
+ db_foreach forums::move_message::get_all_child {} {
+ set join_tree_sortkey $message_tree_sortkey
+ append join_tree_sortkey $child_tree_sortkey
+ #update children messages: forum_id and tree_sortkey
+ db_dml forums::move_message::update_children {}
+ }
+
+ #update final forum: increase thread_count, approved_thread_count and max_child_sortkey, update last_post
+ db_0or1row forums::move_message::select_new_data_forums_forums {}
+ db_dml forums::move_message::update_forums_final {}
+
+ #update initial forum: decrease thread_count, approved_thread_count and max_child_sortkey, update last_post
+ db_0or1row forums::move_message::select_data_forum_initial {}
+ db_dml forums::move_message::update_forum_initial {}
+
+ # Redirect to the forum
+ ad_returnredirect "../forum-view?forum_id=$forum_id"
+ ad_script_abort
+}
+
+set message_id $message(message_id)
+set return_url "../message-view"
+
+if {$confirm_p == 2} {
+ #if confirm_p is no then return to the message view
+ ad_returnredirect "../message-view?message_id=$message(message_id)"
+}
+set url_vars [export_url_vars message_id return_url selected_forum]
+
+if {[exists_and_not_null alt_template]} {
+ ad_return_template $alt_template
+}
Index: openacs-4/packages/forums/www/moderate/move.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/move.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/move.xql 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,66 @@
+
+
+
+
+
+ select count(forum_id) as num_post
+ from forums_messages
+ where forum_id = :forum_id
+
+
+
+
+
+
+ select tree_sortkey
+ from forums_messages
+ where forum_id = :forum_id and parent_id is null order by tree_sortkey asc
+
+
+
+
+
+
+ select tree_sortkey as message_tree_sortkey
+ from forums_messages
+ where message_id = $message(message_id)
+
+
+
+
+
+ update forums_messages
+ set forum_id = :forum_id, tree_sortkey = :join_tree_sortkey
+ where message_id = :message_id
+
+
+
+
+
+ select ff.max_child_sortkey, ff.thread_count, ff.approved_thread_count
+ from forums_forums ff
+ where ff.forum_id = :forum_id
+
+
+
+
+
+ select ff.max_child_sortkey, ff.thread_count, ff.approved_thread_count
+ from forums_forums ff
+ where ff.forum_id = $message(forum_id)
+
+
+
+
+
+
+ update forums_forums
+ set thread_count = :thread_count - 1, approved_thread_count = :approved_thread_count -1, last_post = (select max(fm.last_child_post)
+ from forums_messages fm
+ where fm.forum_id = $message(forum_id))
+ where forum_id = $message(forum_id)
+
+
+
+
+
Index: openacs-4/packages/forums/www/moderate/thread-move-thread.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/thread-move-thread.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/thread-move-thread.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,5 @@
+
+#forums.Confirm_Move_to# @message.subject;noquote@
+#forums.Move_to#
+
+
Index: openacs-4/packages/forums/www/moderate/thread-move-thread.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/thread-move-thread.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/thread-move-thread.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,20 @@
+ad_page_contract {
+
+ Move a thread to other thread
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-14
+
+} {
+ message_id:integer,notnull
+ {return_url "../message-view"}
+ {confirm_p 0}
+}
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $message_id
+
+# Select the stuff
+forum::message::get -message_id $message_id -array message
+
+ad_return_template
Index: openacs-4/packages/forums/www/moderate/thread-move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/thread-move.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/thread-move.adp 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,5 @@
+
+#forums.Confirm_Move_to# @message.subject;noquote@
+#forums.Move_to#
+
+
Index: openacs-4/packages/forums/www/moderate/thread-move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/thread-move.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/forums/www/moderate/thread-move.tcl 8 Apr 2005 08:28:09 -0000 1.1
@@ -0,0 +1,20 @@
+ad_page_contract {
+
+ Move a thread to other forum
+
+ @author Natalia P�rez (nperper@it.uc3m.es)
+ @creation-date 2005-03-14
+
+} {
+ message_id:integer,notnull
+ {return_url "../message-view"}
+ {confirm_p 0}
+}
+
+# Check that the user can moderate the forum
+forum::security::require_moderate_message -message_id $message_id
+
+# Select the stuff
+forum::message::get -message_id $message_id -array message
+
+ad_return_template