Index: openacs-4/packages/logger/tcl/variable-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/variable-procs-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/logger/tcl/variable-procs-oracle.xql 6 May 2003 17:36:31 -0000 1.2
+++ openacs-4/packages/logger/tcl/variable-procs-oracle.xql 29 Sep 2003 10:21:51 -0000 1.3
@@ -26,5 +26,15 @@
end;
-
+
+
+
+ select q.*
+ from (select variable_id
+ from logger_variables
+ order by variable_id)
+ where rownum = 1
+
+
+
Index: openacs-4/packages/logger/tcl/variable-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/variable-procs-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/logger/tcl/variable-procs-postgresql.xql 8 May 2003 13:54:59 -0000 1.2
+++ openacs-4/packages/logger/tcl/variable-procs-postgresql.xql 29 Sep 2003 10:21:52 -0000 1.3
@@ -23,4 +23,13 @@
+
+
+ select variable_id
+ from logger_variables
+ order by variable_id
+ limit 1
+
+
+
Index: openacs-4/packages/logger/tcl/variable-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/variable-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/logger/tcl/variable-procs.tcl 1 May 2003 14:14:33 -0000 1.6
+++ openacs-4/packages/logger/tcl/variable-procs.tcl 29 Sep 2003 10:21:52 -0000 1.7
@@ -113,3 +113,9 @@
db_1row select_variable {} -column_array variable_array
}
+
+ad_proc -public logger::variable::get_default_variable_id {} {
+ Get the ID of the default (first) variable.
+} {
+ return [db_string select_first_variable_id {} -default {}]
+}
Index: openacs-4/packages/logger/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/logger/www/index.tcl 27 Sep 2003 22:19:42 -0000 1.13
+++ openacs-4/packages/logger/www/index.tcl 29 Sep 2003 10:21:52 -0000 1.14
@@ -7,7 +7,7 @@
@cvs-id $Id$
} {
entry_id:integer,optional
- {variable_id:integer,optional {[db_string first_variable_id { select variable_id from logger_variables order by variable_id limit 1 } -default {}]}}
+ {variable_id:integer,optional {[logger::variable::get_default_variable_id]}}
project_id:integer,optional
user_id:integer,optional
{time_stamp:multiple,optional {[clock format [clock scan "-[clock format [clock seconds] -format %w] days"] -format "%Y-%m-%d"] [clock format [clock scan "[expr 6-[clock format [clock seconds] -format %w]] days"] -format "%Y-%m-%d"]}}