Index: openacs-4/packages/wiki/wiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/wiki.info,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wiki/wiki.info 22 Feb 2005 16:15:13 -0000 1.2 +++ openacs-4/packages/wiki/wiki.info 13 Jun 2005 09:48:50 -0000 1.3 @@ -7,12 +7,15 @@ f f - + Dave Bauer + Frank Bergmann Wiki Wiki implementation on the CR - + + + Index: openacs-4/packages/wiki/lib/footer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/footer.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wiki/lib/footer.adp 22 Feb 2005 16:15:13 -0000 1.3 +++ openacs-4/packages/wiki/lib/footer.adp 13 Jun 2005 09:48:50 -0000 1.4 @@ -1,5 +1,16 @@ - -Help - | Edit - + + [Home] + | [Help] + | [Categories] + + + | [Edit This Page] + + + + | [Admin] + | [Changes] + + + Index: openacs-4/packages/wiki/lib/footer.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/footer.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wiki/lib/footer.tcl 22 Feb 2005 16:15:13 -0000 1.2 +++ openacs-4/packages/wiki/lib/footer.tcl 13 Jun 2005 09:48:50 -0000 1.3 @@ -5,3 +5,7 @@ set edit_link_p "f" } +if {![exists_and_not_null admin_p]} { + set admin_p "f" +} + Index: openacs-4/packages/wiki/lib/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/new.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wiki/lib/new.tcl 22 Feb 2005 16:15:13 -0000 1.3 +++ openacs-4/packages/wiki/lib/new.tcl 13 Jun 2005 09:48:50 -0000 1.4 @@ -5,6 +5,8 @@ item_id:integer,optional } +if {"" == $name} { ad_return_complaint 1 "name is empty" } + set folder_id [wiki::get_folder_id] set user_id [ad_conn user_id] set ip_address [ad_conn peeraddr] @@ -19,18 +21,30 @@ set edit "" ad_form -name new -action "new" -export {name edit} -form { item_id:key - title:text - content:text(textarea) - revision_notes:text(textarea),optional - + {title:text {label "Title"} {html {size 60}}} + {content:text(textarea),optional,nospell {label "Content"} {html {rows 15 cols 60}}} + {revision_notes:text(textarea),optional,nospell {label "Revision Notes"} {html {rows 5 cols 60}}} + } -edit_request { # content::item::get -item_id $item_id - db_1row get_item "select cr_items.item_id, title, content from cr_items, cr_revisions where name=:name and parent_id=:folder_id and latest_revision=revision_id" - + db_1row get_item " + select + cr_items.item_id, + title, + content + from + cr_items, + cr_revisions + where + name=:name + and parent_id=:folder_id + and latest_revision=revision_id + " + } -new_data { - content::item::new \ + set item_id [content::item::new \ -name $name \ -parent_id $folder_id \ -creation_user $user_id \ @@ -40,9 +54,8 @@ -description $revision_notes \ -is_live "t" \ -storage_type "text" \ - -mime_type "text/x-openacs-wiki" + -mime_type "text/x-openacs-wiki"] - } -edit_data { content::revision::new \ @@ -51,16 +64,34 @@ -content $content \ -description $revision_notes - db_dml set_live "update cr_items set live_revision=latest_revision where item_id=:item_id" +# fraber: After discussion with Dave: Let's use "live_version" to indicated an approved +# version and use the latest_version for display. +# db_dml set_live "update cr_items set live_revision=latest_revision where item_id=:item_id" } -after_submit { + # do something clever with internal refs set stream [Wikit::Format::TextToStream $content] set refs [Wikit::Format::StreamToRefs $stream "wiki::get_info"] if {![llength $refs]} { set refs [list ""] } - db_foreach get_ids "select ci.item_id as ref_item_id from cr_items ci left join cr_item_rels cr on (cr.related_object_id=:item_id) where ci.parent_id=:folder_id and ci.name in ([template::util:::tcl_to_sql_list $refs]) and cr.rel_id is null" { + + ns_log Notice "/wiki/lib/new.tcl: refs=$refs" + + db_foreach get_ids " + select + ci.item_id as ref_item_id + from + cr_items ci left join cr_item_rels cr on (cr.related_object_id=:item_id) + where + ci.parent_id = :folder_id + and ci.name in ([template::util:::tcl_to_sql_list $refs]) + and cr.rel_id is null + " { + + ns_log Notice "/wiki/lib/new.tcl: content::item::relate: item_id=$item_id, ref_item_id=$ref_item_id, relation_tag=wiki_reference" + content::item::relate \ -item_id $item_id \ -object_id $ref_item_id \ Index: openacs-4/packages/wiki/lib/page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/page.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wiki/lib/page.adp 22 Feb 2005 16:15:13 -0000 1.3 +++ openacs-4/packages/wiki/lib/page.adp 13 Jun 2005 09:48:50 -0000 1.4 @@ -3,13 +3,24 @@ @header_stuff@ @context@ @focus@ + + + + +@title@ + @content;noquote@ -Pages that link to his page: + +Pages that link to his page: + - @related_items.title@ - - - - + @related_items.title@ + + + + + + + Index: openacs-4/packages/wiki/lib/page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/page.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wiki/lib/page.tcl 22 Feb 2005 16:15:13 -0000 1.3 +++ openacs-4/packages/wiki/lib/page.tcl 13 Jun 2005 09:48:50 -0000 1.4 @@ -5,8 +5,8 @@ revision_id:optional } -# -# + + # Show or edit wiki pages # # @author Dave Bauer (dave@thedesignexperience.org) @@ -16,7 +16,7 @@ set folder_id [wiki::get_folder_id] set name [ad_conn path_info] -if {$name eq ""} { +if {$name == ""} { # the path resolves directly to a site node set name "index" } @@ -51,21 +51,67 @@ } -db_1row get_content "select content,title from cr_revisions, cr_items where revision_id=live_revision and cr_items.item_id=:item_id" +if {![info exists revision_id]} { + db_1row get_content " + select + content, + title + from + cr_revisions, + cr_items + where + revision_id = latest_revision + and cr_items.item_id=:item_id + " +} else { + db_1row get_content " + select + content, + title + from + cr_revisions + where + revision_id = :revision_id + " +} + set stream [Wikit::Format::TextToStream $content] set refs [Wikit::Format::StreamToRefs $stream "wiki::get_info"] -db_multirow related_items get_related_items "select cr.name, cr.title, cr.description from cr_revisionsx cr, cr_items ci, cr_item_rels cir where cir.related_object_id=:item_id and cir.relation_tag='wiki_reference' and ci.live_revision=cr.revision_id and ci.item_id=cir.item_id" +db_multirow related_items get_related_items " + select distinct + cr.name, + cr.title, + cr.description + from + cr_revisionsx cr, + cr_items ci, + cr_item_rels cir + where + cir.related_object_id=:item_id + and cir.relation_tag='wiki_reference' + and ci.live_revision=cr.revision_id + and ci.item_id=cir.item_id +" + set content [ad_wiki_text_to_html $content "wiki::get_info"] set context [list $title] set focus "" set header_stuff "" +set page_title $title set edit_link_p [permission::permission_p \ -object_id $item_id \ -party_id [ad_conn user_id] \ -privilege "write" ] -ad_return_template "page" +set edit_link_p "t" + +set admin_p [permission::permission_p \ + -object_id $folder_id \ + -party_id [ad_conn user_id] \ + -privilege "admin" + ] + Index: openacs-4/packages/wiki/sql/postgresql/wiki-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/sql/postgresql/wiki-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wiki/sql/postgresql/wiki-create.sql 6 Jan 2005 23:38:47 -0000 1.2 +++ openacs-4/packages/wiki/sql/postgresql/wiki-create.sql 13 Jun 2005 09:48:50 -0000 1.3 @@ -2,10 +2,18 @@ -- -- -- @author Dave Bauer (dave@thedesignexperience.org) +-- @author Frank Bergmann (frank.bergmann@project-open.com) -- @creation-date 2004-09-06 -- @arch-tag: 0d6b6723-0e95-4c00-8a84-cb79b4ad3f9d -- @cvs-id $Id$ -- +-- there seems to be an error in CMS 4.1.x with +-- the view "cr_revisioni". This error seems to be due +-- to the fact that the content type "content_revision" hasn't +-- been created correctly. Strange stuff... +-- +select content_type__refresh_view ('content_revision'); + insert into cr_mime_types values ('Text - Wiki','text/x-openacs-wiki',''); insert into cr_mime_types values ('Text - Markdown','text/x-openacs-markdown',''); \ No newline at end of file Index: openacs-4/packages/wiki/tcl/wiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/tcl/wiki-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wiki/tcl/wiki-procs.tcl 22 Feb 2005 16:15:13 -0000 1.3 +++ openacs-4/packages/wiki/tcl/wiki-procs.tcl 13 Jun 2005 09:48:50 -0000 1.4 @@ -35,11 +35,25 @@ # ref doesn't exist yet # this sucks we have to hammer the databse for every link set package_id [ad_conn package_id] - set d [db_string get_lm "select o.last_modified from acs_objects o, cr_items ci, cr_folders cf where cf.package_id=:package_id and ci.parent_id=cf.folder_id and ci.name=:ref and o.object_id=ci.item_id" -default ""] + set d [db_string get_lm " + select + o.last_modified + from + acs_objects o, + cr_items ci, + cr_folders cf + where + cf.package_id = :package_id + and ci.parent_id = cf.folder_id + and ci.name = :ref + and o.object_id = ci.item_id + " -default ""] + set ret [list "${ref}" "${ref}" "$d"] + ns_log debug " DB -------------------------------------------------------------------------------- -DB DAVE debugging procedure wiki::info +DB DAVE debugging procedure wiki::get_info DB -------------------------------------------------------------------------------- DB ref = '${ref}' DB ret = '${ret}' @@ -68,7 +82,7 @@ } { # should really map site_nodes to cr_folders, but I # want to see what can be done with stock OpenACS - if {$package_id eq ""} { + if {$package_id == ""} { if {[ad_conn -connected_p]} { set package_id [ad_conn package_id] } else { @@ -102,7 +116,8 @@ @creation-date 2004-09-03 } { set stream [Wikit::Format::TextToStream $text] -# wiki::info will find the parent site node of a reference, and + + # wiki::info will find the parent site node of a reference, and # look for a proc called package-key::wiki_info which should # return the id, name, modified date of the item # (i think id means "url" but I might be wrong!) @@ -135,7 +150,7 @@ set ret [list "${ref}" "${ref}" "1"] # ns_log debug " #DB -------------------------------------------------------------------------------- -#DB DAVE debugging procedure wiki::info +#DB DAVE debugging procedure wiki::ad_wiki_info #DB -------------------------------------------------------------------------------- #DB ref = '${ref}' #DB ret = '${ret}' Index: openacs-4/packages/wiki/www/admin/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/index-oracle.xql 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,117 @@ + + + + oracle8.1.6 + + + + + select + r.item_id, v.title, last_modified + from + cr_resolved_items r, cr_items i, cr_folders f, cr_revisions v, + cr_revisions u, acs_objects o + where + r.parent_id = :parent_id + and + r.resolved_id = i.item_id + and + i.item_id = o.object_id + and + i.latest_revision = v.revision_id (+) + and + i.live_revision = u.revision_id (+) + and + i.item_id = f.folder_id (+) + [template::list::orderby_clause -name folder_items -orderby] + + + + + + + + select + r.item_id, r.item_id as id, v.revision_id, r.resolved_id, r.is_symlink, + r.name, i.parent_id, i.content_type, i.publish_status, u.publish_date, + NVL(trim( + decode(o.object_type, 'content_symlink', r.label, + 'content_folder', f.label, + nvl(v.title, i.name))), + '-') title, + o.object_type, t.pretty_name as pretty_content_type, last_modified, + v.content_length + from + cr_resolved_items r, cr_items i, cr_folders f, cr_revisions v, + cr_revisions u, acs_objects o, acs_object_types t + where + r.parent_id = :parent_id + and + r.resolved_id = i.item_id + and + i.item_id = o.object_id + and + i.content_type = t.object_type + and + i.latest_revision = v.revision_id (+) + and + i.live_revision = u.revision_id (+) + and + i.item_id = f.folder_id (+) + and + [template::list::page_where_clause -and -name folder_items -key r.item_id] + [template::list::orderby_clause -name folder_items -orderby] + + + + + + + + select content_symlink.resolve( :item_id ) from dual + + + + + + + + + select content_folder.get_index_page(:parent_id) from dual + + + + + + + + + select + i.item_id id, + content_item.get_path(i.item_id) path + from + cr_items i, cr_symlinks s + where + i.item_id = s.target_id + and + i.item_id = :original_id + + + + + + + + select + parent_id, NVL(label, name) label, description + from + cr_items i, cr_folders f + where + i.item_id = f.folder_id + and + f.folder_id = :item_id + + + + + Index: openacs-4/packages/wiki/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/index-postgresql.xql 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,141 @@ + + + + postgresql7.1 + + + + + select + r.item_id, v.title, last_modified + from + cr_items i + LEFT OUTER JOIN + cr_revisions v ON i.latest_revision = v.revision_id + LEFT OUTER JOIN + cr_revisions u ON i.live_revision = u.revision_id + LEFT OUTER JOIN + cr_folders f ON i.item_id = f.folder_id, + cr_resolved_items r, acs_objects o + where + r.parent_id = $parent_var + and + r.resolved_id = i.item_id + and + i.item_id = o.object_id + [template::list::orderby_clause -name folder_items -orderby] + + + + + + + + + + + + select + r.item_id, + r.item_id as id, + + v.revision_id as latest_revision_id, + v.content_length, + v.content_length as latest_length, + v.publish_date as latest_publish_date, + ro.creation_user as latest_creation_user, + + u.revision_id as live_revision_id, + u.publish_date as live_publish_date, + u.content_length as live_length, + + r.resolved_id, + r.is_symlink, + r.name, + + i.parent_id, + i.content_type, + i.publish_status, + t.pretty_name as pretty_content_type, + o.last_modified, + coalesce(trim( + case + when i.content_type = 'content_symlink' then r.label + when i.content_type = 'content_folder' then f.label + else coalesce(v.title, i.name) + end + ),'-') as title + from + cr_items i + LEFT OUTER JOIN + cr_revisions v ON i.latest_revision = v.revision_id + LEFT OUTER JOIN + cr_revisions u ON i.live_revision = u.revision_id + LEFT OUTER JOIN + cr_folders f ON i.item_id = f.folder_id, + cr_resolved_items r, acs_objects o, acs_object_types t, acs_objects ro + where + r.parent_id = $parent_var + $modified_only_where + and r.resolved_id = i.item_id + and i.item_id = o.object_id + and v.revision_id = ro.object_id + and i.content_type = t.object_type + [template::list::page_where_clause -and -name folder_items -key r.item_id] + [template::list::orderby_clause -name folder_items -orderby] + + + + + + + + + select content_symlink__resolve( :folder_id ) + + + + + + + + + select content_folder__get_index_page($parent_var) + + + + + + + + + select + i.item_id as id, + content_item__get_path(i.item_id, null) as path + from + cr_items i, cr_symlinks s + where + i.item_id = s.target_id + and + i.item_id = :original_folder_id + + + + + + + + select + parent_id, coalesce(label, name) as label, description + from + cr_items i, cr_folders f + where + i.item_id = f.folder_id + and + f.folder_id = :folder_id + + + + + + Index: openacs-4/packages/wiki/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/index.adp 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,8 @@ + +@page_title@ + + + + + + Index: openacs-4/packages/wiki/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/index.tcl 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,197 @@ +ad_page_contract { + List contents of a folder + List path of this folder + List path of any symlinks to this folder + + + @author Michael Steigman + @author Frank Bergmann (frank.bergmann@project-open.com) + @creation-date April 2005 +} { + folder_id:integer + { mount_point "sitemap" } + { parent_id:integer ""} + { orderby "latest_publish_date,desc" } + { page:optional } + { modified_only 0 } +} + +set original_folder_id $folder_id +set user_id [auth::require_login] +set root_id [cm::modules::${mount_point}::getRootFolderID] +set return_url "[ad_conn url]?[ad_conn query]" +set parent_var :folder_id + +permission::require_permission -party_id $user_id \ + -object_id $folder_id -privilege admin + + +# Where in the site map did we mount this wiki package? +# (The package may be mounted several times) + +set wiki_mount_sql " + select + sn.name as wiki_mount + from + apm_packages ap, + cr_folders cf, + site_nodes sn + where + cf.folder_id = :folder_id + and ap.package_id = cf.package_id + and sn.object_id = ap.package_id +" + +db_1row wiki_mount $wiki_mount_sql + + + +# Show only the modified items? +set modified_only_where "" +if {$modified_only} { + set modified_only_where "\tand i.latest_revision != i.live_revision\n" +} + + +# Resolve the symlink, if any +set resolved_id [db_string get_resolved_id ""] + +if { $resolved_id != $folder_id } { + set is_symlink t + set item_id $resolved_id + set what "Link" +} else { + set is_symlink f + set what "Folder" +} + + +db_1row get_info "" -column_array info +if { $info(parent_id) == 0 } { + # at root; this will change once inheritance is set up for modules + set parent_id "" +} else { + set parent_id $info(parent_id) +} + + +# Get the index page ID +set index_page_id [db_string get_index_page_id ""] + +set page_title "$info(label)" + +# set actions "Attributes [export_vars -base attributes?mount_point=sitemap {folder_id}] \"Folder Attributes\"" +set actions [list] + +template::list::create \ + -name folder_items \ + -multirow folder_contents \ + -has_checkboxes \ + -key item_id \ + -page_size 50 \ + -page_query_name get_folder_contents_paginate \ + -actions $actions \ + -elements { + title { + label "Name" + link_html { title "View this item"} + link_url_col cms_admin_url + orderby title + } + + live_preview { + label "Conf. Prev" + link_html { title "View the latest confirmed version of this item"} + link_url_col live_preview_url + } + latest_preview { + label "New Prev" + link_html { title "View the latest version of this item"} + link_url_col latest_preview_url + } + + live_size { + label "Conf. Size" + } + latest_size { + label "New Size" + } + + live_publish_date { + label "Conf. Date" + display_eval { [lc_time_fmt $live_publish_date "%y-%m-%d"] } + orderby u.publish_date + } + latest_publish_date { + label "New Date" + display_eval { [lc_time_fmt $latest_publish_date "%y-%m-%d"] } + orderby v.publish_date + } + + latest_creation_user { + label "Mod. by" + link_html { title "More information about this user"} + link_url_col latest_creation_user_url + } + cancel_action { + label "Revert" + link_html { title "Revert to last confirmed value"} + link_url_col cancel_action_url + } + confirm_action { + label "Confirm" + link_html { title "Confirm the new revision"} + link_url_col confirm_action_url + } + } \ + -filters { + folder_id {} + parent_id {} + mount_point {} + } + +db_multirow -extend { item_url latest_size live_size cancel_action confirm_action cancel_action_url confirm_action_url live_preview latest_preview live_preview_url latest_preview_url cms_admin_url latest_creation_user_url } folder_contents get_folder_contents "" { + + set cancel_action "Revert" + set cancel_action_url [export_vars -base "update_latest_revision?item_id=$item_id&revision_id=$live_revision_id" { return_url} ] + + set confirm_action "Confirm" + set confirm_action_url [export_vars -base "update_live_revision?item_id=$item_id&revision_id=$latest_revision_id" { return_url} ] + + set latest_preview "New" + set latest_preview_url "/$wiki_mount/[ns_urlencode $name]" + + set live_preview "Confirmed" + set live_preview_url "/$wiki_mount/[ns_urlencode $name]?revision_id=$live_revision_id" + + set cms_admin_url "/cms/modules/items/index?item_id=$item_id" + + set latest_creation_user_url "/intranet/users/view?user_id=$latest_creation_user" + + switch $content_type { + content_folder { + set folder_id $item_id + set item_url [export_vars -base index?mount_point=sitemap { folder_id parent_id }] + } + default { + set item_url [export_vars -base /$wiki_mount/[ns_urlencode $name]] + } + } + + if { ![ template::util::is_nil content_length ] } { + set live_size [lc_numeric [expr $live_length / 1000.00] "%.2f"] + } else { + set live_size "-" + } + + if { ![ template::util::is_nil content_length ] } { + set latest_size [lc_numeric [expr $latest_length / 1000.00] "%.2f"] + } else { + set latest_size "-" + } + +} + + + +# set item_url [export_vars -base /cms/modules/items/index?mount_point=sitemap { item_id revision_id parent_id }] Index: openacs-4/packages/wiki/www/admin/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/index.xql 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,50 @@ + + + + + + + select module_id from cm_modules where key = 'sitemap' + + + + + + + + select name from cm_modules where key = :mount_point + + + + + + + + + select + content_type + from + cr_folder_type_map + where + folder_id = :root_id + + + + + + + + + + select + content_type + from + cr_folder_type_map + where + folder_id = :folder_id + + + + + + Index: openacs-4/packages/wiki/www/admin/update_latest_revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/update_latest_revision.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/update_latest_revision.tcl 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,24 @@ +ad_page_contract { + Update the cr_revision of a content item + + @author Frank Bergmann (frank.bergmann@project-open.com) + @creation-date April 2005 +} { + item_id:integer + revision_id:integer + return_url +} + +set user_id [auth::require_login] +permission::require_permission -party_id $user_id \ + -object_id $item_id -privilege admin + + +db_dml update_revision " + update cr_items + set latest_revision = :revision_id + where item_id = :item_id +" + +ad_returnredirect $return_url + Index: openacs-4/packages/wiki/www/admin/update_live_revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/www/admin/Attic/update_live_revision.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/wiki/www/admin/update_live_revision.tcl 13 Jun 2005 09:50:05 -0000 1.1 @@ -0,0 +1,24 @@ +ad_page_contract { + Update the cr_revision of a content item + + @author Frank Bergmann (frank.bergmann@project-open.com) + @creation-date April 2005 +} { + item_id:integer + revision_id:integer + return_url +} + +set user_id [auth::require_login] +permission::require_permission -party_id $user_id \ + -object_id $item_id -privilege admin + + +db_dml update_revision " + update cr_items + set live_revision = :revision_id + where item_id = :item_id +" + +ad_returnredirect $return_url +
Pages that link to his page: + +Pages that link to his page: + - @related_items.title@ - -