Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.10.2.3 -r1.10.2.4 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 22 Sep 2005 08:13:13 -0000 1.10.2.3 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 26 Oct 2005 15:56:24 -0000 1.10.2.4 @@ -753,4 +753,18 @@ return $revision_id } +} + +ad_proc -public content::item::get_id_by_name { + {-name:required} + {-parent_id:required} +} { + Returns the item_id of the a content item with the passed in name + + @param name Name of the content item + @param parent_id Parent_id of the content item + + @return the item id belonging to the name, empty string if no item_id was found +} { + return [db_string get_item_id_by_name {} -default ""] } \ No newline at end of file Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.xql,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.xql 5 Oct 2005 14:54:19 -0000 1.2.2.1 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.xql 26 Oct 2005 15:56:24 -0000 1.2.2.2 @@ -32,4 +32,13 @@ + + + select item_id + from cr_items + where name = :name + and parent_id = :parent_id + + + \ No newline at end of file