Index: openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.adp,v diff -u -N -r1.1 -r1.1.2.1 --- openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.adp 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.adp 23 Feb 2017 10:35:57 -0000 1.1.2.1 @@ -3,7 +3,7 @@ - + id="@navigation.id@" class="active dropdown"> - + Index: openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl,v diff -u -N -r1.1 -r1.1.2.1 --- openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl 23 Feb 2017 10:35:57 -0000 1.1.2.1 @@ -24,22 +24,29 @@ # template::multirow get navigation $i # ns_log notice [array get navigation] #} -array set is_submenu [list] +array set submenus [list] for {set i 1} {$i <= [template::multirow size navigation]} {incr i} { template::multirow get navigation $i if {$navigation(display_template) ne ""} { set template_code [template::adp_compile -string $navigation(display_template)] set item_html [template::adp_eval template_code] set navigation(display_template) $item_html } else { - set item_html "
  • $navigation(label)
  • " + set item_html "
  • [ns_quotehtml $navigation(label)]
  • " } - array set is_submenu [list $navigation(parent) "[lindex [array get is_submenu $navigation(parent)] 1] $item_html"] - + set nav_parent $navigation(parent) + if {$nav_parent ne ""} { + if {[info exists submenus($nav_parent)]} { + set submenus($nav_parent) "$submenus($nav_parent) $item_html" + } else { + set submenus($nav_parent) "" + } + } } -template::multirow extend navigation has_submenu +template::multirow extend navigation submenu template::multirow foreach navigation { - set has_submenu [lindex [array get is_submenu $name] 1] - # ds_comment "Submenu: $has_submenu" + if {[info exists submenus($name)]} { + set submenu $submenus($name) + } } Index: openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl,v diff -u -N -r1.50.2.4 -r1.50.2.5 --- openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 27 Nov 2016 12:19:35 -0000 1.50.2.4 +++ openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 23 Feb 2017 10:37:14 -0000 1.50.2.5 @@ -583,11 +583,11 @@ } # Get the messages array, and the list of message keys to iterate over - array set messages_array [lindex [array get catalog_array messages] 1] + array set messages_array $catalog_array(messages) set messages_array_names [array names messages_array] # Get the descriptions array - array set descriptions_array [lindex [array get catalog_array descriptions] 1] + array set descriptions_array $catalog_array(descriptions) ns_log Notice "Loading messages in file $file_path" Index: openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl,v diff -u -N -r1.54.2.4 -r1.54.2.5 --- openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 14 Oct 2016 18:58:53 -0000 1.54.2.4 +++ openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 23 Feb 2017 10:37:14 -0000 1.54.2.5 @@ -658,8 +658,7 @@ append formated_message $percent_match } else { # Do the substitution - - append formated_message [lindex [array get value_array $variable_string] 1] + append formated_message $value_array($variable_string) } } else { regexp {^([^.]+)(?:\.([^.]+))?$} $variable_string match variable_name array_key Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl,v diff -u -N -r1.48.2.6 -r1.48.2.7 --- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 11 Nov 2016 00:09:20 -0000 1.48.2.6 +++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 23 Feb 2017 10:37:14 -0000 1.48.2.7 @@ -160,7 +160,7 @@ if { [file exists $catalog_file_path] } { set catalog_file_contents [lang::catalog::read_file $catalog_file_path] array set catalog_array [lang::catalog::parse $catalog_file_contents] - array set messages_array [lindex [array get catalog_array messages] 1] + array set messages_array $catalog_array(messages) } else { array set messages_array {} } @@ -223,12 +223,11 @@ set key_comp_counter "0" set unique_key $message_key while { 1 } { - set existing_text [lindex [array get messages_array $unique_key] 1] - if { $existing_text ne "" } { + if { [info exists messages_array($unique_key)] } { # The key already exists - - if {$existing_text eq $new_text} { + + if {$messages_array($unique_key) eq $new_text} { # New and old texts are identical - don't add the key ns_log Notice [list lang::util::replace_temporary_tags_with_lookups - \ message key $unique_key already exists in catalog \ Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl,v diff -u -N -r1.18.2.3 -r1.18.2.4 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 20 Oct 2015 08:19:13 -0000 1.18.2.3 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-test-procs.tcl 23 Feb 2017 10:37:14 -0000 1.18.2.4 @@ -533,7 +533,7 @@ # Read the contents of the catalog file array set catalog_array [lang::catalog::parse [lang::catalog::read_file $catalog_file]] - array set updated_messages_array [lindex [array get catalog_array messages] 1] + array set updated_messages_array $catalog_array(messages) # Assert that the old messages are unchanged foreach old_message_key [array names messages_array] { @@ -857,11 +857,11 @@ set system_timezone [lang::system::timezone] set user_timezone [lang::user::timezone] - set timezones [lc_list_all_timezones] + set n [expr {[llength $timezones]-1}] - set desired_user_timezone [lindex [lindex $timezones [randomRange [expr {[llength $timezones]-1}]]] 0] - set desired_system_timezone [lindex [lindex $timezones [randomRange [expr {[llength $timezones]-1}]]] 0] + set desired_user_timezone [lindex [lindex $timezones [randomRange $n]] 0] + set desired_system_timezone [lindex [lindex $timezones [randomRange $n]] 0] set error_p 0 with_catch errmsg {