Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v diff -u -r1.19.2.5 -r1.19.2.6 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 23 May 2003 13:11:29 -0000 1.19.2.5 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 7 Jun 2003 01:47:32 -0000 1.19.2.6 @@ -4,7 +4,7 @@ @creation-date 15 Apr 2000 @author Jon Salz (jsalz@arsdigita.com) - @cvs-id $Id$ + @cvs-id 00-database-procs.tcl,v 1.19.2.5 2003/05/23 13:11:29 lars Exp } ad_proc db_type { } { @@ -910,7 +910,7 @@ error $on_errmsg $errorInfo $errorCode } else { # Good, no error thrown by the on_error block. - if [db_abort_transaction_p] { + if { [db_abort_transaction_p] } { # This means we should abort the transaction. if { $level == 1 } { set db_state(db_abort_p,$dbh) 0 @@ -945,7 +945,7 @@ } } else { # There was no error from the transaction code. - if [db_abort_transaction_p] { + if { [db_abort_transaction_p] } { # The user requested the transaction be aborted. if { $level == 1 } { set db_state(db_abort_p,$dbh) 0 Index: openacs-4/packages/acs-tcl/tcl/admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-procs.tcl,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 18 Sep 2002 18:55:29 -0000 1.9 +++ openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 7 Jun 2003 01:47:32 -0000 1.9.2.1 @@ -4,7 +4,7 @@ @author Multiple @creation-date 11/18/98 - @cvs-id $Id$ + @cvs-id admin-procs.tcl,v 1.9 2002/09/18 18:55:29 jeffd Exp } @@ -432,15 +432,15 @@ if { [llength $join_clauses] == 0 } { set final_query "select [join $select_list ",\n "] from [join $tables ", "]" - if ![empty_string_p $complete_where] { + if { ![empty_string_p $complete_where] } { append final_query "\nwhere $complete_where" } } else { # we're joining at set final_query "select [join $select_list ",\n "] from [join $tables ", "] where [join $join_clauses "\nand "]" - if ![empty_string_p $complete_where] { + if { ![empty_string_p $complete_where] } { append final_query "\n and ($complete_where)" } } Index: openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/aolserver-3-procs.tcl,v diff -u -r1.2 -r1.2.4.1 --- openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl 24 Apr 2001 22:38:12 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl 7 Jun 2003 01:47:32 -0000 1.2.4.1 @@ -5,7 +5,7 @@ @creation-date 27 Feb 2000 @author Jon Salz [jsalz@arsdigita.com] - @cvs-id $Id$ + @cvs-id aolserver-3-procs.tcl,v 1.2 2001/04/24 22:38:12 donb Exp } # -1 = Not there or value was "" @@ -23,7 +23,7 @@ set value [ns_set get $formdata $column] - if [string match $value ""] { + if { [string match $value ""] } { switch $type { date { @@ -53,7 +53,7 @@ } } } - if [string match $value ""] { + if { [string match $value ""] } { return -1 } else { return 1 @@ -110,15 +110,15 @@ proc _ns_updatebutton {table var} { upvar $var updatebutton - if ![info exists updatebutton] { + if { ![info exists updatebutton] } { set updatebutton "" } - if [string match "" $updatebutton] { + if { [string match "" $updatebutton] } { db_with_handle db { set updatebutton [ns_table value $db $table update_button_label] } } - if [string match "" $updatebutton] { + if { [string match "" $updatebutton] } { set updatebutton "Update Record" } } Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v diff -u -r1.19.2.2 -r1.19.2.3 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 28 Mar 2003 13:43:28 -0000 1.19.2.2 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 7 Jun 2003 01:47:32 -0000 1.19.2.3 @@ -5,7 +5,7 @@ @author Many others at ArsDigita and in the OpenACS community. @creation-date 2 April 1998 - @cvs-id $Id$ + @cvs-id defs-procs.tcl,v 1.19.2.2 2003/03/28 13:43:28 lars Exp } ad_proc ad_acs_version {} { @@ -288,7 +288,7 @@ and then closes the BODY and HTML tags } { global sidegraphic_displayed_p - if [empty_string_p $signatory] { + if { [empty_string_p $signatory] } { set signatory [ad_system_owner] } if { [info exists sidegraphic_displayed_p] && $sidegraphic_displayed_p } { @@ -559,9 +559,9 @@ @author Roberto Mello } { set lines [list] - if [empty_string_p $line2] { + if { [empty_string_p $line2] } { lappend lines $line1 - } elseif [empty_string_p $line1] { + } elseif { [empty_string_p $line1] } { lappend lines $line2 } else { lappend lines $line1 @@ -585,14 +585,14 @@ } { uplevel { set user_id [ad_conn user_id] - if [catch { + if { [catch { db_1row user_name_select { select first_names, last_name, email from persons, parties where person_id = :user_id and person_id = party_id } - } errmsg] { + } errmsg] } { ad_return_error "Couldn't find user info" "Couldn't find user info." return } @@ -610,7 +610,7 @@ string, ad_decorate_top will make a one-row table for the top of the page } { - if [empty_string_p $potential_decoration] { + if { [empty_string_p $potential_decoration] } { return $simple_headline } else { return "
$potential_decoration$simple_headline
" Index: openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/deprecated-utilities-procs.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl 24 Sep 2002 19:34:53 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl 7 Jun 2003 01:47:32 -0000 1.4.2.1 @@ -5,7 +5,7 @@ @author yon [yon@arsdigita.com] @creation-date 9 Jul 2000 - @cvs-id $Id$ + @cvs-id deprecated-utilities-procs.tcl,v 1.4 2002/09/24 19:34:53 jeffd Exp } @@ -224,7 +224,7 @@ ad_proc -deprecated -warn remove_whitespace {input_string} { to be removed. } { - if [regsub -all "\[\015\012\t \]" $input_string "" output_string] { + if { [regsub -all "\[\015\012\t \]" $input_string "" output_string] } { return $output_string } else { return $input_string @@ -234,7 +234,7 @@ ad_proc -deprecated -warn util_just_the_digits {input_string} { to be removed. } { - if [regsub -all {[^0-9]} $input_string "" output_string] { + if { [regsub -all {[^0-9]} $input_string "" output_string] } { return $output_string } else { return $input_string Index: openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl 5 Mar 2003 14:40:42 -0000 1.4.2.1 +++ openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl 7 Jun 2003 01:47:32 -0000 1.4.2.2 @@ -5,7 +5,7 @@ @author Various [acs@arsdigita.com] @author Rob Mayoff @creation-date 2000-10-19 - @cvs-id $Id$ + @cvs-id memoize-procs.tcl,v 1.4.2.1 2003/03/05 14:40:42 lars Exp } # Use shiny new ns_cache-based util_memoize. @@ -161,7 +161,7 @@ if $log_p { ns_log Notice "flush_regexp: checking $name for $expr" } - if [regexp $expr $name] { + if { [regexp $expr $name] } { if $log_p { ns_log Notice "flush_regexp: flushing $name" } Index: openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl,v diff -u -r1.7.2.7 -r1.7.2.8 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 23 Apr 2003 06:04:13 -0000 1.7.2.7 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 7 Jun 2003 01:47:32 -0000 1.7.2.8 @@ -1,7 +1,7 @@ ad_library { Provides procedures to spit out the navigational parts of the site. - @cvs-id $Id$ + @cvs-id navigation-procs.tcl,v 1.7.2.7 2003/04/23 06:04:13 peterm Exp @author philg@mit.edu @creation-date 11/5/98 (adapted originally from the Cognet server) } @@ -311,7 +311,7 @@ foreach naked_pattern [ad_naked_html_patterns] { - if [string match $naked_pattern $url_stub] { + if { [string match $naked_pattern $url_stub] } { # want the global admins with no menu, but not the domain admin return "" } @@ -463,7 +463,7 @@ set uplevel_string "\"Up\"" foreach url_pattern [ad_no_uplevel_patterns] { - if [regexp $url_pattern $url_stub match] { + if { [regexp $url_pattern $url_stub match] } { set uplevel_string "" } } @@ -514,7 +514,7 @@ set full_filename "[ns_info pageroot]$url_stub" foreach naked_pattern [ad_naked_html_patterns] { - if [string match $naked_pattern $url_stub] { + if { [string match $naked_pattern $url_stub] } { return "" } } Index: openacs-4/packages/acs-tcl/tcl/request-processor-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-init.tcl,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-tcl/tcl/request-processor-init.tcl 20 Sep 2002 21:46:34 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/request-processor-init.tcl 7 Jun 2003 01:47:32 -0000 1.3.2.1 @@ -4,7 +4,7 @@ @creation-date 30 May 2000 @author Jon Salz [jsalz@arsdigita.com] - @cvs-id $Id$ + @cvs-id request-processor-init.tcl,v 1.3 2002/09/20 21:46:34 jeffd Exp } # These procedures are dynamically defined at startup to alleviate @@ -32,7 +32,7 @@ return [ad_acs_admin_id_mem] " -if [ad_parameter -package_id [ad_acs_kernel_id] PerformanceModeP request-processor 0] { +if { [ad_parameter -package_id [ad_acs_kernel_id] PerformanceModeP request-processor 0] } { ad_proc -private rp_performance_mode {} { Returns 1 if the request processor is in performance mode, 0 otherwise. } { Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.25.2.9 -r1.25.2.10 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 6 Jun 2003 21:40:37 -0000 1.25.2.9 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 7 Jun 2003 01:47:32 -0000 1.25.2.10 @@ -448,23 +448,6 @@ } { - # DRB: In AOLserver 4 a new thread created to serve a returnredirect gets - # a copy of the spawning thread's copy of db_state before the spawning thread - # clean-up code deallocates database handles. The spawning thread gives all db - # handles back to AOLserver but the spawned thread thinks they're still - # available and a server error results when the spawned thread attempts to use - # one of the handles. This bug was quite difficult to track down and debug I - # might add ... - - global db_state - set db_state(handles) [list] - set db_state(n_handles_used) 0 - - - ns_log Notice "Huh? Here we go!" - set form [ns_getform] - set size [ns_set size $form] - ##### # # Initialize the environment: reset ad_conn, and populate it with @@ -492,10 +475,10 @@ if { ![empty_string_p $root] } { if { [regexp "^${root}(.*)$" $url match url] } { - if [regexp {^GET [^\?]*\?(.*) HTTP} [ns_conn request] match vars] { + if { [regexp {^GET [^\?]*\?(.*) HTTP} [ns_conn request] match vars] } { append url ?$vars } - if {[ad_secure_conn_p]} { + if { [ad_secure_conn_p] } { # it's a secure connection. ad_returnredirect https://[ad_host][ad_port]$url return "filter_return" @@ -551,11 +534,11 @@ rp_debug -ns_log_level debug -debug t "rp_filter: setting up request: [ns_conn method] [ns_conn url] [ns_conn query]" - if [catch { array set node [site_node::get -url [ad_conn url]] } errmsg] { + if { [catch { array set node [site_node::get -url [ad_conn url]] } errmsg] } { # log and do nothing rp_debug -debug t "error within rp_filter [ns_conn method] [ns_conn url] [ns_conn query]. $errmsg" } else { - if {[string equal $node(url) "[ad_conn url]/"]} { + if { [string equal $node(url) "[ad_conn url]/"] } { ad_returnredirect $node(url) rp_debug "rp_filter: returnredirect $node(url)" rp_debug "rp_filter: return filter_return" @@ -580,7 +563,7 @@ # ##### - if ![rp_performance_mode] { + if { ![rp_performance_mode] } { # We wrap this in a catch, because we don't want an error here to # cause the request to fail. if { [catch { apm_load_any_changed_libraries } error] } { @@ -608,7 +591,8 @@ # Make sure the user is authorized to make this request. # ##### - if { ![empty_string_p [ad_conn object_id]]} { + + if { ![empty_string_p [ad_conn object_id]] } { ad_try { if {[string match "admin/*" [ad_conn extra_url]]} { permission::require_permission -object_id [ad_conn object_id] -privilege admin @@ -738,13 +722,13 @@ set startclicks [clock clicks] rp_debug "rp_handler: handling request: [ns_conn method] [ns_conn url]?[ns_conn query]" - if [set code [catch { - if [rp_performance_mode] { + if { [set code [catch { + if { [rp_performance_mode] } { global tcl_url2file tcl_url2path_info - if ![catch { + if { ![catch { set file $tcl_url2file([ad_conn url]) set path_info $tcl_url2path_info([ad_conn url]) - } errmsg] { + } errmsg] } { ad_conn -set file $file ad_conn -set path_info $path_info rp_serve_concrete_file $file @@ -817,7 +801,9 @@ # Now visit the candidates columnwise: from most specific to least foreach cand0 [lindex $candidates 0] cand1 [lindex $candidates 1] { foreach candidate [list $cand0 $cand1] { - if [empty_string_p $candidate] continue; + if { [empty_string_p $candidate] } { + continue + } set root [lindex $candidate 0]; # fewer instructions than util_unlist set path [lindex $candidate 1] set prefix [lindex $candidate 2] @@ -845,7 +831,7 @@ ad_call_proc_if_exists ds_add rp [list transformation [list notfound $root/$path notfound] $startclicks [clock clicks]] ns_returnnotfound - } errmsg]] { + } errmsg]] } { if {$code == 1} { if {![string equal [ns_conn query] ""]} { set q ? Index: openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/rollout-email-procs.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl 11 Mar 2003 22:23:07 -0000 1.1.2.1 +++ openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl 7 Jun 2003 01:47:32 -0000 1.1.2.2 @@ -81,7 +81,7 @@ } { set targets [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailRedirectTo] - if ![string equal $targets ""] { + if { ![string equal $targets ""] } { set body "The following email would have been sent from \"[ad_parameter SystemName]\", but was instead redirected to you. Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.13.2.5 -r1.13.2.6 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 6 Jun 2003 08:48:50 -0000 1.13.2.5 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 7 Jun 2003 01:47:32 -0000 1.13.2.6 @@ -7,7 +7,7 @@ @author Jon Salz (jsalz@arsdigita.com) @author Richard Li (richardl@arsdigita.com) @author Archit Shah (ashah@arsdigita.com) - @cvs-id $Id$ + @cvs-id security-procs.tcl,v 1.13.2.5 2003/06/06 08:48:50 lars Exp } # cookies (all are signed cookies): @@ -536,7 +536,7 @@ # note that there is no built-in function that will change # posted variables to url variables, so we write our own - if ![empty_string_p $form] { + if { ![empty_string_p $form] } { set form_size [ns_set size $form] set form_counter_i 0 while { $form_counter_i<$form_size } { @@ -620,7 +620,7 @@ @see ad_page_contract } { set form [ns_getform] - if [empty_string_p $form] { return filter_ok } + if { [empty_string_p $form] } { return filter_ok } # Check each form data variable to see if it contains malicious # user input that we don't want to interpolate into our SQL @@ -783,7 +783,7 @@
 } {
 
-    if [regexp {[^0-9]} $value] {
+    if { [regexp {[^0-9]} $value] } {
         return 0
     } else {
         return 1
@@ -798,7 +798,7 @@
     
 } {
 
-    if [string match *..* $value] {
+    if { [string match *..* $value] } {
         return 0
     } else {
         return 1
@@ -813,7 +813,7 @@
     
 } {
 
-    if [regexp {[/\\]} $value] {
+    if { [regexp {[/\\]} $value] } {
         return 0
     } else {
         return 1
@@ -827,7 +827,7 @@
     #
     
 } {
-    if [catch {expr 1.0 * $value}] {
+    if { [catch {expr 1.0 * $value}] } {
         return 0
     } else {
         return 1
@@ -843,7 +843,7 @@
     
} { - if [regexp {[^-A-Za-z0-9_]} $value] { + if { [regexp {[^-A-Za-z0-9_]} $value] } { return 0 } else { return 1 @@ -874,7 +874,7 @@
 } {
 
-    if [string match *'* $value] {
+    if { [string match *'* $value] } {
         return 0
     } else {
         return 1
@@ -893,7 +893,7 @@
     
 } {
 
-    if [regexp {[^ 0-9,]} $value] {
+    if { [regexp {[^ 0-9,]} $value] } {
         return 0
     } else {
         return 1
@@ -921,7 +921,7 @@
 
     set third_url_element [lindex [ad_conn urlv] 3]
 
-    if [regexp {[^0-9]} $third_url_element] {
+    if { [regexp {[^0-9]} $third_url_element] } {
         return 0
     } else {
         return 1
Index: openacs-4/packages/acs-tcl/tcl/set-operation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/set-operation-procs.tcl,v
diff -u -r1.1.1.1 -r1.1.1.1.4.1
--- openacs-4/packages/acs-tcl/tcl/set-operation-procs.tcl	13 Mar 2001 22:59:26 -0000	1.1.1.1
+++ openacs-4/packages/acs-tcl/tcl/set-operation-procs.tcl	7 Jun 2003 01:47:32 -0000	1.1.1.1.4.1
@@ -4,7 +4,7 @@
 
     @creation-date 19 January 2001
     @author Eric Lorenzo (elorenzo@arsdigita.com)
-    @cvs-id $Id$
+    @cvs-id set-operation-procs.tcl,v 1.1.1.1 2001/03/13 22:59:26 ben Exp
 }
 
 
@@ -31,7 +31,7 @@
 } {
     upvar $s-name s
     
-    if ![set_member? $s $v] {
+    if { ![set_member? $s $v] } {
 	lappend s $v
     }
 }
@@ -44,7 +44,7 @@
     set result $u
 
     foreach ve $v {
-	if ![set_member? $result $ve] {
+	if { ![set_member? $result $ve] } {
 	    lappend result $ve
 	}
     }
@@ -61,7 +61,7 @@
     upvar $u-name u
 
     foreach ve $v {
-	if ![set_member? $u $ve] {
+	if { ![set_member? $u $ve] } {
 	    lappend u $ve
 	}
     }
@@ -78,7 +78,7 @@
     set result [list]
     
     foreach ue $u {
-	if [set_member? $v $ue] {
+	if { [set_member? $v $ue] } {
 	    lappend result $ue
 	}
     }
@@ -96,7 +96,7 @@
     set result [list]
     
     foreach ue $u {
-	if [set_member? $v $ue] {
+	if { [set_member? $v $ue] } {
 	    lappend result $ue
 	}
     }
@@ -116,7 +116,7 @@
     set result [list]
 
     foreach ue $u {
-	if ![set_member? $v $ue] {
+	if { ![set_member? $v $ue] } {
 	    lappend result $ue
 	}
     }
@@ -134,7 +134,7 @@
     set result [list]
 
     foreach ue $u {
-	if ![set_member? $v $ue] {
+	if { ![set_member? $v $ue] } {
 	    lappend result $ue
 	}
     }
Index: openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/table-display-procs.tcl,v
diff -u -r1.9 -r1.9.2.1
--- openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl	20 Sep 2002 22:18:16 -0000	1.9
+++ openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl	7 Jun 2003 01:47:32 -0000	1.9.2.1
@@ -1,7 +1,7 @@
 ad_library {
     This is the table, dimensional bar and sort tools.
     an example of their use can be found in /acs-examples
-    @cvs-id $Id$
+    @cvs-id table-display-procs.tcl,v 1.9 2002/09/20 22:18:16 jeffd Exp
 }
     
 # Dimensional selection bars.
@@ -858,7 +858,7 @@
 proc_doc ad_same_page_link {variable value text {form ""}} {
     Makes a link to this page, with a new value for "variable".
 } {
-    if [empty_string_p $form] {
+    if { [empty_string_p $form] } {
         set form [ns_getform]
     }
     set url_vars [export_ns_set_vars url $variable $form]
Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v
diff -u -r1.6 -r1.6.2.1
--- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl	23 Sep 2002 11:25:02 -0000	1.6
+++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl	7 Jun 2003 01:47:32 -0000	1.6.2.1
@@ -8,7 +8,7 @@
     @author Bryan Quinn (bquinn@arsdigita.com)
 
     @creation-date 16 June 2000
-    @cvs-id $Id$
+    @cvs-id tcl-documentation-procs.tcl,v 1.6 2002/09/23 11:25:02 jeffd Exp
 }
 
 ####################
@@ -1538,7 +1538,7 @@
     
     # check to make sure path is to an authorized directory
     set tmpdir_list [ad_parameter_all_values_as_list TmpDir]
-    if [empty_string_p $tmpdir_list] {
+    if { [empty_string_p $tmpdir_list] } {
 	set tmpdir_list [list "/var/tmp" "/tmp"]
     }
     
@@ -1809,7 +1809,7 @@
     @creation-date August 2000
 } {
     if { ![empty_string_p [string trim $value]] } {
-	if ![regexp {^\(?([1-9][0-9]{2})\)?(-|\.|\ )?([0-9]{3})(-|\.|\ )?([0-9]{4})} $value] {
+	if { ![regexp {^\(?([1-9][0-9]{2})\)?(-|\.|\ )?([0-9]{3})(-|\.|\ )?([0-9]{4})} $value] } {
 	    ad_complain "$value does not appear to be a valid U.S. phone
 	    number."
 	    return 0
Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v
diff -u -r1.19.2.18 -r1.19.2.19
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl	6 Jun 2003 21:40:37 -0000	1.19.2.18
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl	7 Jun 2003 01:47:33 -0000	1.19.2.19
@@ -4,15 +4,15 @@
 
     @author Various (acs@arsdigita.com)
     @creation-date 13 April 2000
-    @cvs-id $Id$
+    @cvs-id utilities-procs.tcl,v 1.19.2.18 2003/06/06 21:40:37 donb Exp
 }
 
 # Let's define the nsv arrays out here, so we can call nsv_exists
 # on their keys without checking to see if it already exists.
 # we create the array by setting a bogus key.
 
 proc proc_source_file_full_path {proc_name} {
-    if ![nsv_exists proc_source_file $proc_name] {
+    if { ![nsv_exists proc_source_file $proc_name] } {
 	return ""
     } else {
 	set tentative_path [nsv_get proc_source_file $proc_name]
@@ -99,7 +99,7 @@
 
         # check to make sure path is to an authorized directory
         set tmpdir_list [ad_parameter_all_values_as_list TmpDir]
-        if [empty_string_p $tmpdir_list] {
+        if { [empty_string_p $tmpdir_list] } {
             set tmpdir_list [list "/var/tmp" "/tmp"]
         }
 
@@ -122,27 +122,27 @@
     # see if this is one of the typed variables
     global ad_typed_form_variables    
 
-    if [info exists ad_typed_form_variables] { 
+    if { [info exists ad_typed_form_variables] } { 
 
         foreach typed_var_spec $ad_typed_form_variables {
             set typed_var_name [lindex $typed_var_spec 0]
         
-            if ![string match $typed_var_name $name] {
+            if { ![string match $typed_var_name $name] } {
                 # no match. Go to the next variable in the list
                 continue
             }
         
             # the variable matched the pattern
             set typed_var_type [lindex $typed_var_spec 1]
         
-            if [string match "" $typed_var_type] {
+            if { [string match "" $typed_var_type] } {
                 # if they don't specify a type, the default is 'integer'
                 set typed_var_type integer
             }
 
             set variable_safe_p [ad_var_type_check_${typed_var_type}_p $value]
         
-            if !$variable_safe_p {
+            if { !$variable_safe_p } {
                 ns_returnerror 500 "variable $name failed '$typed_var_type' type check"
                 ns_log Error "[ad_conn url] called with \$$name = $value"
                 error "variable $name failed '$typed_var_type' type check"
@@ -361,13 +361,13 @@
     return_url. if database insert fails, this procedure will return a
     sensible error message to the user.
 } {
-    if [catch {
+    if { [catch {
 	if { ![empty_string_p $bind] } {
 	    	db_dml $statement_name $insert_dml -bind $bind
 	} else {
 	    db_dml $statement_name $insert_dml 
 	}
-    } errmsg] {
+    } errmsg] } {
 	# Oracle choked on the insert
 	
 	# detect double click
@@ -408,7 +408,7 @@
     Converts 1998-09-05 to September 5, 1998
 } {
     set sql_date [string range $sql_date 0 9]
-    if ![regexp {(.*)-(.*)-(.*)$} $sql_date match year month day] {
+    if { ![regexp {(.*)-(.*)-(.*)$} $sql_date match year month day] } {
 	return ""
     } else {
 	set allthemonths {January February March April May June July August September October November December}
@@ -1215,12 +1215,12 @@
     @see export_vars
 }  {
 
-    if [empty_string_p $setid] {
+    if { [empty_string_p $setid] } {
 	set setid [ns_getform]
     }
 
     set return_list [list]
-    if ![empty_string_p $setid] {
+    if { ![empty_string_p $setid] } {
         set set_size [ns_set size $setid]
         set set_counter_i 0
         while { $set_counter_i<$set_size } {
@@ -1354,7 +1354,7 @@
 proc with_catch {error_var body on_error} { 
     upvar 1 $error_var $error_var 
     global errorInfo errorCode 
-    if [catch { uplevel $body } $error_var] { 
+    if { [catch { uplevel $body } $error_var] } { 
         set code [catch {uplevel $on_error} string] 
         # Return out of the caller appropriately. 
         if { $code == 1 } { 
@@ -1440,7 +1440,7 @@
 
     @see util_get_http_status 
 } {
-    if [catch { set status [util_get_http_status $url] } errmsg] {
+    if { [catch { set status [util_get_http_status $url] } errmsg] } {
 	# got an error; definitely not valid
 	return 0
     } else {
@@ -1466,19 +1466,19 @@
     Like ns_httpopen but works for POST as well; called by util_httppost
 } { 
     
-    if ![string match http://* $url] {
+    if { ![string match http://* $url] } {
         return -code error "Invalid url \"$url\":  _httpopen only supports HTTP"
     }
     set url [split $url /]
     set hp [split [lindex $url 2] :]
     set host [lindex $hp 0]
     set port [lindex $hp 1]
-    if [string match $port ""] {set port 80}
+    if { [string match $port ""] } {set port 80}
     set uri /[join [lrange $url 3 end] /]
     set fds [ns_sockopen -nonblock $host $port]
     set rfd [lindex $fds 0]
     set wfd [lindex $fds 1]
-    if [catch {
+    if { [catch {
         _ns_http_puts $timeout $wfd "$method $uri HTTP/1.0\r"
         if {$rqset != ""} {
             for {set i 0} {$i < [ns_set size $rqset]} {incr i} {
@@ -1493,11 +1493,11 @@
             _ns_http_puts $timeout $wfd "Referer: $http_referer \r"    
 	}
 
-    } errMsg] {
+    } errMsg] } {
         global errorInfo
         #close $wfd
         #close $rfd
-        if [info exists rpset] {ns_set free $rpset}
+        if { [info exists rpset] } {ns_set free $rpset}
         return -1
     }
     return [list $rfd $wfd ""]
@@ -1520,7 +1520,7 @@
     

@see util_http_file_upload } { - if [catch { + if { [catch { if {[incr depth] > 10} { return -code error "util_httppost: Recursive redirection: $url" } @@ -1540,7 +1540,7 @@ set rpset [ns_set new [_ns_http_gets $timeout $rfd]] while 1 { set line [_ns_http_gets $timeout $rfd] - if ![string length $line] break + if { ![string length $line] } break ns_parseheader $rpset $line } @@ -1556,12 +1556,12 @@ } } set length [ns_set iget $headers content-length] - if [string match "" $length] {set length -1} + if { [string match "" $length] } {set length -1} set err [catch { while 1 { set buf [_ns_http_read $timeout $rfd $length] append page $buf - if [string match "" $buf] break + if { [string match "" $buf] } break if {$length > 0} { incr length -[string length $buf] if {$length <= 0} break @@ -1574,7 +1574,7 @@ global errorInfo return -code error -errorinfo $errorInfo $errMsg } - } errmgs ] {return -1} + } errmgs ] } {return -1} return $page } @@ -1658,13 +1658,13 @@ close $rfd } else { set length [ns_set iget $headers content-length] - if [string match "" $length] {set length -1} + if { [string match "" $length] } {set length -1} set err [catch { while 1 { set buf [_ns_http_read $timeout $rfd $length] append page $buf - if [string match "" $buf] break + if { [string match "" $buf] } break if {$length > 0} { incr length -[string length $buf] if {$length <= 0} break @@ -2120,7 +2120,7 @@ ns_startcontent -type $content_type - if ![empty_string_p $first_part_of_page] { + if { ![empty_string_p $first_part_of_page] } { ns_write $first_part_of_page } } @@ -3036,7 +3036,7 @@ empty_string. } { upvar $var_name $var_name - if [info exists $var_name] { + if { [info exists $var_name] } { return [set $var_name] } } @@ -3090,7 +3090,7 @@ set tag_names [list div font] # look for a less than sign, zero or more spaces, then the tag if { ! [empty_string_p $tag_names]} { - if [regexp "< *([join $tag_names "\[ \n\t\r\f\]|"]\[ \n\t\r\f\])" [string tolower $user_submitted_html]] { + if { [regexp "< *([join $tag_names "\[ \n\t\r\f\]|"]\[ \n\t\r\f\])" [string tolower $user_submitted_html]] } { return "

For security reasons we do not accept the submission of any HTML containing the following tags:

[join $tag_names " "]" } @@ -3358,7 +3358,7 @@ append payload --$boundary-- \r\n - if [catch { + if { [catch { if {[incr depth -1] <= 0} { return -code error "util_http_file_upload:\ Recursive redirection: $url" @@ -3379,20 +3379,20 @@ set rpset [ns_set new [_ns_http_gets $timeout $rfd]] while 1 { set line [_ns_http_gets $timeout $rfd] - if ![string length $line] break + if { ![string length $line] } break ns_parseheader $rpset $line } set headers $rpset set response [ns_set name $headers] set status [lindex $response 1] set length [ns_set iget $headers content-length] - if [string match "" $length] { set length -1 } + if { [string match "" $length] } { set length -1 } set err [catch { while 1 { set buf [_ns_http_read $timeout $rfd $length] append page $buf - if [string match "" $buf] break + if { [string match "" $buf] } break if {$length > 0} { incr length -[string length $buf] if {$length <= 0} break @@ -3407,7 +3407,7 @@ global errorInfo return -code error -errorinfo $errorInfo $errMsg } - } errmsg] {return -1} + } errmsg] } {return -1} return $page } @@ -3423,7 +3423,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id$ +# RCS: @(#) utilities-procs.tcl,v 1.19.2.18 2003/06/06 21:40:37 donb Exp # Version 1.0 implemented Base64_Encode, Bae64_Decode # Version 2.0 uses the base64 namespace Index: openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 28 Apr 2003 23:48:00 -0000 1.4.2.1 +++ openacs-4/packages/acs-tcl/tcl/widgets-procs.tcl 7 Jun 2003 01:47:33 -0000 1.4.2.2 @@ -1,7 +1,7 @@ ad_library { UI widgets for use in forms, etc. - @cvs-id $Id$ + @cvs-id widgets-procs.tcl,v 1.4.2.1 2003/04/28 23:48:00 jong Exp } proc_doc state_widget { {default ""} {select_name "usps_abbrev"}} "Returns a state selection box" { @@ -28,7 +28,7 @@ set widget_value "\n" if { $default == "" } { - if [ad_parameter SomeAmericanReadersP] { + if { [ad_parameter SomeAmericanReadersP] } { append widget_value " \n" } else {