Index: openacs-4/packages/acs-admin/lib/password-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/lib/password-update.tcl,v diff -u -N -r1.3 -r1.3.10.1 --- openacs-4/packages/acs-admin/lib/password-update.tcl 10 Jan 2007 21:21:59 -0000 1.3 +++ openacs-4/packages/acs-admin/lib/password-update.tcl 27 Aug 2013 11:44:43 -0000 1.3.10.1 @@ -63,7 +63,7 @@ # Continue } old_password_bad { - if { ![exists_and_not_null old_password] } { + if { (![info exists old_password] || $old_password eq "") } { form set_error update password_old $result(password_message) } else { # This hack causes the form to reload as if submitted, but with the old password showing Index: openacs-4/packages/acs-admin/tcl/test/acs-admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/test/acs-admin-procs.tcl,v diff -u -N -r1.3 -r1.3.20.1 --- openacs-4/packages/acs-admin/tcl/test/acs-admin-procs.tcl 15 Feb 2004 10:43:01 -0000 1.3 +++ openacs-4/packages/acs-admin/tcl/test/acs-admin-procs.tcl 27 Aug 2013 11:44:43 -0000 1.3.20.1 @@ -14,7 +14,7 @@ -rollback \ -test_code { set header_result [apm_header] - aa_true "apm_header returns a non-null string?" [exists_and_not_null header_result] + aa_true "apm_header returns a non-null string?" [expr {$header_result ne ""}] } } Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl,v diff -u -N -r1.14 -r1.14.8.1 --- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 29 Jul 2008 22:04:14 -0000 1.14 +++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 27 Aug 2013 11:44:43 -0000 1.14.8.1 @@ -67,7 +67,9 @@ incr file_count } - if { [empty_string_p $version(auto-mount)] && [string equal $version(package.type) apm_application] } { + if { $version(auto-mount) eq "" + && $version(package.type) eq "apm_application" + } { set mount_html " Mount package under the main site at path " } else { set mount_html "" Index: openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl,v diff -u -N -r1.9 -r1.9.6.1 --- openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl 30 Mar 2010 22:19:45 -0000 1.9 +++ openacs-4/packages/acs-admin/www/apm/parameter-add-2.tcl 27 Aug 2013 11:44:43 -0000 1.9.6.1 @@ -18,7 +18,7 @@ {max_n_values:integer 1} } -validate { datatype_type_ck { - if {$datatype != "number" && $datatype != "string" && $datatype != "text"} { + if {$datatype ne "number" && $datatype ne "string" && $datatype ne "text"} { ad_complain } } Index: openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl,v diff -u -N -r1.6 -r1.6.10.1 --- openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl 25 Sep 2007 15:22:33 -0000 1.6 +++ openacs-4/packages/acs-admin/www/apm/parameter-edit-2.tcl 27 Aug 2013 11:44:43 -0000 1.6.10.1 @@ -17,7 +17,7 @@ {max_n_values:integer 1} } -validate { datatype_type_ck { - if {$datatype != "number" && $datatype != "string" && $datatype != "text"} { + if {$datatype ne "number" && $datatype ne "string" && $datatype ne "text"} { ad_complain } } Index: openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl,v diff -u -N -r1.16 -r1.16.8.1 --- openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 29 Jul 2008 19:22:23 -0000 1.16 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 27 Aug 2013 11:44:43 -0000 1.16.8.1 @@ -32,7 +32,7 @@ set message_key_list [list] for { set counter 1 } { $counter <= $number_of_keys } { incr counter } { if { [info exists replace_p($counter)] } { - if { [exists_and_not_null message_keys($counter)] } { + if { ([info exists message_keys($counter)] && $message_keys($counter) ne "") } { lappend message_key_list $message_keys($counter) } else { ad_return_complaint 1 "
  • Message key number $counter is empty. Cannot replace text with empty key
  • " Index: openacs-4/packages/acs-admin/www/apm/version-parameters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-parameters.tcl,v diff -u -N -r1.8 -r1.8.4.1 --- openacs-4/packages/acs-admin/www/apm/version-parameters.tcl 17 Oct 2010 21:06:07 -0000 1.8 +++ openacs-4/packages/acs-admin/www/apm/version-parameters.tcl 27 Aug 2013 11:44:43 -0000 1.8.4.1 @@ -30,7 +30,7 @@ #DRB: sql_clauses must not contain RDBMS-specific query clauses. set sql_clauses "" -if { [exists_and_not_null dimensional_list] } { +if { ([info exists dimensional_list] && $dimensional_list ne "") } { lappend table_def [list section_name "Section:"] append sql_clauses [ad_dimensional_sql $dimensional_list] } Index: openacs-4/packages/acs-admin/www/apm/version-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.tcl,v diff -u -N -r1.20 -r1.20.8.1 --- openacs-4/packages/acs-admin/www/apm/version-view.tcl 13 Apr 2009 23:10:27 -0000 1.20 +++ openacs-4/packages/acs-admin/www/apm/version-view.tcl 27 Aug 2013 11:44:43 -0000 1.20.8.1 @@ -39,7 +39,7 @@ set vendor $vendor_uri } foreach field { summary description release_date vendor } { - if { [empty_string_p [set $field]] } { + if { [set $field] eq "" } { set $field "-" } } Index: openacs-4/packages/acs-admin/www/auth/authority.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority.tcl,v diff -u -N -r1.21 -r1.21.10.1 --- openacs-4/packages/acs-admin/www/auth/authority.tcl 14 May 2007 20:30:17 -0000 1.21 +++ openacs-4/packages/acs-admin/www/auth/authority.tcl 27 Aug 2013 11:44:43 -0000 1.21.10.1 @@ -9,7 +9,7 @@ } set page_title "" -if { [exists_and_not_null authority_id] } { +if { ([info exists authority_id] && $authority_id ne "") } { # Initial request in display or edit mode or a submit of the form set authority_exists_p [db_string authority_exists_p { select count(*) @@ -282,7 +282,7 @@ } set run_time [util::interval_pretty -seconds $run_time_seconds] } - if { [exists_and_not_null get_doc_impl_id] && [exists_and_not_null process_doc_impl_id] } { + if { ([info exists get_doc_impl_id] && $get_doc_impl_id ne "") && ([info exists process_doc_impl_id] && $process_doc_impl_id ne "") } { set batch_sync_run_url [export_vars -base batch-job-run { authority_id }] } else { # If there's neither a driver, nor any log history to display, hide any mention of batch jobs @@ -294,7 +294,7 @@ set context [list [list "." "Authentication"] $page_title] -if { [exists_and_not_null authority_id] } { +if { ([info exists authority_id] && $authority_id ne "") } { set num_users [lc_numeric [db_string num_users_in_auhtority { select count(*) from users where authority_id = :authority_id }]] } else { set num_users 0 @@ -305,16 +305,16 @@ # This code should be executed for non-local authorities in the following types of requests: # - initial request of the form (display mode) # - The form is being submitted (display mode) -set initial_request_p [empty_string_p [form get_action authority]] +set initial_request_p [expr {[form get_action authority] eq ""}] set submit_p [form is_valid authority] if { ($initial_request_p || $submit_p) && !$local_authority_p } { # Add parameter links for implementations in display mode foreach element_name [auth::authority::get_sc_impl_columns] { # Only offer link if there is an implementation chosen and that implementation has # parameters to configure - if { [exists_and_not_null element_array($element_name)] && - ![empty_string_p [auth::driver::get_parameters -impl_id $element_array($element_name)]]} { + if { ([info exists element_array($element_name)] && $element_array($element_name) ne "") && + [auth::driver::get_parameters -impl_id $element_array($element_name)] ne ""} { set configure_url [export_vars -base authority-parameters { authority_id }] break Index: openacs-4/packages/acs-admin/www/install/install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install-3.tcl,v diff -u -N -r1.9 -r1.9.10.1 --- openacs-4/packages/acs-admin/www/install/install-3.tcl 10 Jan 2007 21:22:00 -0000 1.9 +++ openacs-4/packages/acs-admin/www/install/install-3.tcl 27 Aug 2013 11:44:43 -0000 1.9.10.1 @@ -54,7 +54,7 @@ array unset version array set version $repository($package_key) - if { [exists_and_not_null version(download_url)] } { + if { ([info exists version(download_url)] && $version(download_url) ne "") } { set spec_file [apm_load_apm_file -url $version(download_url)] if { $spec_file eq "" } { ns_log Error "Error downloading package $package_key from $version(download_url). Installing package failed." Index: openacs-4/packages/acs-admin/www/install/install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/install/install.tcl,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/acs-admin/www/install/install.tcl 8 Dec 2012 18:20:35 -0000 1.7 +++ openacs-4/packages/acs-admin/www/install/install.tcl 27 Aug 2013 11:44:44 -0000 1.7.2.1 @@ -32,12 +32,12 @@ array unset version array set version $repository($package_key) - if { ![exists_and_not_null package_type] || [string equal $version(package.type) $package_type] } { + if { (![info exists package_type] || $package_type eq "") || [string equal $version(package.type) $package_type] } { set package_key $version(package.key) # If in upgrade mode, only add to list if it's an upgrade if { !$upgrade_p || $version(install_type) eq "upgrade" } { - if {![exists_and_not_null version(maturity)]} { + if {(![info exists version(maturity)] || $version(maturity) eq "")} { set version(maturity) "" } set package([string toupper $version(package-name)]) \ Index: openacs-4/packages/acs-admin/www/users/complex-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/complex-search.tcl,v diff -u -N -r1.11 -r1.11.10.1 --- openacs-4/packages/acs-admin/www/users/complex-search.tcl 10 Jan 2007 21:22:00 -0000 1.11 +++ openacs-4/packages/acs-admin/www/users/complex-search.tcl 27 Aug 2013 11:44:44 -0000 1.11.10.1 @@ -101,41 +101,41 @@ set where_clause [list] set rowcount 0 -if {[exists_and_not_null limit_to_users_in_group_id] && ![regexp {[^-0-9]} $limit_to_users_in_group_id] } { +if {([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") && ![regexp {[^-0-9]} $limit_to_users_in_group_id] } { set group_name [db_string user_group_name_from_id \ "select group_name from groups where group_id = :limit_to_users_in_group_id"] incr rowcount set criteria:[set rowcount](data) \ "Is a member of '$group_name'" } -if { [exists_and_not_null authority_id] } { +if { ([info exists authority_id] && $authority_id ne "") } { lappend where_clause "authority_id = :authority_id" incr rowcount set criteria:[set rowcount](data) "Authority is '[auth::authority::get_element -authority_id $authority_id -element pretty_name]'" } -if { [exists_and_not_null email] } { +if { ([info exists email] && $email ne "") } { set sql_email "%[string tolower $email]%" lappend where_clause "email like :sql_email" incr rowcount set criteria:[set rowcount](data) "Email contains '$email'" } -if { [exists_and_not_null ip] } { +if { ([info exists ip] && $ip ne "") } { lappend where_clause "creation_ip = :ip" incr rowcount set criteria:[set rowcount](data) "Creation IP is $ip" } -if { [exists_and_not_null last_name_starts_with] } { +if { ([info exists last_name_starts_with] && $last_name_starts_with ne "") } { set sql_last_name_starts_with "[string tolower $last_name_starts_with]%" lappend where_clause "lower(last_name) like :sql_last_name_starts_with" incr rowcount set criteria:[set rowcount](data) "Last name starts with '$last_name_starts_with'" } -if { [exists_and_not_null first_names] } { +if { ([info exists first_names] && $first_names ne "") } { set sql_first_names "%[string tolower $first_names]%" lappend where_clause "lower(first_names) like :sql_first_names" incr rowcount @@ -192,7 +192,7 @@ set criteria:rowcount $rowcount -if { [exists_and_not_null limit_to_users_in_group_id] } { +if { ([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") } { set query "select distinct first_names, last_name, email, member_state, email_verified_p, cu.user_id from cc_users cu, group_member_map gm where (cu.user_id = gm.member_id Index: openacs-4/packages/acs-admin/www/users/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/search.tcl,v diff -u -N -r1.6 -r1.6.10.1 --- openacs-4/packages/acs-admin/www/users/search.tcl 10 Jan 2007 21:22:00 -0000 1.6 +++ openacs-4/packages/acs-admin/www/users/search.tcl 27 Aug 2013 11:44:44 -0000 1.6.10.1 @@ -106,12 +106,12 @@ set passthrough_parameters "[export_entire_form_as_url_vars $passthrough]" } -if { [exists_and_not_null limit_to_user_id ] } { +if { ([info exists limit_to_user_id] && $limit_to_user_id ne "") } { set limit_to_user_id [join $limit_to_user_id ","] lappend where_clause "cc_users.user_id not in ($limit_to_user_id)" } -if { [exists_and_not_null limit_to_users_in_group_id] } { +if { ([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") } { set query "select distinct first_names, last_name, email, member_state, email_verified_p, cu.user_id from cc_users cu, group_member_map gm, membership_rels mr where cu.user_id = gm.member_id @@ -163,7 +163,7 @@ set user_search:rowcount $rowcount # We are limiting the search to one group - display that group's name -if { [exists_and_not_null limit_to_users_in_group_id] && ![regexp {[^0-9]} $limit_to_users_in_group_id] } { +if { ([info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "") && ![regexp {[^0-9]} $limit_to_users_in_group_id] } { set group_name [db_string user_group_name_from_id "select group_name from user_groups where group_id = :limit_to_users_in_group_id"] set title "User search in $group_name" } else { Index: openacs-4/packages/acs-admin/www/users/user-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/user-add-3.tcl,v diff -u -N -r1.6 -r1.6.6.1 --- openacs-4/packages/acs-admin/www/users/user-add-3.tcl 12 Jul 2009 01:08:22 -0000 1.6 +++ openacs-4/packages/acs-admin/www/users/user-add-3.tcl 27 Aug 2013 11:44:44 -0000 1.6.6.1 @@ -24,7 +24,7 @@ set admin_email [db_string get_admin_email {}] set subject "You have been added as a user to [ad_system_name] at [ad_url]" -if [catch {acs_mail_lite::send -send_immediately -to_addr $email -from_addr $admin_email -subject $subject -body $message} errmsg] { +if {[catch {acs_mail_lite::send -send_immediately -to_addr $email -from_addr $admin_email -subject $subject -body $message} errmsg]} { ad_return_error "Mail Failed" "

    The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:

    [ad_quotehtml $errmsg]