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.92 -r1.93
--- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 22 Dec 2017 13:26:15 -0000 1.92
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 19 Jan 2018 20:56:00 -0000 1.93
@@ -263,25 +263,8 @@
return [expr { $db_type eq "" || [db_type] eq $db_type }]
}
-ad_proc -deprecated db_package_supports_rdbms_p { db_type_list } {
- @return 1 if db_type_list contains the current RDMBS type. A package intended to run with a given RDBMS must note this in it's package info file regardless of whether or not it actually uses the database.
- @see apm_package_supports_rdbms_p
-} {
- if { [lsearch $db_type_list [db_type]] != -1 } {
- return 1
- }
- # DRB: Legacy package check - we allow installation of old aD Oracle 4.2 packages,
- # though we don't guarantee that they work.
-
- if { [db_type] eq "oracle" && [lsearch $db_type_list "oracle-8.1.6"] != -1 } {
- return 1
- }
-
- return 0
-}
-
ad_proc -private db_legacy_package_p { db_type_list } {
@return 1 if the package is a legacy package. We can only tell for certain if it explicitly supports Oracle 8.1.6 rather than the OpenACS more general oracle.
} {
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.37 -r1.38
--- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 7 Aug 2017 23:47:59 -0000 1.37
+++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 19 Jan 2018 20:56:00 -0000 1.38
@@ -403,15 +403,7 @@
return $watchable_files
}
-ad_proc -public -deprecated pkg_home {package_key} {
- @return A server-root relative path to the directory for a package. Usually /packages/package-key
- @see acs_package_root_dir
-
-} {
- return "/packages/$package_key"
-}
-
ad_proc -private apm_system_paths {} {
@return a list of acceptable system paths to search for executables in.
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v
diff -u -r1.97 -r1.98
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 1 Oct 2017 12:16:05 -0000 1.97
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 19 Jan 2018 20:56:00 -0000 1.98
@@ -129,12 +129,6 @@
}
-ad_proc -public -deprecated apm_doc_body_callback { string } {
- This callback uses the document api to append more text to the stream.
-} {
- doc_body_append $string
-}
-
ad_proc apm_callback_and_log { { -severity Notice } callback message } {
Executes the $callback callback routine with $message as an argument,
Index: openacs-4/packages/acs-tcl/tcl/community-core-2-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-2-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-tcl/tcl/community-core-2-procs.tcl 7 Aug 2017 23:47:59 -0000 1.4
+++ openacs-4/packages/acs-tcl/tcl/community-core-2-procs.tcl 19 Jan 2018 20:56:00 -0000 1.5
@@ -9,23 +9,6 @@
}
-# The User Namespace
-namespace eval oacs::user {
-
- ad_proc -deprecated -public get {
- {-user_id:required}
- {-array:required}
- } {
- Load up user information
- @see acs_user::get
- } {
- # Upvar the Tcl Array
- upvar $array row
- db_1row select_user {} -column_array row
- }
-
-}
-
# Local variables:
# mode: tcl
# tcl-indent-level: 4
Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v
diff -u -r1.64 -r1.65
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 16 Aug 2017 09:18:20 -0000 1.64
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 19 Jan 2018 20:56:00 -0000 1.65
@@ -12,100 +12,6 @@
namespace eval person {}
namespace eval acs_user {}
-ad_proc -deprecated -private cc_lookup_screen_name_user { screen_name } {
- @see acs_user::get_user_id_by_screen_name
-} {
- return [db_string user_select {} -default {}]
-}
-
-ad_proc -deprecated cc_screen_name_user { screen_name } {
-
- @return Returns the user ID for a particular screen name, or an empty string
- if none exists.
-
- @see acs_user::get_user_id_by_screen_name
-
-} {
- return [util_memoize [list cc_lookup_screen_name_user $screen_name]]
-}
-
-ad_proc -deprecated -private cc_lookup_email_user { email } {
- Return the user_id of a user given the email. Returns the empty string if no such user exists.
- @see party::get_by_email
-} {
- return [db_string user_select {} -default {}]
-}
-
-ad_proc -public -deprecated cc_email_from_party { party_id } {
- @return The email address of the indicated party.
- @see party::email
-} {
- return [db_string email_from_party {} -default {}]
-}
-
-ad_proc -deprecated cc_email_user { email } {
-
- @return Returns the user ID for a particular email address, or an empty string
- if none exists.
-
- @see party::get_by_email
-} {
- return [util_memoize [list cc_lookup_email_user $email]]
-}
-
-ad_proc -deprecated -private cc_lookup_name_group { name } {
- @see group::get_id
-} {
- return [db_string group_select {} -default {}]
-}
-
-ad_proc -deprecated cc_name_to_group { name } {
-
- Returns the group ID for a particular name, or an empty string
- if none exists.
-
- @see group::get_id
-} {
- return [util_memoize [list cc_lookup_name_group $name]]
-}
-
-ad_proc -deprecated ad_user_new {
- email
- first_names
- last_name
- password
- password_question
- password_answer
- {url ""}
- {email_verified_p "t"}
- {member_state "approved"}
- {user_id ""}
- {username ""}
- {authority_id ""}
- {screen_name ""}
-} {
- Creates a new user in the system. The user_id can be specified as an argument to enable double click protection.
- If this procedure succeeds, returns the new user_id. Otherwise, returns 0.
-
- @see auth::create_user
- @see auth::create_local_account
-} {
- return [auth::create_local_account_helper \
- $email \
- $first_names \
- $last_name \
- $password \
- $password_question \
- $password_answer \
- $url \
- $email_verified_p \
- $member_state \
- $user_id \
- $username \
- $authority_id \
- $screen_name]
-}
-
ad_proc -public person::person_p {
{-party_id:required}
} {
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.4 -r1.5
--- openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 19 Jan 2018 20:39:16 -0000 1.4
+++ openacs-4/packages/acs-tcl/tcl/deprecated-procs.tcl 19 Jan 2018 20:56:00 -0000 1.5
@@ -1106,6 +1106,2061 @@
return ""
}
+####################
+#
+# Legacy stuff
+#
+####################
+
+
+ad_proc -deprecated util_striphtml {html} {
+ Deprecated. Use ad_html_to_text instead.
+
+ @see ad_html_to_text
+} {
+ return [ad_html_to_text -- $html]
+}
+
+
+ad_proc -deprecated util_convert_plaintext_to_html { raw_string } {
+
+ Almost everything this proc does can be accomplished with the ad_text_to_html
.
+ Use that proc instead.
+
+
+ + Only difference is that ad_text_to_html doesn't check + to see if the plaintext might in fact be HTML already by + mistake. But we usually don't want that anyway, + because maybe the user wanted a <p> tag in his + plaintext. We'd rather let the user change our + opinion about the text, e.g. html_p = 't'. + + @see ad_text_to_html +} { + if { [regexp -nocase {
} $raw_string] || [regexp -nocase {
} $raw_string] } {
+ # user was already trying to do this as HTML
+ return $raw_string
+ } else {
+ return [ad_text_to_html -no_links -- $raw_string]
+ }
+}
+
+ad_proc -deprecated util_maybe_convert_to_html {raw_string html_p} {
+
+ This proc is deprecated. Use ad_convert_to_html
+ instead.
+
+ @see ad_convert_to_html
+
+} {
+ if { $html_p == "t" } {
+ return $raw_string
+ } else {
+ return [ad_text_to_html -- $raw_string]
+ }
+}
+
+ad_proc -deprecated -warn util_quotehtml { arg } {
+ This proc does exactly the same as ad_quotehtml
.
+ Use that instead. This one will be deleted eventually.
+
+ @see ad_quotehtml
+} {
+ return [ns_quotehtml $arg]
+}
+
+ad_proc -deprecated util_quote_double_quotes {arg} {
+ This proc does exactly the same as ad_quotehtml
.
+ Use that instead. This one will be deleted eventually.
+
+ @see ad_quotehtml
+} {
+ return [ns_quotehtml $arg]
+}
+
+ad_proc -deprecated philg_quote_double_quotes {arg} {
+ This proc does exactly the same as ad_quotehtml
.
+ Use that instead. This one will be deleted eventually.
+
+ @see ad_quotehtml
+} {
+ return [ns_quotehtml $arg]
+}
+
+
+
+
+ad_proc -deprecated ad_dimensional_set_variables {option_list {options_set ""}} {
+ set the variables defined in option_list from the form provided
+ (form defaults to ad_conn form) or to default value from option_list if
+ not in the form data.
+
+ You only really need to call this if you need the variables
+ (for example to pick which select statement and table to actually use)
+} {
+ set out {}
+
+ if {$option_list eq ""} {
+ return
+ }
+
+ if {$options_set eq ""} {
+ set options_set [ns_getform]
+ }
+
+ foreach option $option_list {
+ # find out what the current option value is.
+ # check if a default is set otherwise the first value is used
+ set option_key [lindex $option 0]
+ set option_val {}
+ # get the option from the form
+ if { $options_set ne "" && [ns_set find $options_set $option_key] != -1} {
+ uplevel [list set $option_key [ns_set get $options_set $option_key]]
+ } else {
+ uplevel [list set $option_key [lindex $option 2]]
+ }
+ }
+}
+
+ad_proc -deprecated ad_table {
+ {-Torder_target_url {}}
+ {-Torderby {}}
+ {-Tasc_order_img {^}}
+ {-Tdesc_order_img {v}}
+ {-Tmissing_text "No data found."}
+ {-Tsuffix {}}
+ {-Tcolumns {}}
+ {-Taudit {}}
+ {-Trows_per_band 1}
+ {-Tband_colors {{} "#ececec"}}
+ {-Tband_classes {{even} {odd}}}
+ {-Trows_per_page 0}
+ {-Tmax_rows 0}
+ {-Ttable_extra_html {cellpadding=3 cellspacing=0 class="table-display"}}
+ {-Theader_row_extra {style="background-color:#f8f8f8" class="table-header"}}
+ {-Ttable_break_html "
"}
+ {-Tpre_row_code {}}
+ {-Trow_code {[subst $Trow_default]}}
+ {-Tpost_data_ns_sets {}}
+ {-Textra_vars {}}
+ {-Textra_rows {}}
+ {-bind {}}
+ {-dbn {}}
+ statement_name sql_qry Tdatadef
+} {
+
+ DRB: New code should use the listbuilder.
+
+ 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. +
+ { + {column_id "Column_Heading" order_clause display_info} + ... + } ++
+ {upper(last_name) $order, upper(first_names) $order} ++ 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. + +
+ if the display stuff is not any of the above then it is interpolated and the results + returned (w/o any <td> tags put in). + An example: +
+ set table_def { + {ffn "Full Name" + {upper(last_name) $order, upper(first_names) $order} + {<td><a href="/admin/users/one?user_id=$user_id">$first_names $last_name</a></td>}} + {email "e-Mail" {} {<td><a href="mailto:$email">$email</a>}} + {email_bouncing_p "e-Bouncing?" {} tf} + {user_state "State" {} {}} + {last_visit "Last Visit" {} r} + {actions "Actions" no_sort {<td> + <a href="/admin/users/basic-info-update?user_id=$user_id">Edit Info</a> | + <a href="/admin/users/password-update?user_id=$user_id">New Password</a> | + [ad_registration_finite_state_machine_admin_links $user_state $user_id]}} + } ++
[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[lindex $Tcol 1] $Tasord | \n" + } + } + append Theader "
---|
+ returns a list of indexes into the columns one per column it found +
+ -sortable from t/f/all +} { + set column_list {} + if {$columns eq ""} { + for {set i 0} {$i < [llength $datadef]} {incr i} { + if {$sortable eq "all" + || ($sortable == "t" && [lindex $datadef $i 2] ne "no_sort") + || ($sortable == "f" && [lindex $datadef $i 2] eq "no_sort") + } { + lappend column_list $i + } + } + } else { + set colnames {} + foreach col $datadef { + if {$sortable eq "all" + || ($sortable == "t" && [lindex $col 2] ne "no_sort") + || ($sortable == "f" && [lindex $col 2] eq "no_sort") + } { + lappend colnames [lindex $col 0] + } else { + # placeholder for invalid column + lappend colnames "X+X" + } + } + foreach col $columns { + set i [lsearch $colnames $col] + if {$i > -1} { + lappend column_list $i + } + } + } + + return $column_list +} + +ad_proc -deprecated ad_sort_primary_key {orderby} { + return the primary (first) key of an order spec + used by +} { + if {[regexp {^([^*,]+)} $orderby match]} { + return $match + } + return $orderby +} + +ad_proc -deprecated ad_table_same varname { + Called from inside ad_table. + + returns true if the variable has same value as + on the previous row. Always false for 1st row. + +} { + if { [uplevel set Tcount] + && [uplevel string compare \$$varname \$P$varname] == 0} { + return 1 + } else { + return 0 + } +} + +ad_proc -deprecated ad_table_span {str {td_html "align=\"left\""}} { + given string the function generates a row which spans the + whole table. +} { + return "
+ columns is a list of the currently selected columns. +
+ allowed is the list of all the displayable columns, if empty + all columns are allowed. +} { + # first build a map of all available columns + set sel_list [ad_table_column_list $datadef $allowed] + + # build the map of currently selected columns + set sel_columns [ad_table_column_list $datadef $columns] + + set max_columns [llength $sel_list] + set n_sel_columns [llength $sel_columns] + + set html {} + if {$item eq "CreateNewCustom" } { + set item {} + } + # now spit out the form fragment. + if {$item ne ""} { + append html "
+
+ An example from the ticket system: +
+ ad_table_sort_form $tabledef select $return_url ticket_tracker_main_sort $ticket_sort $orderby ++} { + # first build a map of all available columns + set sel_list [ad_table_column_list -sortable t $datadef $allowed] + + # build the map of currently selected columns + set full_column [split $sort_spec ","] + set sel_columns [list] + set direction [list] + foreach col $full_column { + regexp {([^*,]+)([*])?} $col match coln dirn + if {$dirn eq "*"} { + set dirn desc + } else { + set dirn asc + } + lappend sel_columns $coln + lappend direction $dirn + } + + set max_columns 4 + set n_sel_columns [llength $sel_columns] + + set html {} + if {$item eq "CreateNewCustom" } { + set item {} + } + # now spit out the form fragment. + if {$item ne ""} { + append html "
-
- An example from the ticket system: -
- ad_table_sort_form $tabledef select $return_url ticket_tracker_main_sort $ticket_sort $orderby --} { - # first build a map of all available columns - set sel_list [ad_table_column_list -sortable t $datadef $allowed] - - # build the map of currently selected columns - set full_column [split $sort_spec ","] - set sel_columns [list] - set direction [list] - foreach col $full_column { - regexp {([^*,]+)([*])?} $col match coln dirn - if {$dirn eq "*"} { - set dirn desc - } else { - set dirn asc - } - lappend sel_columns $coln - lappend direction $dirn - } - - set max_columns 4 - set n_sel_columns [llength $sel_columns] - - set html {} - if {$item eq "CreateNewCustom" } { - set item {} - } - # now spit out the form fragment. - if {$item ne ""} { - append html "