Index: openacs-4/packages/logger/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/apm-callback-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/logger/tcl/apm-callback-procs.tcl 18 Aug 2006 15:39:08 -0000 1.13 +++ openacs-4/packages/logger/tcl/apm-callback-procs.tcl 23 Nov 2006 08:55:58 -0000 1.14 @@ -106,7 +106,7 @@ } } else { # add in the default variable - logger::project::map_variable -project_id $logger_project -variable_id [logger::variable::get_default_variable_id] + logger::project::map_variable -project_id $logger_project -variable_id [logger::variable::get_default_variable_id -package_id $package_id] } # we want the logger project to show up in logger! @@ -173,7 +173,7 @@ if {[exists_and_not_null callback_data(variables)]} { logger::project::remap_variables -project_id $logger_project -new_variable_list $callback_data(variables) } else { - logger::project::remap_variables -project_id $logger_project -new_variable_list [logger::variable::get_default_variable_id] + logger::project::remap_variables -project_id $logger_project -new_variable_list [logger::variable::get_default_variable_id -package_id $package_id] } } 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 {}] }