Index: openacs-4/packages/acs-tcl/tcl/apm-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.xql,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 14 May 2018 15:14:11 -0000 1.30 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 3 Sep 2024 15:37:34 -0000 1.31 @@ -73,152 +73,109 @@ - + - select coalesce(v.package_id, 0) as package_id, p.parameter_name, - case when v.value_id is null then p.default_value else v.attr_value end as attr_value - from apm_parameters p left outer join apm_parameter_values v - using (parameter_id) - where p.package_key = :package_key - - - - - select distinct package_key from apm_package_versions where enabled_p='t' order by package_key - - + + select parameter_name from apm_parameters where package_key = :package_key - - + + - select 1 from apm_package_types + select 1 from apm_package_types where package_key = :package_key - - + + select 1 from apm_package_versions - where package_key = :package_key - and enabled_p = 't' - - - - - - select 1 from apm_package_versions where version_id = :version_id and installed_p = 't' - - + + - update apm_parameters + update apm_parameters set parameter_name = :parameter_name, default_value = :default_value, - datatype = :datatype, + datatype = :datatype, description = :description, section_name = :section_name, min_n_values = :min_n_values, max_n_values = :max_n_values where parameter_id = :parameter_id - - + + update acs_objects set title = :parameter_name where object_id = :parameter_id - - + + - select parameter_id - from apm_parameters - where package_key = :package_key - and parameter_name = :parameter - - - - - - select scope, parameter_name - from apm_parameters - where parameter_id = :parameter_id - - - - - - select package_id, parameter_id, parameter_name + select package_id, parameter_id, parameter_name from apm_packages p, apm_parameters ap where p.package_key = ap.package_key and ap.parameter_id = :parameter_id - - - - select package_key - from apm_packages - where package_id = :package_id - - - + - select version_id - from apm_enabled_package_versions + select version_id + from apm_enabled_package_versions where package_key = :package_key - - + + - select version_id - from apm_package_versions + select version_id + from apm_package_versions where package_key = :package_key - - + + select package_id from apm_packages where package_key = :package_key - - + + select pretty_name, version_name, package_key, installed_p, distribution_uri, tagged_p from apm_package_version_info where version_id = :version_id - + select node_id from site_nodes where object_id = :package_id - - + + select parameter_name, attr_value from apm_parameters p, apm_parameter_values v, apm_packages a @@ -229,7 +186,7 @@ - + select proc from apm_package_callbacks @@ -238,34 +195,34 @@ - + insert into apm_package_callbacks (version_id, type, proc) values (:version_id, :type, :proc) - + - + update apm_package_callbacks set proc = :proc where version_id = :version_id and type = :type - + - + delete from apm_package_callbacks - where version_id = (select version_id - from apm_enabled_package_versions + where version_id = (select version_id + from apm_enabled_package_versions where package_key = :package_key) and type = :type - + - + select v.version_id, v.package_key, @@ -297,50 +254,50 @@ where v.version_id = :version_id and t.package_key = v.package_key - + - + select pretty_name, package_key from apm_package_types where implements_subsite_p = 't' and package_key in ($in_clause) order by pretty_name - + - + update apm_packages set package_key = :new_package_key where package_id = :package_id - + - + select parameter_name, parameter_id from apm_parameters where package_key = :old_package_key - + - + select parameter_id as new_parameter_id from apm_parameters where package_key = :new_package_key and parameter_name = :parameter_name - + - + update apm_parameter_values set parameter_id = :new_parameter_id where parameter_id = :parameter_id and package_id = :package_id - +