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.9 -r1.10 --- openacs-4/packages/logger/tcl/variable-procs.tcl 27 Jul 2005 16:13:12 -0000 1.9 +++ openacs-4/packages/logger/tcl/variable-procs.tcl 23 Nov 2006 08:55:58 -0000 1.10 @@ -118,7 +118,7 @@ } ad_proc -public logger::variable::get_default_variable_id { - {-package_id {}} + {-package_id ""} } { Get the ID of the default (first) variable. } { @@ -128,12 +128,12 @@ if { ![empty_string_p $package_id] } { # Get the default variable of the first active project in the given package set primary_variables [db_list select_first_project_primary_variable {}] - + # Just the first set variable_id [lindex $primary_variables 0] } - if { [empty_string_p $variable_id] } { + if { [exists_and_not_null variable_id] } { # Just get the first ever variable, most likely "Time" set variable_id [db_string select_first_variable_id {} -default {}] }