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 |
} { - 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 "