Index: openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl,v diff -u -N -r1.10.2.3 -r1.10.2.4 --- openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl 22 May 2016 19:22:51 -0000 1.10.2.3 +++ openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl 2 Aug 2016 10:14:41 -0000 1.10.2.4 @@ -11,25 +11,11 @@ csrf { security::csrf::validate } } -set ns_api_index_result [util_memoize [list ::util::http::get -url $::apidoc::ns_api_html_index]] -set ns_api_index_page [dict get $ns_api_index_result page] +set url [apidoc::get_doc_url -cmd $tcl_proc \ + -index $::apidoc::ns_api_html_index \ + -root $::apidoc::ns_api_root \ + -host $::apidoc::ns_api_host] -# -# Since man pages contain often a summary of multiple commands, try -# abbreviation in case the full name is not found (e.g. man page "nsv" -# contains "nsv_array", "nsv_set" etc.) -# -set url "" -for {set i [string length $tcl_proc]} {$i > 1} {incr i -1} { - set proc [string range $tcl_proc 0 $i] - set url [apidoc::search_on_webindex \ - -page $ns_api_index_page \ - -root $::apidoc::ns_api_root \ - -host $::apidoc::ns_api_host \ - -proc $proc] - if {$url ne ""} break -} - if {$url ne ""} { ad_returnredirect -allow_complete_url $url ad_script_abort