Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 27 Oct 2014 16:39:53 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 7 Aug 2017 23:47:58 -0000 1.5 @@ -54,34 +54,10 @@ # because they would be too hard to read in one query. set rel_type $props(rel_type) -db_1row select_rel_type_info { - select role1.role as role_one, - nvl(role1.pretty_name,'Object on side one') as role_one_pretty_name, - nvl(role1.pretty_plural,'Objects on side one') as role_one_pretty_plural, - role2.role as role_two, - nvl(role2.pretty_name,'Object on side two') as role_two_pretty_name, - nvl(role2.pretty_plural,'Objects on side two') as role_two_pretty_plural, - acs_object_type.pretty_name(rel.rel_type) as rel_type_pretty_name - from acs_rel_types rel, acs_rel_roles role1, acs_rel_roles role2 - where rel.rel_type = :rel_type - and rel.role_one = role1.role(+) - and rel.role_two = role2.role(+) -} -column_array rel +db_1row select_rel_type_info {} -column_array rel set rel_type $props(req_rel_type) -db_1row select_rel_type_info { - select role1.role as role_one, - nvl(role1.pretty_name,'Object on side one') as role_one_pretty_name, - nvl(role1.pretty_plural,'Objects on side one') as role_one_pretty_plural, - role2.role as role_two, - nvl(role2.pretty_name,'Object on side two') as role_two_pretty_name, - nvl(role2.pretty_plural,'Objects on side two') as role_two_pretty_plural, - acs_object_type.pretty_name(rel.rel_type) as rel_type_pretty_name - from acs_rel_types rel, acs_rel_roles role1, acs_rel_roles role2 - where rel.rel_type = :rel_type - and rel.role_one = role1.role(+) - and rel.role_two = role2.role(+) -} -column_array req_rel +db_1row select_rel_type_info {} -column_array req_rel # Choose the appropriate role based on the side of the relation used @@ -115,3 +91,9 @@ # } ad_return_template + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: