Index: openacs-4/packages/acs-content-repository/tcl/content-template-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-template-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-content-repository/tcl/content-template-procs.tcl 6 Dec 2004 12:02:44 -0000 1.3 +++ openacs-4/packages/acs-content-repository/tcl/content-template-procs.tcl 7 Dec 2004 07:13:21 -0000 1.4 @@ -12,11 +12,48 @@ namespace eval ::content::template {} +ad_proc -public content::template::new { + -name:required + {-text ""} + {-parent_id ""} + {-is_live ""} + {-template_id ""} + {-creation_date ""} + {-creation_user ""} + {-creation_ip ""} + {-package_id ""} +} { + @param name + @param text + @param parent_id + @param is_live + @param template_id + @param creation_date + @param creation_user + @param creation_ip + @param package_id -ad_proc -public content::template::del { + @return template_id of created template +} { + return [package_exec_plsql -var_list [list \ + [list name $name ] \ + [list text $text ] \ + [list parent_id $parent_id ] \ + [list is_live $is_live ] \ + [list template_id $template_id ] \ + [list creation_date $creation_date ] \ + [list creation_user $creation_user ] \ + [list creation_ip $creation_ip ] \ + [list package_id $package_id ] \ + ] content_template new] +} + + +ad_proc -public content::template::delete { -template_id:required } { @param template_id + @return 0 } { return [package_exec_plsql -var_list [list \ [list template_id $template_id ] \ @@ -30,8 +67,9 @@ } { @param template_id @param root_folder_id + @throws -20000: Invalid item ID: %'', get_path__item_id; - @return VARCHAR2 + @return "/" delimited path from root to supplied template_id } { return [package_exec_plsql -var_list [list \ [list template_id $template_id ] \ @@ -43,7 +81,7 @@ ad_proc -public content::template::get_root_folder { } { - @return NUMBER(38) + @return folder_id of Template Root Folder } { return [package_exec_plsql -var_list [list \ ] content_template get_root_folder] @@ -55,46 +93,11 @@ } { @param template_id - @return VARCHAR2 + @return t or f } { return [package_exec_plsql -var_list [list \ [list template_id $template_id ] \ ] content_template is_template] } -ad_proc -public content::template::new { - -name:required - {-text ""} - {-parent_id ""} - {-is_live ""} - {-template_id ""} - {-creation_date ""} - {-creation_user ""} - {-creation_ip ""} - {-package_id ""} -} { - @param name - @param text - @param parent_id - @param is_live - @param template_id - @param creation_date - @param creation_user - @param creation_ip - @param package_id - - @return NUMBER(38) -} { - return [package_exec_plsql -var_list [list \ - [list name $name ] \ - [list text $text ] \ - [list parent_id $parent_id ] \ - [list is_live $is_live ] \ - [list template_id $template_id ] \ - [list creation_date $creation_date ] \ - [list creation_user $creation_user ] \ - [list creation_ip $creation_ip ] \ - [list package_id $package_id ] \ - ] content_template new] -}