Index: openacs-4/packages/acs-subsite/tcl/attribute-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/tcl/attribute-procs.xql 5 Jul 2018 11:17:59 -0000 1.7 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs.xql 3 Sep 2024 15:37:33 -0000 1.8 @@ -1,110 +1,6 @@ - - - - - select t.table_name - from acs_object_types t - where t.object_type = :object_type - - - - - - - - select a.attribute_id - from acs_attributes a - where a.object_type = :object_type - and a.attribute_name = :attribute_name - - - - - - - - - select v.sort_order as old_sort_order - from acs_enum_values v - where v.attribute_id = :attribute_id - and v.enum_value = :enum_value - - - - - - - - - delete from acs_enum_values v - where v.attribute_id = :attribute_id - and v.enum_value = :enum_value - - - - - - - - - update acs_enum_values v - set v.sort_order = v.sort_order - 1 - where v.attribute_id = :attribute_id - and v.sort_order > :old_sort_order - - - - - - - - - select object_type from acs_objects where object_id = :object_id - - - - - - - - - select * - from ($package_object_view) - where object_id = :object_id - - - - - - - - - select enum.pretty_name, enum.enum_value - from acs_enum_values enum - where enum.attribute_id = :attribute_id - order by enum.sort_order - - - - - - - - insert into acs_enum_values - (attribute_id, sort_order, enum_value, pretty_name) - select :attribute_id, :sort_order, :enum_value, :enum_value - from dual - where not exists (select 1 - from acs_enum_values v2 - where v2.pretty_name = :enum_value - and v2.attribute_id = :attribute_id) - - - - alter table $table_name drop column $attribute_name