Index: openacs-4/packages/acs-templating/www/doc/gen/generate-docs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/gen/generate-docs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/doc/gen/generate-docs.tcl 27 Oct 2014 16:40:22 -0000 1.2 +++ openacs-4/packages/acs-templating/www/doc/gen/generate-docs.tcl 7 Aug 2017 23:48:03 -0000 1.3 @@ -1,11 +1,18 @@ + +if {![acs_user::site_wide_admin_p]} { + ad_return_forbidden "Permission Denied" \ + "

You don't have permissions to run this script" + ad_script_abort +} + # @datasource namespaces multirow # Data for all namespaces in the package # @column name # @column overview # @private write_to_file # this procedure is only used here; inadvertently -# replicated some other proc, don't move to tcl library +# replicated some other proc, don't move to Tcl library proc ::template::util::write_to_file { file_name output} { @@ -47,21 +54,16 @@ set file_list [list] set doc_root $::acs::rootdir/packages/acs-templating/www/doc -#debugging: -template::util::display_value doc_root +#debugging +ns_log notice "acs-templating/doc/gen/generated-docs.tcl: doc_root $doc_root" -set namespace_template [template::util::read_file \ - $doc_root/gen/namespace-template.adp] - +set namespace_template [template::util::read_file $doc_root/gen/namespace-template.adp] set dir [ns_library private] # debugging -set svr_root $::acs::rootdir +set dir [list $::acs::rootdir/packages/cms/tcl $::acs::rootdir/packages/acs-templating/tcl] +ns_log notice "acs-templating/doc/gen/generated-docs.tcl: dir $dir" - -set dir [list $svr_root/packages/cms/tcl $svr_root/packages/acs-templating/tcl] -template::util::display_value dir - set parsed_list [doc::parse_tcl_library $dir] @@ -126,10 +128,9 @@ set namespace_code [template::adp_compile -string $namespace_template] #debug - template::util::display_value namespace_code + ns_log notice "acs-templating/doc/gen/generated-docs.tcl: namespace_code $namespace_code" set namespace_output [template::adp_eval namespace_code] - ns_log notice "\nwriting $namespace_page\n" template::util::write_to_file $namespace_page $namespace_output @@ -156,3 +157,9 @@ $doc_root/gen/namespace-list.adp $doc_root/TclDocs/namespace-list.html + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: