Index: openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl,v diff -u -N -r1.48.2.2 -r1.48.2.3 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 31 Mar 2019 11:17:59 -0000 1.48.2.2 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 4 Apr 2019 12:16:58 -0000 1.48.2.3 @@ -175,6 +175,10 @@ set node_id [ad_conn node_id] } + # + # Get context info for this node. In case of "early" errors + # (e.g. invalid characters in the URL), the result might be empty. + # set context [ad_context_node_list -from_node $from_node $node_id] if { [string match "admin/*" [ad_conn extra_url]] } { @@ -183,8 +187,12 @@ } if {[llength $args] == 0} { - # fix last element to just be literal string - lset context end [lindex $context end 1] + # + # Fix last element to just be literal string + # + if {$context ne ""} { + lset context end [lindex $context end 1] + } } else { if {![string match "\{*" $args]} { # args is not a list, transform it into one. @@ -395,9 +403,9 @@ # foreach naked_pattern [ad_naked_html_patterns] { -# if { [string match $naked_pattern $url_stub] } { -# # want the global admins with no menu, but not the domain admin -# return "" +# if { [string match $naked_pattern $url_stub] } { +# # want the global admins with no menu, but not the domain admin +# return "" # } # } @@ -413,89 +421,89 @@ # set return_string "" # if { $java_script_p } { -# append return_string " -# " +# function go_to_url(url) \{ +# if (url \!= \"\") \{ +# self.location=url; +# \} +# return; +# \} +# // --> +# " # } else { -# append return_string " +# append return_string " -# " +# function go_to_url(url) \{ +# \} +# // --> +# " # } # # We divide up the screen into 4 areas top to bottom: @@ -510,10 +518,10 @@ # if {$netscape3_p} { -# append return_string "\"Cognet\" +# append return_string "\"Cognet\" # " # } else { -# append return_string " +# append return_string " #
# # +# append return_string "\"go\" +# #
\"Cognet\"" @@ -529,12 +537,12 @@ #   " # if {$netscape3_p} { -# append return_string "   +# append return_string "   # #
" # } else { -# append return_string "\"go\" -#
# # " @@ -547,37 +555,37 @@ # set uplevel_string "\"Up\"" # foreach url_pattern [ad_no_uplevel_patterns] { -# if { [regexp $url_pattern $url_stub match] } { -# set uplevel_string "" -# } +# if { [regexp $url_pattern $url_stub match] } { +# set uplevel_string "" +# } # } # append return_string $uplevel_string # append return_string "" # if {$netscape3_p} { -# append return_string "" +# append return_string "
" # } else { -# append return_string "
+# append return_string "
#
# " # } # # Navigation Table # foreach item $menu_items { -# if { $item == [menu_highlight $section] } { -# append return_string "" -# } else { -# append return_string "" -# } +# if { $item == [menu_highlight $section] } { +# append return_string "" +# } else { +# append return_string "" +# } # } # append return_string " # #
\"$item\"
\"$item\"
\"$item\"
\"$item\"
# # -# [menu_subsection $section] +# [menu_subsection $section] # #
" @@ -603,22 +611,22 @@ # set full_filename "$::acs::pageroot$url_stub" # foreach naked_pattern [ad_naked_html_patterns] { -# if { [string match $naked_pattern $url_stub] } { -# return "" -# } +# if { [string match $naked_pattern $url_stub] } { +# return "" +# } # } # set netscape3_p 0 # if {[netscape3_browser]} { -# set netscape3_p 1 +# set netscape3_p 1 # } # append return_string "
" # # close up the table # if {$netscape3_p != 1} { -# append return_string " +# append return_string " # " # }