Index: openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl 1 Oct 2017 12:16:05 -0000 1.9
+++ openacs-4/packages/acs-tcl/tcl/aolserver-3-procs.tcl 3 Sep 2024 15:37:34 -0000 1.10
@@ -1,7 +1,7 @@
ad_library {
Contains procedures specific to AOLserver 3 (mostly recreating
- functionality dropped from AOLserver 2).
+ functionality dropped from AOLserver 2).
@creation-date 27 Feb 2000
@author Jon Salz [jsalz@arsdigita.com]
@@ -17,92 +17,92 @@
upvar $valuebyref value
if {[ns_set get $formdata $column.NULL] == "t"} {
- set value ""
- return 0
+ set value ""
+ return 0
}
set value [ns_set get $formdata $column]
if { [string match $value ""] } {
switch -- $type {
-
- date {
- set value [ns_buildsqldate \
- [ns_set get $formdata $column.month] \
- [ns_set get $formdata $column.day] \
- [ns_set get $formdata $column.year]]
- }
-
- time {
- set value [ns_buildsqltime \
- [ns_set get $formdata $column.time] \
- [ns_set get $formdata $column.ampm]]
- }
-
+
+ date {
+ set value [ns_buildsqldate \
+ [ns_set get $formdata $column.month] \
+ [ns_set get $formdata $column.day] \
+ [ns_set get $formdata $column.year]]
+ }
+
+ time {
+ set value [ns_buildsqltime \
+ [ns_set get $formdata $column.time] \
+ [ns_set get $formdata $column.ampm]]
+ }
+
datetime -
- timestamp {
- set value [ns_buildsqltimestamp \
- [ns_set get $formdata $column.month] \
- [ns_set get $formdata $column.day] \
- [ns_set get $formdata $column.year] \
- [ns_set get $formdata $column.time] \
- [ns_set get $formdata $column.ampm]]
- }
-
- default {
- }
- }
+ timestamp {
+ set value [ns_buildsqltimestamp \
+ [ns_set get $formdata $column.month] \
+ [ns_set get $formdata $column.day] \
+ [ns_set get $formdata $column.year] \
+ [ns_set get $formdata $column.time] \
+ [ns_set get $formdata $column.ampm]]
+ }
+
+ default {
+ }
+ }
}
if { [string match $value ""] } {
- return -1
+ return -1
} else {
- return 1
+ return 1
}
}
proc ns_dbformvalueput {htmlform column type value} {
switch -- $type {
- date {
- set retval [ns_formvalueput $htmlform $column.NULL f]
- set retval [ns_formvalueput $retval $column.month \
- [ns_parsesqldate month $value]]
- set retval [ns_formvalueput $retval $column.day \
- [ns_parsesqldate day $value]]
- set retval [ns_formvalueput $retval $column.year \
- [ns_parsesqldate year $value]]
- }
+ date {
+ set retval [ns_formvalueput $htmlform $column.NULL f]
+ set retval [ns_formvalueput $retval $column.month \
+ [ns_parsesqldate month $value]]
+ set retval [ns_formvalueput $retval $column.day \
+ [ns_parsesqldate day $value]]
+ set retval [ns_formvalueput $retval $column.year \
+ [ns_parsesqldate year $value]]
+ }
- time {
- set retval [ns_formvalueput $htmlform $column.NULL f]
- set retval [ns_formvalueput $retval $column.time \
- [ns_parsesqltime time $value]]
- set retval [ns_formvalueput $retval $column.ampm \
- [ns_parsesqltime ampm $value]]
+ time {
+ set retval [ns_formvalueput $htmlform $column.NULL f]
+ set retval [ns_formvalueput $retval $column.time \
+ [ns_parsesqltime time $value]]
+ set retval [ns_formvalueput $retval $column.ampm \
+ [ns_parsesqltime ampm $value]]
- }
+ }
datetime -
- timestamp {
- set retval [ns_formvalueput $htmlform $column.NULL f]
- set retval [ns_formvalueput $retval $column.month \
- [ns_parsesqltimestamp month $value]]
- set retval [ns_formvalueput $retval $column.day \
- [ns_parsesqltimestamp day $value]]
- set retval [ns_formvalueput $retval $column.year \
- [ns_parsesqltimestamp year $value]]
- set retval [ns_formvalueput $retval $column.time \
- [ns_parsesqltimestamp time $value]]
- set retval [ns_formvalueput $retval $column.ampm \
- [ns_parsesqltimestamp ampm $value]]
-
- }
+ timestamp {
+ set retval [ns_formvalueput $htmlform $column.NULL f]
+ set retval [ns_formvalueput $retval $column.month \
+ [ns_parsesqltimestamp month $value]]
+ set retval [ns_formvalueput $retval $column.day \
+ [ns_parsesqltimestamp day $value]]
+ set retval [ns_formvalueput $retval $column.year \
+ [ns_parsesqltimestamp year $value]]
+ set retval [ns_formvalueput $retval $column.time \
+ [ns_parsesqltimestamp time $value]]
+ set retval [ns_formvalueput $retval $column.ampm \
+ [ns_parsesqltimestamp ampm $value]]
- default {
+ }
- set retval [ns_formvalueput $htmlform $column $value]
- }
+ default {
+
+ set retval [ns_formvalueput $htmlform $column $value]
+ }
}
return $retval
}
@@ -111,15 +111,15 @@
upvar $var updatebutton
if { ![info exists updatebutton] } {
- set updatebutton ""
+ set updatebutton ""
}
if { "" eq $updatebutton } {
- db_with_handle db {
- set updatebutton [ns_table value $db $table update_button_label]
- }
+ db_with_handle db {
+ set updatebutton [ns_table value $db $table update_button_label]
+ }
}
if { "" eq $updatebutton } {
- set updatebutton "Update Record"
+ set updatebutton "Update Record"
}
}
@@ -132,7 +132,7 @@
# Tcl page support
proc ns_putscript {conn ignored} {
- ns_returnbadrequest $conn "Cannot PUT a script file"
+ ns_returnbadrequest $conn "Cannot PUT a script file"
}
# _ns_dateentrywidget is not very popular and is not
@@ -157,7 +157,7 @@
}
proc _ns_timeentrywidget {column} {
-
+
set output "