Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.216.2.1 -r1.216.2.2 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 14 Feb 2019 16:15:01 -0000 1.216.2.1 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 1 Mar 2019 10:00:15 -0000 1.216.2.2 @@ -1311,8 +1311,11 @@ # sort_key will be used only on insert if { $sort_key eq "" } { - set sort_key [db_string get_sort_key {} -default "1"] - set sort_key [ad_decode $sort_key "" "1" $sort_key] + set sort_key [db_string get_sort_key { + select coalesce(max(sort_key), 0) + 1 + from portal_element_map + where region = :region and page_id = :page_id + } -default "1"] } db_transaction { Index: openacs-4/packages/new-portal/tcl/portal-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.xql,v diff -u -r1.52 -r1.52.2.1 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 9 Jul 2018 11:48:02 -0000 1.52 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 1 Mar 2019 10:00:15 -0000 1.52.2.1 @@ -400,14 +400,6 @@ - - - select max(sort_key) + 1 - from portal_element_map - where region = :region and page_id = :page_id - - - select page_id Index: openacs-4/packages/search/tcl/search-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-procs.tcl,v diff -u -r1.55.2.1 -r1.55.2.2 --- openacs-4/packages/search/tcl/search-procs.tcl 14 Feb 2019 16:15:01 -0000 1.55.2.1 +++ openacs-4/packages/search/tcl/search-procs.tcl 1 Mar 2019 10:02:39 -0000 1.55.2.2 @@ -177,7 +177,7 @@ #ns_log notice "acs_sc::invoke FtsEngineDriver" set r [acs_sc::invoke \ -contract FtsEngineDriver \ - -operation [ad_decode $event UPDATE update_index index] \ + -operation [expr {$event eq "UPDATE" ? "update_index" : "index"}] \ -call_args [list $datasource(object_id) $txt $datasource(title) $datasource(keywords)] \ -impl $driver] } Index: openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/acs-subsite/lib/login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/acs-subsite/lib/login.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/acs-subsite/lib/login.tcl 13 Oct 2018 16:07:42 -0000 1.4 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/templates/packages/acs-subsite/lib/login.tcl 1 Mar 2019 10:05:14 -0000 1.4.2.1 @@ -176,7 +176,7 @@ ad_form -extend -name login -on_request { # Populate fields from local vars - set persistent_p [ad_decode $default_persistent_login_p 1 "t" ""] + set persistent_p [expr {$default_persistent_login_p == 1 ? "t" : ""}] # One common problem with login is that people can hit the back button # after a user logs out and relogin by using the cached password in Index: openacs-4/packages/xotcl-core/www/show-object.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-object.tcl,v diff -u -r1.27 -r1.27.2.1 --- openacs-4/packages/xotcl-core/www/show-object.tcl 9 Sep 2018 13:11:39 -0000 1.27 +++ openacs-4/packages/xotcl-core/www/show-object.tcl 1 Mar 2019 10:08:07 -0000 1.27.2.1 @@ -258,7 +258,7 @@ append output "
Created:\n
[lindex $doc_elements(creation-date) 0]\n" } if { [info exists doc_elements(author)] } { - append output "
Author[ad_decode [llength $doc_elements(author)] 1 "" "s"]:\n" + append output "
Author[expr {[llength $doc_elements(author)] > 1 ? "s" : ""}]:\n" foreach author $doc_elements(author) { append output "
[::apidoc::format_author $author]\n" }