Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml,v
diff -u -N -r1.60.2.7 -r1.60.2.8
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 6 Aug 2020 13:23:35 -0000 1.60.2.7
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 8 Apr 2021 15:44:06 -0000 1.60.2.8
@@ -557,10 +557,8 @@
} -new_data {
....
category::map_object -remove_old -object_id $item_id $category_ids
- db_dml insert_asc_named_object "insert into acs_named_objects (object_id, object_name, package_id) values ( :item_id, :title, :package_id)"
} -edit_data {
....
- db_dml update_asc_named_object "update acs_named_objects set object_name = :title, package_id = :package_id where object_id = :item_id"
category::map_object -remove_old -object_id $item_id $category_ids
} -after_submit {
ad_returnredirect "."
@@ -569,14 +567,7 @@
While the category::ad_form::add_widgets proc is taking
care to extend your form with associated categories you need to ensure that your items are mapped
- to the corresponding category object yourself. Also since the categories package knows nothing from
- your objects you have to keep the acs_named_objects table updated with
- any changes taking place. We use the items title so that they are listed in the categories browser by
- title.Make sure that you also delete these entries if your item is delete. Add this to
- your corresponding delete page:
-
- db_dml delete_named_object "delete from acs_named_objects where object_id = :item_id"
-
+ to the corresponding category object yourself.
note-edit.tcl requires a
note_id to determine which record
should be deleted. It also looks for a confirmation variable, which
@@ -715,11 +706,8 @@
if { $use_categories_p == 1 && $category_id ne "" } {
- set from_clause "category_object_map com, acs_named_objects ano"
- set_where_clause "com.object_id = qa.entry_id and
- ano.package_id = :package_id and
- com.object_id = ano.object_id and
- com.category_id = :category_id"
+ set from_clause "category_object_map com"
+ set_where_clause "com.object_id = qa.entry_id and com.category_id = :category_id"
...