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.29 -r1.30
--- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 3 Dec 2018 17:06:47 -0000 1.29
+++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 3 Sep 2024 15:37:34 -0000 1.30
@@ -2,8 +2,15 @@
Provides a collection of deprecated procs to provide backward
compatibility for sites who have not yet removed calls to the
- deprecated functions.
+ deprecated functions. This file should contain only
+ long-time deprecated functions, which are going to be removed
+ unless there is a good reason not to do.
+ Note that FRESHLY DEPRECATED PROCS SHOULD NOT BE moved here,
+ otherwise, site using "WithDeprecatedCode" set to 0 will
+ break immediately. One should give people at least
+ one release time to fix invocation of deprecated code.
+
In order to skip loading of deprecated code, use the following
snippet in your config file
@@ -20,6 +27,23 @@
ns_log notice "deprecated-procs: load deprecated code"
+ad_proc -deprecated ad_approval_system_inuse_p {} {
+ Returns 1 if the system is configured to use and approval system.
+
+ DEPRECATED: this proc's utility was probably transitional and is
+ as of 2022-09-07 not used anywhere in the codebase. One can always
+ query the parameters directly in case.
+
+ @see parameter::get
+} {
+ if {[parameter::get -parameter RegistrationRequiresEmailVerification] &&
+ [parameter::get -parameter RegistrationRequiresApprovalP] } {
+ return 1
+ } else {
+ return 0
+ }
+}
+
ad_proc -public -deprecated ad_set_typed_form_variable_filter {
url_pattern
args
@@ -89,6 +113,10 @@
safe manner and will returnredirect to the page specified by
return_url. if database insert fails, this procedure will return a
sensible error message to the user.
+
+ @see xotcl-request-monitor provides a double-click protection
+ feature that does not rely on the database and is transparent
+ to the developer.
} {
if { [catch {
if { $bind ne "" } {
@@ -629,7 +657,7 @@
Places the nth element of list into the variable named by
the nth element of args.
- One should use the built-in Tcl command "lassign" instread of this proc.
+ One should use the built-in Tcl command "lassign" instead of this proc.
@see lassign
@@ -831,7 +859,7 @@
}]
}
foreach attr [array names attrs] {
- lappend attr_list "$attr=\"$attrs($attr)\""
+ lappend attr_list "$attr=\"$attrs($attr)\""
}
append html "
\n"
@@ -852,24 +880,24 @@
} {
global sidegraphic_displayed_p
if { $signatory eq "" } {
- set signatory [ad_system_owner]
+ set signatory [ad_system_owner]
}
if { [info exists sidegraphic_displayed_p] && $sidegraphic_displayed_p } {
- # we put in a BR CLEAR=RIGHT so that the signature will clear any side graphic
- # from the ad-sidegraphic.tcl package
- set extra_br " "
+ # we put in a BR CLEAR=RIGHT so that the signature will clear any side graphic
+ # from the ad-sidegraphic.tcl package
+ set extra_br " "
} else {
- set extra_br ""
+ set extra_br ""
}
if { [parameter::get -package_id [ad_acs_kernel_id] -parameter EnabledP -default 0] && [parameter::get -package_id [ad_acs_kernel_id] -parameter StickInFooterP -default 0] && !$suppress_curriculum_bar_p} {
- set curriculum_bar "
[curriculum_bar]
"
+ set curriculum_bar "
[curriculum_bar]
"
} else {
- set curriculum_bar ""
+ set curriculum_bar ""
}
- if { [info commands ds_link] ne "" } {
- set ds_link [ds_link]
+ if { [namespace which ds_link] ne "" } {
+ set ds_link [ds_link]
} else {
- set ds_link ""
+ set ds_link ""
}
return "
$extra_br
@@ -913,10 +941,10 @@
@see Documentation on the site master template for the proper way to standardize page footers
} {
- if { [info commands ds_link] ne "" } {
- set ds_link [ds_link]
+ if { [namespace which ds_link] ne "" } {
+ set ds_link [ds_link]
} else {
- set ds_link ""
+ set ds_link ""
}
return "
$ds_link
@@ -935,18 +963,18 @@
@see acs_user::get
} {
uplevel {
- set user_id [ad_conn user_id]
- 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] } {
- ad_return_error "Couldn't find user info" "Couldn't find user info."
- return
- }
+ set user_id [ad_conn user_id]
+ 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] } {
+ ad_return_error "Couldn't find user info" "Couldn't find user info."
+ return
+ }
}
}
@@ -979,7 +1007,7 @@
@return The parameter of the object or if it doesn't exist, the default.
} {
if {[info exists set]} {
- set ns_param [parameter::set_value -package_id $package_id -parameter $name -value $set]
+ set ns_param [parameter::set_value -package_id $package_id -parameter $name -value $set]
} else {
set ns_param [parameter::get -localize=$localize_p -package_id $package_id -parameter $name -default $default]
}
@@ -991,53 +1019,53 @@
ad_proc -deprecated doc_serve_template { __template_path } { Serves the document in the environment using a particular template. } {
upvar #0 doc_properties __doc_properties
foreach __name [array names __doc_properties] {
- set $__name $__doc_properties($__name)
+ set $__name $__doc_properties($__name)
}
set adp [ns_adp_parse -file $__template_path]
set content_type [ns_set iget [ad_conn outputheaders] "content-type"]
if { $content_type eq "" } {
- set content_type "text/html"
+ set content_type "text/html"
}
doc_return 200 $content_type $adp
}
ad_proc -deprecated doc_serve_document {} { Serves the document currently in the environment. } {
if { ![doc_exists_p] } {
- error "No document has been built."
+ error "No document has been built."
}
set mime_type [doc_get_property mime_type]
if { $mime_type eq "" } {
- if { [doc_property_exists_p title] } {
- set mime_type "text/html;content-pane"
- } else {
- set mime_type "text/html"
- }
+ if { [doc_property_exists_p title] } {
+ set mime_type "text/html;content-pane"
+ } else {
+ set mime_type "text/html"
+ }
}
switch -- $mime_type {
- text/html;content-pane - text/x-html-content-pane {
- # It's a content pane. Find the appropriate template.
- set template_path [doc_find_template [ad_conn file]]
- if { $template_path eq "" } {
- ns_returnerror 500 "Unable to find master template"
- ns_log error \
- "Unable to find master template for file '[ad_conn file]'"
- } else {
- doc_serve_template $template_path
- }
- }
- default {
- # Return a complete document.
- ns_return 200 $mime_type [doc_get_property body]
- }
+ text/html;content-pane - text/x-html-content-pane {
+ # It's a content pane. Find the appropriate template.
+ set template_path [doc_find_template [ad_conn file]]
+ if { $template_path eq "" } {
+ ns_returnerror 500 "Unable to find master template"
+ ns_log error \
+ "Unable to find master template for file '[ad_conn file]'"
+ } else {
+ doc_serve_template $template_path
+ }
+ }
+ default {
+ # Return a complete document.
+ ns_return 200 $mime_type [doc_get_property body]
+ }
}
}
ad_proc -deprecated doc_tag_ad_document { contents params } {} {
for { set i 0 } { $i < [ns_set size $params] } { incr i } {
- doc_set_property [ns_set key $params $i] [ns_set value $params $i]
+ doc_set_property [ns_set key $params $i] [ns_set value $params $i]
}
doc_set_property _adp 1
return [template::adp_parse_string $contents]
@@ -1046,7 +1074,7 @@
ad_proc -deprecated doc_tag_ad_property { contents params } {} {
set name [ns_set iget $params name]
if { $name eq "" } {
- return "No name property in AD-PROPERTY tag"
+ return "No name property in AD-PROPERTY tag"
}
doc_set_property $name $contents
}
@@ -1056,7 +1084,7 @@
ad_proc -deprecated doc_init {} { Initializes the global environment for document handling. } {
global doc_properties
if { [info exists doc_properties] } {
- unset doc_properties
+ unset doc_properties
}
array set doc_properties {}
}
@@ -1074,7 +1102,7 @@
ad_proc -deprecated doc_get_property { name } { Returns a property (or an empty string if no such property exists). } {
global doc_properties
if { [info exists doc_properties($name)] } {
- return $doc_properties($name)
+ return $doc_properties($name)
}
return ""
}
@@ -1091,7 +1119,7 @@
ad_proc -deprecated doc_exists_p {} { Returns 1 if there is a document in the global environment. } {
global doc_properties
if { [array size doc_properties] > 0 } {
- return 1
+ return 1
}
return 0
}
@@ -1105,17 +1133,17 @@
set start [clock clicks -milliseconds]
- set dir [file dirname $filename]
+ set dir [ad_file dirname $filename]
while { [string length $dir] > 1 && [string first $path_root $dir] == 0 } {
- # Only look in directories under the path root.
- if { [file isfile "$dir/master.adp"] } {
- return "$dir/master.adp"
- }
- set dir [file dirname $dir]
+ # Only look in directories under the path root.
+ if { [file isfile "$dir/master.adp"] } {
+ return "$dir/master.adp"
+ }
+ set dir [ad_file dirname $dir]
}
if { [file exists "$path_root/templates/master.adp"] } {
- return "$path_root/templates/master.adp"
+ return "$path_root/templates/master.adp"
}
# Uhoh. Nada!
@@ -1180,28 +1208,28 @@
}
ad_proc -deprecated -warn util_quotehtml { arg } {
- This proc does exactly the same as ad_quotehtml.
+ This proc does exactly the same as ns_quotehtml.
Use that instead. This one will be deleted eventually.
- @see ad_quotehtml
+ @see ns_quotehtml
} {
return [ns_quotehtml $arg]
}
ad_proc -deprecated util_quote_double_quotes {arg} {
- This proc does exactly the same as ad_quotehtml.
+ This proc does exactly the same as ns_quotehtml.
Use that instead. This one will be deleted eventually.
- @see ad_quotehtml
+ @see ns_quotehtml
} {
return [ns_quotehtml $arg]
}
ad_proc -deprecated philg_quote_double_quotes {arg} {
- This proc does exactly the same as ad_quotehtml.
+ This proc does exactly the same as ns_quotehtml.
Use that instead. This one will be deleted eventually.
- @see ad_quotehtml
+ @see ns_quotehtml
} {
return [ns_quotehtml $arg]
}
@@ -1216,6 +1244,8 @@
You only really need to call this if you need the variables
(for example to pick which select statement and table to actually use)
+
+ @see ns_set
} {
set out {}
@@ -1273,10 +1303,10 @@
Note: all the variables in this function are named Tblah since we could potentially
have namespace collisions
- build and return an html fragment given an active query and a data definition.
+ build and return an HTML fragment given an active query and a data definition.
sql_qry -- The query that should be executed to generate the table.
- You can specify an optional -bind argument to specify a ns_set of bind variables.
+ You can specify an optional -bind argument to specify an ns_set of bind variables.
Tdatadef -- the table declaration.
@@ -1304,9 +1334,9 @@
would do the right thing.
the value "no_sort" should be used for columns which should not allow sorting.
-
- the value "sort_by_pos" should be used if the columns passed in
- are column positions rather than column names.
+
+ the value "sort_by_pos" should be used if the columns passed in
+ are column positions rather than column names.
display_info. If this is a null string you just default to generating
<td>column_id</td>. If it is a string in the lookup list
@@ -1336,165 +1366,168 @@
@param dbn The database name to use. If empty_string, uses the default database.
+
+ @see template::list::create
+ @see ::xo::Table
} {
set full_statement_name [db_qd_get_fullname $statement_name]
# This procedure needs a full rewrite!
db_with_handle -dbn $dbn Tdb {
- # Execute the query
+ # Execute the query
set selection [db_exec select $Tdb $full_statement_name $sql_qry]
- set Tcount 0
- set Tband_count 0
- set Tpage_count 0
- set Tband_color 0
- set Tband_class 0
- set Tn_bands [llength $Tband_colors]
- set Tn_band_classes [llength $Tband_classes]
- set Tform [ad_conn form]
+ set Tcount 0
+ set Tband_count 0
+ set Tpage_count 0
+ set Tband_color 0
+ set Tband_class 0
+ set Tn_bands [llength $Tband_colors]
+ set Tn_band_classes [llength $Tband_classes]
+ set Tform [ad_conn form]
- # export variables from calling environment
- if {$Textra_vars ne ""} {
- foreach Tvar $Textra_vars {
- upvar $Tvar $Tvar
- }
- }
+ # export variables from calling environment
+ if {$Textra_vars ne ""} {
+ foreach Tvar $Textra_vars {
+ upvar $Tvar $Tvar
+ }
+ }
- # get the current ordering information
- set Torderbykey {::not_sorted::}
- set Treverse {}
- regexp {^([^*,]+)([*])?} $Torderby match Torderbykey Treverse
- if {$Treverse eq "*"} {
- set Torder desc
- } else {
- set Torder asc
- }
+ # get the current ordering information
+ set Torderbykey {::not_sorted::}
+ set Treverse {}
+ regexp {^([^*,]+)([*])?} $Torderby match Torderbykey Treverse
+ if {$Treverse eq "*"} {
+ set Torder desc
+ } else {
+ set Torder asc
+ }
- # set up the target url for new sorts
- if {$Torder_target_url eq ""} {
- set Torder_target_url [ad_conn url]
- }
- set Texport "[uplevel [list export_ns_set_vars url [list orderby$Tsuffix]]]&"
- if {$Texport == "&"} {
- set Texport {}
- }
- set Tsort_url "$Torder_target_url?${Texport}orderby$Tsuffix="
+ # set up the target url for new sorts
+ if {$Torder_target_url eq ""} {
+ set Torder_target_url [ad_conn url]
+ }
+ set Texport "[uplevel [list export_ns_set_vars url [list orderby$Tsuffix]]]&"
+ if {$Texport == "&"} {
+ set Texport {}
+ }
+ set Tsort_url "$Torder_target_url?${Texport}orderby$Tsuffix="
- set Thtml {}
- set Theader {}
+ set Thtml {}
+ set Theader {}
- # build the list of columns to display...
- set Tcolumn_list [ad_table_column_list $Tdatadef $Tcolumns]
+ # build the list of columns to display...
+ set Tcolumn_list [ad_table_column_list $Tdatadef $Tcolumns]
- # generate the header code
- #
- append Theader "
\n"
+ }
+ foreach Ti $Tcolumn_list {
+ set Tcol [lindex $Tdatadef $Ti]
+ if { ( [ns_set find $selection [lindex $Tcol 0]] < 0
+ && ([lindex $Tcol 2] eq "" || [lindex $Tcol 2] ne "sort_by_pos")
+ )
+ || [lindex $Tcol 2] eq "no_sort"
+ } {
- # not either a column in the select or has sort code
- # then just a plain text header so do not do sorty things
- append Theader "
[lindex $Tcol 1]
\n"
- } else {
- if {[lindex $Tcol 0] eq $Torderbykey } {
- if {$Torder eq "desc"} {
- set Tasord $Tasc_order_img
- } else {
- set Tasord $Tdesc_order_img
- }
- } else {
- set Tasord {}
- }
- set href $Tsort_url[ns_urlencode [ad_new_sort_by [lindex $Tcol 0] $Torderby]]
- append Theader \
- [subst {
\n"
+ }
+ }
+ append Theader "\n"
- #
- # This has gotten kind of ugly. Here we are looping over the
- # rows returned and then potentially a list of ns_sets which can
- # be passed in (grrr. Richard Li needs for general protections stuff
- # for "fake" public record which does not exist in DB).
- #
+ #
+ # This has gotten kind of ugly. Here we are looping over the
+ # rows returned and then potentially a list of ns_sets which can
+ # be passed in (grrr. Richard Li needs for general protections stuff
+ # for "fake" public record which does not exist in DB).
+ #
- set Tpost_data 0
+ set Tpost_data 0
- while { 1 } {
- if {!$Tpost_data && [ns_db getrow $Tdb $selection]} {
- # in all its evil majesty
- set_variables_after_query
- } else {
- # move on to fake rows...
- incr Tpost_data
- }
+ while { 1 } {
+ if {!$Tpost_data && [ns_db getrow $Tdb $selection]} {
+ # in all its evil majesty
+ set_variables_after_query
+ } else {
+ # move on to fake rows...
+ incr Tpost_data
+ }
- if { $Tpost_data && $Tpost_data <= [llength $Tpost_data_ns_sets] } {
- # bind the Tpost_data_ns_sets row of the passed in data
- set_variables_after_query_not_selection [lindex $Tpost_data_ns_sets $Tpost_data-1]
- } elseif { $Tpost_data } {
- # past the end of the fake data drop out.
- break
- }
+ if { $Tpost_data && $Tpost_data <= [llength $Tpost_data_ns_sets] } {
+ # bind the Tpost_data_ns_sets row of the passed in data
+ set_variables_after_query_not_selection [lindex $Tpost_data_ns_sets $Tpost_data-1]
+ } elseif { $Tpost_data } {
+ # past the end of the fake data drop out.
+ break
+ }
- if { $Tmax_rows && $Tcount >= $Tmax_rows } {
- if { ! $Tpost_data } {
- # we hit max count and had rows left to read...
- ns_db flush $Tdb
- }
- break
- }
+ if { $Tmax_rows && $Tcount >= $Tmax_rows } {
+ if { ! $Tpost_data } {
+ # we hit max count and had rows left to read...
+ ns_db flush $Tdb
+ }
+ break
+ }
- # deal with putting in the header if need
- if { $Tcount == 0 } {
- append Thtml "$Theader"
- } elseif { $Tpage_count == 0 } {
- append Thtml "
\n$Ttable_break_html\n$Theader"
- }
+ # deal with putting in the header if need
+ if { $Tcount == 0 } {
+ append Thtml "$Theader"
+ } elseif { $Tpage_count == 0 } {
+ append Thtml "
\n$Ttable_break_html\n$Theader"
+ }
- # first check if we are in audit mode and if the audit columns have changed
- set Tdisplay_changes_only 0
- if {$Taudit ne "" && $Tcount > 0} {
- # check if the audit key columns changed
- foreach Taudit_key $Taudit {
- if {[set $Taudit_key] eq [set P$Taudit_key] } {
- set Tdisplay_changes_only 1
- }
- }
- }
+ # first check if we are in audit mode and if the audit columns have changed
+ set Tdisplay_changes_only 0
+ if {$Taudit ne "" && $Tcount > 0} {
+ # check if the audit key columns changed
+ foreach Taudit_key $Taudit {
+ if {[set $Taudit_key] eq [set P$Taudit_key] } {
+ set Tdisplay_changes_only 1
+ }
+ }
+ }
- # this is for breaking on sorted field etc.
- append Thtml [subst $Tpre_row_code]
+ # this is for breaking on sorted field etc.
+ append Thtml [subst $Tpre_row_code]
- if { ! $Tdisplay_changes_only } {
- # in audit mode a record spans multiple rows.
- incr Tcount
- incr Tband_count
- }
- incr Tpage_count
+ if { ! $Tdisplay_changes_only } {
+ # in audit mode a record spans multiple rows.
+ incr Tcount
+ incr Tband_count
+ }
+ incr Tpage_count
- if { $Trows_per_page && $Tpage_count >= $Trows_per_page } {
- set Tband_color 0
- set Tband_class 0
- set Tband_count 0
- set Tpage_count 0
+ if { $Trows_per_page && $Tpage_count >= $Trows_per_page } {
+ set Tband_color 0
+ set Tband_class 0
+ set Tband_count 0
+ set Tpage_count 0
- }
+ }
set Trow_default {}
- # generate the row band color
+ # generate the row band color
if { $Tband_count >= $Trows_per_band } {
set Tband_count 0
set Tband_color [expr {($Tband_color + 1) % $Tn_bands} ]
@@ -1512,52 +1545,52 @@
set Trow_default "
"
- append Thtml [subst $Trow_code]
+ append Thtml [subst $Trow_code]
- foreach Ti $Tcolumn_list {
- set Tcol [lindex $Tdatadef $Ti]
- # If we got some special formatting code we handle it
- # single characters r l c are special for alignment
- set Tformat [lindex $Tcol 3]
- set Tcolumn [lindex $Tcol 0]
- switch -- $Tformat {
- "" {set Tdisplay_field "
[set $Tcolumn]
\n"}
- r {set Tdisplay_field "
[set $Tcolumn]
\n"}
- l {set Tdisplay_field "
[set $Tcolumn]
\n"}
- c {set Tdisplay_field "
[set $Tcolumn]
\n"}
- tf {set Tdisplay_field "
[util_PrettyBoolean [set $Tcolumn]]
\n"}
- 01 {set Tdisplay_field "
[util_PrettyTclBoolean [set $Tcolumn]]
\n"}
- bz {set Tdisplay_field "
[blank_zero [set $Tcolumn]]
\n"}
- default {set Tdisplay_field " [subst $Tformat]\n"}
- }
+ foreach Ti $Tcolumn_list {
+ set Tcol [lindex $Tdatadef $Ti]
+ # If we got some special formatting code we handle it
+ # single characters r l c are special for alignment
+ set Tformat [lindex $Tcol 3]
+ set Tcolumn [lindex $Tcol 0]
+ switch -- $Tformat {
+ "" {set Tdisplay_field "
\n"
+ append Thtml "\n"
- # keep the last row around so we can do fancy things.
- # so on next row we can say things like if $Pvar != $var not blank
- if { $Tpost_data && $Tpost_data <= [llength $Tpost_data_ns_sets] } {
- # bind the Tpost_data_ns_sets row of the passed in data
- set_variables_after_query_not_selection [lindex $Tpost_data_ns_sets $Tpost_data-1] P
- } else {
- set_variables_after_query_not_selection $selection P
- }
- }
+ # keep the last row around so we can do fancy things.
+ # so on next row we can say things like if $Pvar != $var not blank
+ if { $Tpost_data && $Tpost_data <= [llength $Tpost_data_ns_sets] } {
+ # bind the Tpost_data_ns_sets row of the passed in data
+ set_variables_after_query_not_selection [lindex $Tpost_data_ns_sets $Tpost_data-1] P
+ } else {
+ set_variables_after_query_not_selection $selection P
+ }
+ }
- if { $Tcount > 0} {
- append Thtml "$Textra_rows
+ if { $Tcount > 0} {
+ append Thtml "$Textra_rows
\n"
- } else {
- append Thtml $Tmissing_text
- }
+ } else {
+ append Thtml $Tmissing_text
+ }
}
return $Thtml
}
@@ -1571,6 +1604,9 @@
returns a list of indexes into the columns one per column it found
-sortable from t/f/all
+
+ @see template::list::create
+ @see ::xo::Table
} {
set column_list {}
if {$columns eq ""} {
@@ -1609,6 +1645,10 @@
ad_proc -deprecated ad_sort_primary_key {orderby} {
return the primary (first) key of an order spec
used by
+
+ @see template::list::create
+ @see ::xo::Table
+ @see regexp
} {
if {[regexp {^([^*,]+)} $orderby match]} {
return $match
@@ -1622,6 +1662,8 @@
returns true if the variable has same value as
on the previous row. Always false for 1st row.
+ @see template::list::create
+ @see ::xo::Table
} {
if { [uplevel set Tcount]
&& [uplevel string compare \$$varname \$P$varname] == 0} {
@@ -1634,6 +1676,9 @@
ad_proc -deprecated ad_table_span {str {td_html "align=\"left\""}} {
given string the function generates a row which spans the
whole table.
+
+ @see template::list::create
+ @see ::xo::Table
} {
return "
$str
"
}
@@ -1653,6 +1698,14 @@
allowed is the list of all the displayable columns, if empty
all columns are allowed.
+
+ @see ad_form
+ @see template::form
+ @see ::Generic::Form
+ @see ::xowiki::Form
+ @see ::xowiki::FormPage
+ @see template::list::create
+ @see ::xo::Table
} {
# first build a map of all available columns
set sel_list [ad_table_column_list $datadef $allowed]
@@ -1739,7 +1792,7 @@
} else {
set out $options
}
- regsub -all {@@} $out $i out
+ regsub -all -- {@@} $out $i out
append html "
+
+ @see template::list::create
+ @see ::xo::Table
} {
# first build a map of all available columns
set sel_list [ad_table_column_list -sortable t $datadef $allowed]
@@ -1870,6 +1926,9 @@
ad_proc -deprecated ad_order_by_from_sort_spec {sort_by tabledef} {
Takes a sort_by spec, and translates it into an "order by" clause
with each sort_by key dictated by the sort info in tabledef
+
+ @see template::list::create
+ @see ::xo::Table
} {
set order_by_clause {}
@@ -1915,6 +1974,9 @@
different column are the same. If that different column is used as the primary
sort key to reorder, the things which have the same value for the newly-sorted
column will remain in the same relative order.
+
+ @see template::list::create
+ @see ::xo::Table
} {
if { $keys eq "" } {
return $key
@@ -1937,6 +1999,8 @@
ad_proc -deprecated ad_same_page_link {variable value text {form ""}} {
Makes a link to this page, with a new value for "variable".
+
+ @see export_vars
} {
if { $form eq "" } {
set form [ns_getform]
@@ -1950,6 +2014,9 @@
returns the opposite sort order from the
one it is given. Mostly for columns whose natural
sort order is not the default.
+
+ @see template::list::create
+ @see ::xo::Table
} {
switch [string tolower $order] {
desc {return asc}
@@ -1961,33 +2028,41 @@
ad_proc -deprecated ad_custom_load {user_id item_group item item_type} {
load a persisted user customization as saved by
for example table-custom.tcl.
+
+ This proc was ported from the old ACS, but the data model was not.
+
+ @see https://cvs.openacs.org/browse/OpenACS/web/openacs/www/doc/sql/user-custom.sql
} {
if {
- ![db_0or1row load_user_customization {
- select value_type, value
- from user_custom
- where user_id = :user_id
- and item_type = :item_type
- and item_group = :item_group
- and item = :item
- }]
+ ![db_0or1row load_user_customization {
+ select value_type, value
+ from user_custom
+ where user_id = :user_id
+ and item_type = :item_type
+ and item_group = :item_group
+ and item = :item
+ }]
} {
- set value {}
+ set value {}
}
return $value
}
ad_proc -deprecated ad_custom_list {user_id item_group item_set item_type target_url custom_url {new_string "new view"}} {
- Generates the html fragment for choosing, editing and creating
+ Generates the HTML fragment for choosing, editing and creating
user customized data
+
+ This proc was ported from the old ACS, but the data model was not.
+
+ @see https://cvs.openacs.org/browse/OpenACS/web/openacs/www/doc/sql/user-custom.sql
} {
set items [db_list custom_list {
- select item from user_custom
- where user_id = :user_id
- and item_type = :item_type
- and item_group = :item_group
+ select item from user_custom
+ where user_id = :user_id
+ and item_type = :item_type
+ and item_group = :item_group
}]
set break {}
@@ -2008,6 +2083,9 @@
ad_proc -deprecated ad_custom_page_defaults {defaults} {
set the page defaults. If the form is
empty do a returnredirect with the defaults set
+
+ @see ad_page_contract
+ @see ad_include_contract
} {
set form [ns_getform]
if {$form eq ""
@@ -2035,6 +2113,15 @@
ad_proc -deprecated ad_custom_form {return_url item_group item} {
sets up the head of a form to feed to /tools/form-custom.tcl
+
+ Deprecated: there are many better ways now to create forms in
+ OpenACS
+
+ @see ad_form
+ @see template::form
+ @see ::Generic::Form
+ @see ::xowiki::Form
+ @see ::xowiki::FormPage
} {
append html "