Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 1 Nov 2003 08:45:36 -0000 1.14 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 18 Feb 2004 09:55:51 -0000 1.15 @@ -188,7 +188,7 @@ } # Make sure that a live revision exists - if [empty_string_p $rev_id] { + if { [empty_string_p $rev_id] } { set live_revision [db_string get_live_revision ""] if { [template::util::is_nil live_revision] } { @@ -203,11 +203,11 @@ variable template_path # Get the template - db_1row get_template_url "" -column_array info + set template_found_p [db_0or1row get_template_url "" -column_array info] - if { [string equal $info(template_url) {}] } { - ns_log notice "content::init: No template found to render content item $item_id in context '$context'" - return 0 + if { !$template_found_p || [string equal $info(template_url) {}] } { + ns_log notice "content::init: No template found to render content item $item_id in context '$context'" + return 0 } set url $info(template_url) @@ -218,15 +218,15 @@ # (OpenACS - DanW, dcwickstrom@earthlink.net) set file ${root_path}/${url}.adp - if ![file exists $file] { + if { ![file exists $file] } { file mkdir [file dirname $file] set text [content::get_content_value $info(template_id)] template::util::write_file $file $text } set file ${root_path}/${url}.tcl - if ![file exists $file] { + if { ![file exists $file] } { file mkdir [file dirname $file] set text "\# Put the current revision's attributes in a onerow datasource named \"content\". @@ -255,8 +255,6 @@ template::util::write_file $file $text } - - return 1 }