Index: openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-oracle.xql 20 Jul 2001 06:27:31 -0000 1.2
+++ openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-oracle.xql 25 Aug 2001 06:14:48 -0000 1.3
@@ -15,5 +15,23 @@
+
+
+
+
+ select $audit_table_name.*,
+ $audit_table_name.rowid,
+ to_char($audit_table_name.last_modified,
+ 'Mon DD, YYYY HH12:MI AM') as last_modified,
+ users.first_names || ' ' || users.last_name
+ as modifying_user_name
+ from $audit_table_name, cc_users users
+ where users.user_id = $audit_table_name.last_modifying_user $audit_table_id_clause $date_clause
+ order by $audit_table_name.last_modified asc
+
+
+
+
+
Index: openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-postgresql.xql 20 Jul 2001 06:27:31 -0000 1.2
+++ openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs-postgresql.xql 25 Aug 2001 06:14:48 -0000 1.3
@@ -15,5 +15,22 @@
+
+
+
+ select $audit_table_name.*,
+ $audit_table_name.oid as rowid,
+ to_char($audit_table_name.last_modified,
+ 'Mon DD, YYYY HH12:MI AM') as last_modified,
+ users.first_names || ' ' || users.last_name
+ as modifying_user_name
+ from $audit_table_name, cc_users users
+ where users.user_id = $audit_table_name.last_modifying_user $audit_table_id_clause $date_clause
+ order by $audit_table_name.last_modified asc
+
+
+
+
+
Index: openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs.tcl 18 Jul 2001 23:46:14 -0000 1.3
+++ openacs-4/packages/ecommerce/tcl/ec-audit-trail-procs.tcl 25 Aug 2001 06:14:48 -0000 1.4
@@ -140,17 +140,18 @@
# Get the entries in the audit table
- set sql "
- select $audit_table_name.*,
- $audit_table_name.rowid,
- to_char($audit_table_name.last_modified,
- 'Mon DD, YYYY HH12:MI AM') as last_modified,
- users.first_names || ' ' || users.last_name
- as modifying_user_name
- from $audit_table_name, cc_users users
- where users.user_id = $audit_table_name.last_modifying_user $audit_table_id_clause $date_clause
- order by $audit_table_name.last_modified asc
- "
+ set sql [db_map get_entries_sql]
+# set sql "
+# select $audit_table_name.*,
+# $audit_table_name.rowid,
+# to_char($audit_table_name.last_modified,
+# 'Mon DD, YYYY HH12:MI AM') as last_modified,
+# users.first_names || ' ' || users.last_name
+# as modifying_user_name
+# from $audit_table_name, cc_users users
+# where users.user_id = $audit_table_name.last_modifying_user $audit_table_id_clause $date_clause
+# order by $audit_table_name.last_modified asc
+# "
# ns_log Notice "AUDIT SQL: $sql"
@@ -178,7 +179,11 @@
# iterates over selection
set loop 0
db_with_handle db {
- set selection [ns_ora select $db -bind $audit_bind_vars $sql]
+ if [string match [db_type] "oracle"] {
+ set selection [ns_ora select $db -bind $audit_bind_vars $sql]
+ } elseif [string match [db_type] "postgresql"] {
+ set selection [ns_pg_bind select $db -bind $audit_bind_vars $sql]
+ }
while { [ns_db getrow $db $selection] } {
ec_audit_process_row
append return_string $audit_entry
@@ -205,7 +210,11 @@
# what is in the rows we're getting back. ec_audit_process_row
# iterates over selection
db_with_handle db {
- set selection [ns_ora select $db -bind $main_bind_vars $sql]
+ if [string match [db_type] "oracle"] {
+ set selection [ns_ora select $db -bind $main_bind_vars $sql]
+ } elseif [string match [db_type] "postgresql"] {
+ set selection [ns_pg_bind select $db -bind $main_bind_vars $sql]
+ }
while { [ns_db getrow $db $selection] } {
ec_audit_process_row
append return_string $audit_entry