Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.43 -r1.44 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 25 Jul 2018 17:44:25 -0000 1.43 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 25 Jul 2018 17:49:26 -0000 1.44 @@ -5,14 +5,14 @@ @author Bryan Quinn (bquinn@arsdigita.com) @creation-date Fri Oct 6 21:46:05 2000 @cvs-id $Id$ -} +} ad_proc -private apm_mkdir {path} { Creates the directory specified by path and returns it. -} { +} { if { [catch { file mkdir $path }] } { @@ -28,20 +28,20 @@ } ad_proc -public apm_workspace_dir {} { - + Return the path to the apm-workspace, creating the directory if necessary. - + } { set path [file join $::acs::rootdir apm-workspace] if { [file isdirectory $path] } { return $path } else { return [apm_mkdir $path] } -} +} ad_proc -public apm_workspace_install_dir {} { - + Return the path to the installation directory of the apm-workspace, creating the directory if necessary. } { @@ -89,16 +89,16 @@ @see apm_file_type_names @see apm_pretty_name_for_file_type - + @author Peter Marklund } { array set file_type_names [apm_file_type_names] return [array names file_type_names] } -ad_proc -public apm_package_info_file_path { +ad_proc -public apm_package_info_file_path { {-path ""} - package_key + package_key } { Returns the path to a .info file in a package directory, or throws an @@ -129,15 +129,15 @@ set apm_file [ad_tmpnam] db_blob_get_file distribution_tar_ball_select { - select content - from cr_revisions + select content + from cr_revisions where revision_id = (select content_item.get_latest_revision(item_id) - from apm_package_versions + from apm_package_versions where version_id = :version_id) } $apm_file file mkdir $dir - # avoid chdir + # avoid chdir #ns_log notice "exec sh -c 'cd $dir ; [apm_gzip_cmd] -d -q -c $apm_file | [apm_tar_cmd] xf - 2>/dev/null'" exec [apm_gzip_cmd] -d -q -c -S .apm $apm_file | [apm_tar_cmd] -xf - -C $dir 2> [apm_dev_null] @@ -146,15 +146,15 @@ ad_proc -private apm_generate_tarball { version_id } { - + Generates a tarball for a version, placing it in the content repository. DCW - 2001-05-03, change to use the content repository for tarball storage. - + } { set package_key [apm_package_key_from_version_id $version_id] set files [apm_get_package_files -all -package_key $package_key] set tmpfile [ad_tmpnam] - + db_1row package_key_select {} # Generate a command like: @@ -172,11 +172,11 @@ lappend cmd -C "$::acs::rootdir/packages" lappend cmd "$package_key/$file" } - + lappend cmd "|" [apm_gzip_cmd] -c ">" $tmpfile {*}$cmd - # At this point, the APM tarball is sitting in $tmpfile. Save it in + # At this point, the APM tarball is sitting in $tmpfile. Save it in # the database. set creation_ip [ad_conn peeraddr] @@ -189,7 +189,7 @@ db_1row item_exists_p {} if {!$item_id} { - # content item hasen't been created yet - create one. + # content item hasen't been created yet - create one. set item_id [content::item::new \ -name $name \ -title $title \ @@ -198,12 +198,12 @@ -creation_user $user_id \ -creation_ip $creation_ip \ -is_live true] - + db_dml set_item_id {} } set revision_id [content::item::get_live_revision -item_id $item_id] - + # No live revision for this item. Possible if somebody already # generated the archive, then deleted or modified the revision # manually or by other means. We create a new live revision. @@ -227,7 +227,7 @@ ad_proc -private apm_files_load { {-force_reload:boolean 0} - {-callback apm_dummy_callback} + {-callback apm_dummy_callback} files } { @@ -260,7 +260,7 @@ apm_callback_and_log $callback "Loaded packages/$package_key/$path." unset apm_current_package_key } else { - apm_callback_and_log $callback "Unable to load packages/$package_key/$path - file is marked as contained in a package but is not present in the filesystem" + apm_callback_and_log $callback "Unable to load packages/$package_key/$path - file is marked as contained in a package but is not present in the filesystem" } } } @@ -302,7 +302,7 @@ ad_proc -public apm_file_watchable_p { path } { Given the path of a file determine if it is appropriate to be watched for reload. The file should - be db compatible with the system and be of right + be db compatible with the system and be of right type (for example contain Tcl procs or xql queries). @param The path of the file relative to server root @@ -315,7 +315,7 @@ @see apm_guess_db_type @author Peter Marklund -} { +} { # The apm_guess procs need package_key and a path relative to package root # so parse those out of the given path if { [regexp {^packages/([^/]+)/(.*)$} $path match package_key package_rel_path] } { @@ -351,7 +351,7 @@ @see apm_get_watchable_files @author Peter Marklund -} { +} { foreach rel_path [apm_get_watchable_files $package_key] { apm_file_watch $rel_path } @@ -391,7 +391,7 @@ } return $watchable_files -} +} ad_proc -private apm_system_paths {} { @@ -410,7 +410,7 @@ ad_proc -public apm_gzip_cmd {} { @return A valid command name for gzip. - + } { return gzip } @@ -419,7 +419,7 @@ ad_proc -private apm_tar_cmd {} { @return A valid command name for tar. - + } { return tar } @@ -428,7 +428,7 @@ ad_proc -private apm_dev_null {} { @return null device - + } { if {$::tcl_platform(platform) ne "windows"} { return /dev/null @@ -446,20 +446,20 @@ # reliably under windows, for unknown reasons the downloaded file is # truncated. # - # Therefore, we check first for the NaviServer built in ns_http, then + # Therefore, we check first for the NaviServer built in ns_http, then # if the optional xotcl-core components are available... # - + # 5 minutes set timeout 300 - + set httpImpls [util::http::available -url $url -spool] if {$httpImpls ne ""} { ns_log notice "we can use the http::util:: interface using the $httpImpls implementation" set result [util::http::get -url $url -timeout $timeout -spool] file rename [dict get $result file] $output_file_name } elseif {[info commands ::ns_http] ne "" && [apm_version_names_compare [ns_info patchlevel] "4.99.5"] == 1} { - # + # # ... use ns_http when we have a version with the "-file" flag ... # foreach i {1 2 3} { @@ -475,7 +475,7 @@ set url $location } } elseif {[info commands ::xo::HttpRequest] ne ""} { - # + # # ... use xo::HttpRequest... # ns_log notice "Transfer $url to $output_file_name based on ::xo::HttpRequest" @@ -520,15 +520,15 @@ {-url {}} {file_path {}} } { - + Uncompresses and loads an APM file into the filesystem. @param url If specified, will download the APM file first. - @return If successful, a path to the .info file of the package uncompressed + @return If successful, a path to the .info file of the package uncompressed into the apm-workspace directory -} { +} { # First download the apm file if a URL is provided if { $url ne "" } { set file_path [ad_tmpnam].apm @@ -538,7 +538,7 @@ The following error was returned:
[ns_quotehtml $errmsg]
             
" return - } + } if {![file exists $file_path]} { apm_callback_and_log $callback " @@ -561,7 +561,7 @@ ns_log Error "Error loading APM file form url $url: $errmsg\n$::errorInfo" return } - + if { [llength $files] == 0 } { apm_callback_and_log $callback "The archive does not contain any files.\n" ns_log Error "Error loading APM file form url $url: The archive does not contain any files." @@ -575,13 +575,13 @@ set components [split $file "/"] if {[lindex $components 0] ne $package_key } { - apm_callback_and_log $callback "All files in the archive must be contained in the same directory - (corresponding to the package's key). This is not the case, so the archive is not + apm_callback_and_log $callback "All files in the archive must be contained in the same directory + (corresponding to the package's key). This is not the case, so the archive is not a valid APM file.\n" ns_log Error "Error loading APM file form url $url: Invalid APM file. All files in the archive must be contained in the same directory corresponding to the package's key." return } - + if { [llength $components] == 2 && [file extension $file] eq ".info" } { if { [info exists info_file] } { apm_callback_and_log $callback "The archive contains more than one package/*/*.info file, so it is not a valid APM file.\n" @@ -593,7 +593,7 @@ } } if { ![info exists info_file] || [regexp {[^a-zA-Z0-9\-\./_]} $info_file] } { - apm_callback_and_log $callback "The archive does not contain a */*.info file, so it is not + apm_callback_and_log $callback "The archive does not contain a */*.info file, so it is not a valid APM file.\n" ns_log Error "Error loading APM file form url $url: Invalid APM file. No package .info file." return @@ -605,13 +605,13 @@ exec [apm_gzip_cmd] -d -q -c -S .apm $file_path | [apm_tar_cmd] -xf - -C $tmpdir $info_file 2> [apm_dev_null] #exec sh -c "cd $tmpdir ; [apm_gzip_cmd] -d -q -c -S .apm $file_path | [apm_tar_cmd] xf - $info_file" 2> [apm_dev_null] - + if { [catch { array set package [apm_read_package_info_file [file join $tmpdir $info_file]] } errmsg]} { file delete -force -- $tmpdir - apm_callback_and_log $callback "The archive contains an unparseable package specification file: - $info_file. The following error was produced while trying to + apm_callback_and_log $callback "The archive contains an unparseable package specification file: + $info_file. The following error was produced while trying to parse it:
[ns_quotehtml $errmsg]
.

The package cannot be installed. @@ -625,16 +625,16 @@ set version_name $package(name) ns_log Debug "APM: Preparing to load $pretty_name $version_name" # Determine if this package version is already installed. - if {[apm_package_version_installed_p $package_key $version_name]} { + if {[apm_package_version_installed_p $package_key $version_name]} { apm_callback_and_log $callback "

  • $pretty_name $version_name is already installed in your system." ns_log Error "Error loading APM file form url $url: Package $pretty_name $version_name is already installed" } else { - + set install_path [apm_workspace_install_dir] if { ![file isdirectory $install_path] } { file mkdir $install_path } - + apm_callback_and_log $callback "
  • Extracting files into the filesystem." apm_callback_and_log $callback "
  • $pretty_name $version_name ready for installation." 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.76 -r1.77 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 25 Jul 2018 17:44:25 -0000 1.76 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 25 Jul 2018 17:49:26 -0000 1.77 @@ -100,15 +100,15 @@ @return a link to the user's workspace if the user is logged in. Otherwise, a link to the page root. } { if { [ad_conn user_id] != 0 } { - return "[subsite::get_element -element name]" + return "[subsite::get_element -element name]" } else { - # we don't know who this person is - return "[subsite::get_element -element name]" + # we don't know who this person is + return "[subsite::get_element -element name]" } } ad_proc -public ad_system_owner {} { - Person who owns the service + Person who owns the service this person would be interested in user feedback, etc. } { return [parameter::get -package_id [ad_acs_kernel_id] -parameter SystemOwner] @@ -135,7 +135,7 @@ @return the url for the community member page } { return "[subsite::get_element -element url -notrailing][parameter::get \ - -package_id [ad_acs_kernel_id] -parameter CommunityMemberURL]" + -package_id [ad_acs_kernel_id] -parameter CommunityMemberURL]" } ad_proc -public acs_community_member_url { @@ -191,7 +191,7 @@ -mime_type:required } { Return a string as the content of a file - + @param string Content of the file to be sent back @param filename Name of the file to be returned @param mime_type Mime Type of the file being returned @@ -201,34 +201,34 @@ } ad_proc -public ad_return_complaint { - exception_count + exception_count exception_text } { - Return a page complaining about the user's input - (as opposed to an error in our software, for which ad_return_error + Return a page complaining about the user's input + (as opposed to an error in our software, for which ad_return_error is more appropriate) @param exception_count Number of exceptions. Used to say either 'a problem' or 'some problems'. @param exception_text HTML chunk to go inside an UL tag with the error messages. } { set complaint_template [parameter::get_from_package_key \ - -package_key "acs-tcl" \ - -parameter "ReturnComplaint" \ - -default "/packages/acs-tcl/lib/ad-return-complaint"] + -package_key "acs-tcl" \ + -parameter "ReturnComplaint" \ + -default "/packages/acs-tcl/lib/ad-return-complaint"] ns_return 422 text/html [ad_parse_template \ -params [list [list exception_count $exception_count] \ - [list exception_text $exception_text]] \ - $complaint_template] - + [list exception_text $exception_text]] \ + $complaint_template] + # raise abortion flag, e.g., for templating set ::request_aborted [list 422 "Problem with Your Input"] } ad_proc ad_return_exception_page { - status - title + status + title explanation } { Returns an exception page. @@ -240,16 +240,16 @@ @param explanation Explanation for the exception. } { set error_template [parameter::get_from_package_key \ - -package_key "acs-tcl" \ - -parameter "ReturnError" \ - -default "/packages/acs-tcl/lib/ad-return-error"] + -package_key "acs-tcl" \ + -parameter "ReturnError" \ + -default "/packages/acs-tcl/lib/ad-return-error"] set page [ad_parse_template -params [list [list title $title] [list explanation $explanation]] $error_template] - if {$status > 399 + if {$status > 399 && [string match {*; MSIE *} [ns_set iget [ad_conn headers] User-Agent]] - && [string length $page] < 512 } { + && [string length $page] < 512 } { append page [string repeat " " [expr {513 - [string length $page]}]] } - + ns_return $status text/html $page # raise abortion flag, e.g., for templating @@ -258,24 +258,24 @@ ad_proc ad_return_error { - title + title explanation } { - Returns a page with the HTTP 500 (Error) code, - along with the given title and explanation. Should be used + Returns a page with the HTTP 500 (Error) code, + along with the given title and explanation. Should be used when an unexpected error is detected while processing a page. } { ad_return_exception_page 500 $title $explanation } ad_proc ad_return_warning { - title + title explanation } { - Returns a page with the HTTP 200 (Success) code, along with - the given title and explanation. Should be used when an - exceptional condition arises while processing a page which - the user should be warned about, but which does not qualify + Returns a page with the HTTP 200 (Success) code, along with + the given title and explanation. Should be used when an + exceptional condition arises while processing a page which + the user should be warned about, but which does not qualify as an error. } { ad_return_exception_page 200 $title $explanation @@ -285,34 +285,34 @@ {title ""} {explanation ""} } { - Returns a page with the HTTP 403 (Forbidden) code, along with - the given title and explanation. Should be used by - access-control filters that determine whether a user has + Returns a page with the HTTP 403 (Forbidden) code, along with + the given title and explanation. Should be used by + access-control filters that determine whether a user has permission to request a particular page. Title and explanation is optional. If neither is specified, then a default "Permission Denied" message will be displayed. } { if { $title eq "" && $explanation eq "" } { - set title "Permission Denied" - set explanation "Sorry, you haven't been given access to this area." + set title "Permission Denied" + set explanation "Sorry, you haven't been given access to this area." } ad_return_exception_page 403 $title $explanation } ad_proc ad_return_if_another_copy_is_running { - {max_simultaneous_copies 1} + {max_simultaneous_copies 1} {call_adp_break_p 0} } { - Returns a page to the user about how this server is busy if - another copy of the same script is running. Then terminates - execution of the thread. Useful for expensive pages that do - sequential searches through database tables, etc. You don't - want to tie up all of your database handles and deny service - to everyone else. - - The call_adp_break_p argument is essential - if you are calling this from an ADP page and want to avoid the + Returns a page to the user about how this server is busy if + another copy of the same script is running. Then terminates + execution of the thread. Useful for expensive pages that do + sequential searches through database tables, etc. You don't + want to tie up all of your database handles and deny service + to everyone else. + + The call_adp_break_p argument is essential + if you are calling this from an ADP page and want to avoid the performance hit of continuing to parse and run. This proc is dangerous, and needs to be rewritten. See: @@ -322,32 +322,32 @@ set this_connection_url [ad_conn url] set n_matches 0 foreach connection [ns_server active] { - set query_connection_url [lindex $connection 4] - if { $query_connection_url == $this_connection_url } { - # we got a match (we'll always get at least one - # since we should match ourselves) - incr n_matches - } + set query_connection_url [lindex $connection 4] + if { $query_connection_url == $this_connection_url } { + # we got a match (we'll always get at least one + # since we should match ourselves) + incr n_matches + } } if { $n_matches > $max_simultaneous_copies } { - ad_return_warning "Too many copies" "This is an expensive page for our server, which is already running the same program on behalf of some other users. Please try again at a less busy hour." - # blow out of the caller as well - if {$call_adp_break_p} { - # we were called from an ADP page; we have to abort processing - ns_adp_break - } - return -code return + ad_return_warning "Too many copies" "This is an expensive page for our server, which is already running the same program on behalf of some other users. Please try again at a less busy hour." + # blow out of the caller as well + if {$call_adp_break_p} { + # we were called from an ADP page; we have to abort processing + ns_adp_break + } + return -code return } # we're okay return 1 } ad_proc ad_pretty_mailing_address_from_args { - line1 + line1 line2 - city - state - postal_code + city + state + postal_code country_code } { Returns a prettily formatted address with country name, given @@ -358,16 +358,16 @@ } { set lines [list] if { $line2 eq "" } { - lappend lines $line1 + lappend lines $line1 } elseif { $line1 eq "" } { - lappend lines $line2 + lappend lines $line2 } else { - lappend lines $line1 - lappend lines $line2 + lappend lines $line1 + lappend lines $line2 } lappend lines "$city, $state $postal_code" if { $country_code ne "" && $country_code ne "us" } { - lappend lines [ad_country_name_from_country_code $country_code] + lappend lines [ad_country_name_from_country_code $country_code] } return [join $lines "\n"] } @@ -376,38 +376,38 @@ # for pages that have optional decoration ad_proc ad_decorate_top { - simple_headline + simple_headline potential_decoration } { - Use this for pages that might or might not have an image - defined in ad.ini; if the second argument isn't the empty - string, ad_decorate_top will make a one-row table for the + Use this for pages that might or might not have an image + defined in ad.ini; if the second argument isn't the empty + string, ad_decorate_top will make a one-row table for the top of the page } { if { $potential_decoration eq "" } { - return $simple_headline + return $simple_headline } else { - return "
    $potential_decoration$simple_headline
    " + return "
    $potential_decoration$simple_headline
    " } } ad_proc -private ad_requested_object_id {} { - @return The requested object id, or if it is not available, the kernel id. + @return The requested object id, or if it is not available, the kernel id. } { set package_id "" # Use the object id stored in ad_conn. if { [ad_conn -connected_p] } { - set package_id [ad_conn package_id] + set package_id [ad_conn package_id] } if { $package_id eq "" } { - if { [catch { - set package_id [ad_acs_kernel_id] - }] } { - set package_id 0 - } + if { [catch { + set package_id [ad_acs_kernel_id] + }] } { + set package_id 0 + } } return $package_id } @@ -431,7 +431,7 @@ # actually call 'ad_parameter param_name acs-kernel'. if { $package_key eq "" || $package_key eq "acs-kernel"} { - return [ns_config "ns/server/[ns_info server]/acs" $name] + return [ns_config "ns/server/[ns_info server]/acs" $name] } return [ns_config "ns/server/[ns_info server]/acs/$package_key" $name] @@ -445,7 +445,7 @@ key parameter_name } { - + Manages the cache for ad_parameter. @param set Use this flag to indicate a value to set in the cache. @param delete Delete the value from the cache @@ -454,19 +454,19 @@ id (instance parameter) or package key (global parameter). @param parameter_name Specifies the parameter name that is being cached. @return The cached value. - + } { if {$delete_p} { - if {[nsv_exists ad_param_$key $parameter_name]} { - nsv_unset ad_param_$key $parameter_name - } - return + if {[nsv_exists ad_param_$key $parameter_name]} { + nsv_unset ad_param_$key $parameter_name + } + return } if {[info exists set]} { - nsv_set "ad_param_${key}" $parameter_name $set - return $set + nsv_set "ad_param_${key}" $parameter_name $set + return $set } elseif { [nsv_exists ad_param_$key $parameter_name] } { - return [nsv_get ad_param_$key $parameter_name] + return [nsv_get ad_param_$key $parameter_name] } elseif { $global_p } { set value [db_string select_global_parameter_value { select apm_parameter_values.attr_value @@ -485,15 +485,15 @@ ad_proc -private ad_parameter_cache_all {} { Loads all package instance parameters into the proper nsv arrays -} { +} { # Cache all parameters for enabled packages. . db_foreach parameters_get_all { - select v.package_id, p.parameter_name, v.attr_value - from apm_parameters p, apm_parameter_values v - where p.parameter_id = v.parameter_id + select v.package_id, p.parameter_name, v.attr_value + from apm_parameters p, apm_parameter_values v + where p.parameter_id = v.parameter_id } { - ad_parameter_cache -set $attr_value $package_id $parameter_name - } + ad_parameter_cache -set $attr_value $package_id $parameter_name + } } # returns particular parameter values as a Tcl list (i.e., it selects @@ -506,16 +506,16 @@ Returns multiple values for a parameter as a list. -} { +} { return [join [parameter::get -package_id $package_id -parameter $name ] " "] } ad_proc doc_return {args} { - + A wrapper to be used instead of ns_return. It calls db_release_unused_handles prior to calling ns_return. This should be used instead of ns_return at the bottom - of every non-templated user-viewable page. + of every non-templated user-viewable page. } { # AOLserver/NaviServer releases handles automatically since ages @@ -549,7 +549,7 @@ Example setting a variable with extra_vars: - +
         set return_url [ad_return_url [list some_id $some_id] [some_other_id $some_other_id]]
         
    @@ -596,9 +596,9 @@

    Example:

    ad_progress_bar_begin -title "Installing..." -message_1 "Please wait..." -message_2 "Will continue automatically"
    - +
    ...
    - +
    ad_progress_bar_end -url $next_page
    @param title The title of the page @@ -610,7 +610,7 @@ } { db_release_unused_handles ad_http_cache_control - + ReturnHeaders ns_write [ad_parse_template \ -params [list \ @@ -628,7 +628,7 @@ Ends the progress bar by causing the browser to redirect to a new URL. @see ad_progress_bar_begin -} { +} { util_user_message -message $message_after_redirect ns_write "" ns_conn close Index: openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 25 Jul 2018 17:44:25 -0000 1.22 +++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 25 Jul 2018 17:49:26 -0000 1.23 @@ -9,7 +9,7 @@ ns_section ns/server/${server}/acs ns_param WithDeprecatedCode 0 - + @cvs-id $Id$ } @@ -32,9 +32,9 @@ # # ad_set_typed_form_variable_filter /my_module/* {a_id number} {b_id word} {*_id integer} # - # For all pages under /my_module, set_form_variables would set - # $a_id only if it was number, and $b_id only if it was a 'word' - # (a string that contains only letters, numbers, dashes, and + # For all pages under /my_module, set_form_variables would set + # $a_id only if it was number, and $b_id only if it was a 'word' + # (a string that contains only letters, numbers, dashes, and # underscores), and all other variables that match the pattern # *_id would be set only if they were integers. # @@ -46,7 +46,7 @@ # return 1 if the value is a valid $type_name, or 0 otherwise. # # There's also a special datatype named 'nocheck', which will - # return success regardless of the value. (See the docs for + # return success regardless of the value. (See the docs for # ad_var_type_check_${type_name}_p to see how this might be # useful.) # @@ -74,15 +74,15 @@ return filter_ok } -ad_proc -deprecated ad_dbclick_check_dml { +ad_proc -deprecated ad_dbclick_check_dml { {-bind ""} - statement_name table_name id_column_name generated_id return_url insert_dml + statement_name table_name id_column_name generated_id return_url insert_dml } { This proc is used for pages using double click protection. table_name is table_name for which we are checking whether the double click occurred. id_column_name is the name of the id table column. generated_id is the generated id, which is supposed to have - been generated on the previous page. return_url is url to which this + been generated on the previous page. return_url is url to which this procedure will return redirect in the case of successful insertion in the database. insert_sql is the sql insert statement. if data is ok this procedure will insert data into the database in a double click @@ -94,29 +94,29 @@ if { $bind ne "" } { db_dml $statement_name $insert_dml -bind $bind } else { - db_dml $statement_name $insert_dml + db_dml $statement_name $insert_dml } } errmsg] } { # Oracle choked on the insert - + # detect double click if { [db_0or1row double_click_check " - + select 1 as one from $table_name where $id_column_name = :generated_id - + " -bind [ad_tcl_vars_to_ns_set generated_id]] } { ad_returnredirect $return_url return } - + ns_log Error "[info script] choked. Oracle returned error: $errmsg" ad_return_error "Error in insert" " - We were unable to do your insert in the database. + We were unable to do your insert in the database. Here is the error that was returned:

    @@ -142,7 +142,7 @@ } elseif { $t_or_f == "f" || $t_or_f eq "F" } { return "No" } else { - # Note that we can't compare default to the empty string as in + # Note that we can't compare default to the empty string as in # many cases, we are going want the default to be the empty # string if { $default eq "default" } { @@ -153,16 +153,16 @@ } } -ad_proc -deprecated ad_export_vars { +ad_proc -deprecated ad_export_vars { -form:boolean {-exclude {}} {-override {}} {include {}} } { - Note This proc is deprecated in favor of - export_vars. They're very similar, but + Note This proc is deprecated in favor of + export_vars. They're very similar, but export_vars have a number of advantages: - +