Index: openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs-postgresql.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs-postgresql.xql 27 Oct 2003 10:09:10 -0000 1.5
+++ openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs-postgresql.xql 9 Feb 2004 14:48:44 -0000 1.6
@@ -32,7 +32,7 @@
- select x.revision_id, x.name, x.title, x.description, p.first_names, p.last_name,
+ select x.item_id, x.revision_id, x.name, x.title, x.description, p.first_names, p.last_name,
to_char(x.last_modified,'HH:MI AM MM/DD/YYYY') as creation_date, l.live_revision_id
from ${table_name}x x, persons p, (select content_item__get_live_revision(:item_id) as live_revision_id) l
where x.creation_user = p.person_id
@@ -43,7 +43,7 @@
- select content_revision__copy(:revision_id, null, null, :creation_user_id, :creation_ip)
+ select content_revision__copy(:revision_id, null, null, :creation_user, :creation_ip)
Index: openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.tcl 12 Nov 2003 17:05:06 -0000 1.16
+++ openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.tcl 9 Feb 2004 14:48:44 -0000 1.17
@@ -20,8 +20,8 @@
{-mime_type "text/plain"}
{-description ""}
{-content ""}
- {-creation_user_id}
- {-creation_ip}
+ {-creation_user ""}
+ {-creation_ip ""}
{-additional_properties}
} {
Adds a new revision, you pass additional properties/columns for your custom
@@ -33,16 +33,14 @@
@param mime_type mime type of this revision
@param description description of the revision
@param content content of the revision
- @param creation_user_id user_id creating this item
- @param creation_user_ip ip address which this item is created
+ @param creation_user user_id creating this item
+ @param creation_ip ip address which this item is created
@param additional_properites A list of properties / columns to insert format: { { property value } ... { property value } }
{property:noquote value} will directly use what is in value.
Use [list [list prop1 $val1] [list $prop2 $val2]] to generate.
@returns revision_id of newly created revision
} {
- if {![info exists creation_user_id]} { set creation_user_id [ad_conn user_id] }
- if {![info exists creation_ip]} { set creation_ip [ad_conn peeraddr] }
if { [exists_and_not_null additional_properties] } {
set addtnl_properties ", [bcms::parse_properties -properties $additional_properties -return_format insert_columns]"
@@ -74,7 +72,7 @@
{-description ""}
{-upload_file:required}
{-mime_type}
- {-creation_user_id}
+ {-creation_user}
{-creation_ip}
{-additional_properties}
} {
@@ -87,12 +85,12 @@
@param mime_type mime type of this revision
@param description description of the revision
@param upload_file a 'file' form builder datatype
- @param creation_user_id user_id creating this item
- @param creation_user_ip ip address which this item is created
+ @param creation_user user_id creating this item
+ @param creation_ip ip address which this item is created
@param additional_properites a list of additional properties / columns to insert format: {property value ... property value}
{property:noquote value} will directly use what is value
} {
- if { ![info exists creation_user_id] } { set creation_user_id [ad_conn user_id] }
+ if { ![info exists creation_user] } { set creation_user_id [ad_conn user_id] }
if { ![info exists creation_ip] } { set creation_ip [ad_conn peeraddr] }
if { ![info exists content_type] } {
@@ -295,7 +293,6 @@
@param revision_id revision id to change the status
@param status the the status to this value, currently accepted are live and production
} {
-
switch -exact $status {
"live" {db_exec_plsql set_live {}}
"production" {db_exec_plsql unset_live {}}
Index: openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.xql 6 Nov 2003 15:33:20 -0000 1.6
+++ openacs-4/contrib/packages/bcms/tcl/bcms-revision-procs.xql 9 Feb 2004 14:48:44 -0000 1.7
@@ -6,15 +6,15 @@
insert into ${table_name}i
(revision_id, object_type, creation_user, creation_date, creation_ip, title, description, item_id, text, mime_type $addtnl_properties)
- values (:revision_id, :content_type, :creation_user_id, now(), :creation_ip, :title, :description, :item_id, :content, :mime_type $addtnl_values)
+ values (:revision_id, :content_type, :creation_user, current_timestamp, :creation_ip, :title, :description, :item_id, :content, :mime_type $addtnl_values)
insert into ${table_name}i
(object_type, creation_user, creation_date, creation_ip, title, description, item_id, revision_id, text, mime_type $addtnl_properties)
- values (:content_type, :creation_user_id, now(), :creation_ip, :title, :description, :item_id, :revision_id, :content, :mime_type $addtnl_values)
+ values (:content_type, :creation_user, now(), :creation_ip, :title, :description, :item_id, :revision_id, :content, :mime_type $addtnl_values)
@@ -37,7 +37,7 @@
select i.item_id, i.name, i.parent_id, r.title, r.description, r.content,
- i.content_type, i.publish_status, i.live_revision, i.latest_revision, i.storage_type $addtnl_select
+ i.content_type, i.publish_status, i.live_revision, i.latest_revision, i.storage_type, r.mime_type, r.publish_date $addtnl_select
from cr_revisions r, cr_items i $addtnl_from
where r.revision_id = :revision_id
and i.item_id = r.item_id $addtnl_where