Index: openacs-4/packages/ecommerce/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/ecommerce/www/index.tcl 28 Apr 2008 14:46:26 -0000 1.9 +++ openacs-4/packages/ecommerce/www/index.tcl 30 Apr 2008 10:43:42 -0000 1.10 @@ -43,10 +43,10 @@ # perhaps the old update was an attempt to fix the lose cart on register? anyway # that is solved correctly now -# TODO: test if this can be removed entirely +# TODO: improve session cleanup and add to all pages if { $user_is_logged_on && $user_session_id ne "0"} { - if {[db_string check_session_user_id "select user_id from ec_user_sessions where user_session_id = :user_session_id"] != $user_session_id} { - set $user_session_id 0 ; # which will force creation of a new session below + if {[db_string check_session_user_id "select user_id from ec_user_sessions where user_session_id = :user_session_id" -default 0] != $user_id} { + set user_session_id 0 ; # which will force creation of a new session below } } @@ -59,7 +59,7 @@ # for saving computing SSL resources only when necessary set base_url "[ec_insecurelink [ad_conn url]]" -if [ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] { +if {[ad_parameter -package_id [ec_id] UserClassApproveP ecommerce] ne ""} { set user_class_approved_p_clause "and user_class_approved_p = 't'" } else { set user_class_approved_p_clause ""