Index: openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 27 Oct 2015 22:56:30 -0000 1.12.2.2 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 2 Jan 2016 13:47:26 -0000 1.12.2.3 @@ -235,14 +235,7 @@ # 2. Drop the attribute # 3. Return - if { ![db_0or1row select_attr_info { - select a.object_type, a.attribute_name, - decode(a.storage,'type_specific',t.table_name,a.table_name) as table_name, - nvl(a.column_name, a.attribute_name) as column_name - from acs_attributes a, acs_object_types t - where a.attribute_id = :attribute_id - and t.object_type = a.object_type - }] } { + if { ![db_0or1row select_attr_info {}] } { # Attribute doesn't exist return 0 } @@ -436,21 +429,7 @@ and a.storage in ('[join $include_storage_types "', '"]')" } - db_foreach select_attributes " - select nvl(a.column_name, a.attribute_name) as name, - a.pretty_name, a.attribute_id, a.datatype, - v.enum_value, v.pretty_name as value_pretty_name - from acs_object_type_attributes a, - acs_enum_values v, - (select t.object_type, level as type_level - from acs_object_types t - start with t.object_type = :start_with - connect by prior t.object_type = t.supertype) t - where a.object_type = :object_type - and a.attribute_id = v.attribute_id(+) - and t.object_type = a.ancestor_type $storage_clause - order by type_level, a.sort_order - " { + db_foreach select_attributes {} { # Enumeration values show up more than once... if {$name ni $attr_list} { lappend attr_list $name Index: openacs-4/packages/acs-subsite/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/package-procs.tcl,v diff -u -r1.26.2.3 -r1.26.2.4 --- openacs-4/packages/acs-subsite/tcl/package-procs.tcl 28 Oct 2015 09:38:34 -0000 1.26.2.3 +++ openacs-4/packages/acs-subsite/tcl/package-procs.tcl 2 Jan 2016 13:47:26 -0000 1.26.2.4 @@ -565,24 +565,7 @@ and a.storage in ('[join $include_storage_types "', '"]')" } - return [db_list_of_lists attributes_select " - select a.attribute_id, - nvl(a.table_name, t.table_name) as table_name, - nvl(a.column_name, a.attribute_name) as attribute_name, - a.pretty_name, - a.datatype, - decode(a.min_n_values,0,'f','t') as required_p, - a.default_value, - t.table_name as object_type_table_name, - t.id_column as object_type_id_column - from acs_object_type_attributes a, - (select t.object_type, t.table_name, t.id_column, level as type_level - from acs_object_types t - start with t.object_type=:start_with - connect by prior t.object_type = t.supertype) t - where a.object_type = :object_type - and t.object_type = a.object_type $storage_clause - order by type_level"] + return [db_list_of_lists attributes_select {}] } Index: openacs-4/packages/acs-subsite/tcl/party-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/party-procs.tcl,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-subsite/tcl/party-procs.tcl 10 Sep 2015 08:21:36 -0000 1.9.2.1 +++ openacs-4/packages/acs-subsite/tcl/party-procs.tcl 2 Jan 2016 13:47:26 -0000 1.9.2.2 @@ -174,36 +174,9 @@ set start_with_clause [db_map start_with_clause] } - db_foreach select_sub_rel_types " - select - types.pretty_name, - types.object_type, - types.tree_level, - types.indent, - decode(valid_types.object_type, null, 0, 1) as valid_p - from - (select - t.pretty_name, t.object_type, level as tree_level, - replace(lpad(' ', (level - 1) * 4), - ' ', ' ') as indent, - rownum as tree_rownum - from - acs_object_types t - connect by - prior t.object_type = t.supertype - start with - $start_with_clause ) types, - (select - object_type - from - rel_types_valid_obj_two_types - where - rel_type = :rel_type ) valid_types - where - types.object_type = valid_types.object_type(+) - order by tree_rownum - " { - template::multirow append $datasource_name $object_type [ad_urlencode $object_type] $indent $pretty_name $valid_p + db_foreach select_sub_rel_types {} { + template::multirow append $datasource_name $object_type \ + [ad_urlencode $object_type] $indent $pretty_name $valid_p } } Index: openacs-4/packages/acs-subsite/www/admin/attributes/edit-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/attributes/edit-one.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-subsite/www/admin/attributes/edit-one.tcl 10 Sep 2015 08:21:39 -0000 1.5.2.1 +++ openacs-4/packages/acs-subsite/www/admin/attributes/edit-one.tcl 2 Jan 2016 13:47:26 -0000 1.5.2.2 @@ -23,22 +23,9 @@ set context [list "Edit attribute"] -db_1row attribute_properties { - select a.pretty_name as attribute_pretty_name, a.datatype, a.attribute_id, - nvl(a.column_name,a.attribute_name) as attribute_column, - t.id_column as type_column, t.table_name as type_table, t.object_type, - a.min_n_values - from acs_attributes a, acs_object_types t - where a.attribute_id = :attribute_id - and a.object_type = t.object_type -} +db_1row attribute_properties {} +db_1row select_value {} -db_1row select_value " - select my_view.$attribute_column as current_value - from ([package_object_view $object_type]) my_view - where my_view.object_id = :id_column -" - template::form create edit_attribute template::element create edit_attribute attribute_id -value $attribute_id \ Index: openacs-4/packages/acs-subsite/www/admin/attributes/enum-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/attributes/enum-add-2.tcl,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/acs-subsite/www/admin/attributes/enum-add-2.tcl 28 Oct 2015 09:38:35 -0000 1.4.2.2 +++ openacs-4/packages/acs-subsite/www/admin/attributes/enum-add-2.tcl 2 Jan 2016 13:47:26 -0000 1.4.2.3 @@ -15,11 +15,7 @@ { return_url "" } } -set max_sort_order [db_string select_max_sort_order { - select nvl(max(v.sort_order),0) - from acs_enum_values v - where v.attribute_id = :attribute_id -}] +set max_sort_order [db_string select_max_sort_order {}] db_transaction { foreach ideal_sort_order [array names attribute_enum_values] { Index: openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl 18 Sep 2015 07:27:47 -0000 1.6.2.2 +++ openacs-4/packages/acs-subsite/www/admin/group-types/change-join-policy.tcl 2 Jan 2016 13:47:26 -0000 1.6.2.3 @@ -26,13 +26,7 @@ [list [export_vars -base one group_type] "One type"] \ "Edit default join policy"] -if { ![db_0or1row select_pretty_name { - select t.pretty_name as group_type_pretty_name, t.dynamic_p, - nvl(gt.default_join_policy, 'open') as default_join_policy - from acs_object_types t, group_types gt - where t.object_type = :group_type - and t.object_type = gt.group_type(+) -}] } { +if { ![db_0or1row select_pretty_name {}] } { ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" return } Index: openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl,v diff -u -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl 27 Oct 2015 23:01:35 -0000 1.7.2.2 +++ openacs-4/packages/acs-subsite/www/admin/group-types/one.tcl 2 Jan 2016 13:47:26 -0000 1.7.2.3 @@ -29,13 +29,7 @@ set package_id [ad_conn package_id] -if { ![db_0or1row select_pretty_name { - select t.pretty_name as group_type_pretty_name, t.dynamic_p, - nvl(gt.default_join_policy, 'open') as default_join_policy - from acs_object_types t, group_types gt - where t.object_type = :group_type - and t.object_type = gt.group_type(+) -}] } { +if { ![db_0or1row select_pretty_name {}] } { ad_return_error "Group type doesn't exist" "Group type \"$group_type\" doesn't exist" return } @@ -50,18 +44,7 @@ db_multirow groups groups_select {} # Select out all the attributes for groups of this type -db_multirow -extend {one_attribute_url} attributes attributes_select { - select a.attribute_id, a.pretty_name, - a.ancestor_type, t.pretty_name as ancestor_pretty_name - from acs_object_type_attributes a, - (select t.object_type, t.pretty_name, level as type_level - from acs_object_types t - start with t.object_type='group' - connect by prior t.object_type = t.supertype) t - where a.object_type = :group_type - and t.object_type = a.ancestor_type - order by type_level -} { +db_multirow -extend {one_attribute_url} attributes attributes_select {} { set one_attribute_url [export_vars -base "../attributes/one" {attribute_id return_url}] } Index: openacs-4/packages/acs-subsite/www/admin/rel-types/roles/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/roles/index.tcl,v diff -u -r1.3.24.1 -r1.3.24.2 --- openacs-4/packages/acs-subsite/www/admin/rel-types/roles/index.tcl 10 Sep 2015 08:21:46 -0000 1.3.24.1 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/roles/index.tcl 2 Jan 2016 13:47:26 -0000 1.3.24.2 @@ -11,24 +11,11 @@ } { } -properties { context:onevalue - } set context [list [list "../" "Relationship types"] "Roles"] -db_multirow roles select_roles { - select r.role, r.pretty_name, nvl(num1.number_rels,0) + nvl(num2.number_rels,0) as number_rel_types - from (select t.role_one as role, count(*) as number_rels - from acs_rel_types t - group by t.role_one) num1, - (select t.role_two as role, count(*) as number_rels - from acs_rel_types t - group by t.role_two) num2, - acs_rel_roles r - where r.role = num1.role(+) - and r.role = num2.role(+) - order by lower(r.role) -} { +db_multirow roles select_roles {} { # The role pretty names can be message catalog keys that need # to be localized before they are displayed set pretty_name [lang::util::localize $pretty_name] Fisheye: Tag 1.12.2.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set.tcl'. Fisheye: No comparison available. Pass `N' to diff?