Index: openacs-4/packages/xotcl-core/tcl/cr-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cr-procs.tcl,v diff -u -N -r1.50.2.15 -r1.50.2.16 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 1 Sep 2014 11:27:36 -0000 1.50.2.15 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 2 Sep 2014 12:56:15 -0000 1.50.2.16 @@ -133,14 +133,17 @@ CrClass ad_proc lookup { -name:required {-parent_id -100} + {-content_type "::%"} } { Check, whether an content item with the given name exists. If the item exists, return its item_id, otherwise 0. @return item_id } { return [::xo::dc get_value entry_exists_select { - select item_id from cr_items where name = :name and parent_id = :parent_id + select item_id from cr_items + where name = :name and parent_id = :parent_id + and content_type like :content_type } 0] }