Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl 28 Aug 2003 09:41:40 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/one.tcl 10 Oct 2003 12:25:51 -0000 1.5 @@ -30,18 +30,13 @@ set context [list [list "./" "Relational segments"] "One segment"] -if { ![db_0or1row select_segment_properties { - select s.segment_id, s.segment_name, s.group_id, acs_object.name(s.group_id) as group_name, - s.rel_type, acs_object_type.pretty_name(r.rel_type) as rel_type_pretty_name, - acs_rel_type.role_pretty_plural(r.role_two) as role_pretty_plural - from rel_segments s, acs_rel_types r - where s.segment_id = :segment_id - and s.rel_type = r.rel_type -} -column_array props] } { +if { ![db_0or1row select_segment_properties {} -column_array props] } { ad_return_error "Segment does not exist" "Segment $segment_id does not exist" return } +set props(role_pretty_plural) [lang::util::localize $props(role_pretty_plural)] + set name_edit_url [export_vars -base edit { segment_id }] # Pull out the number of elements that the current user can see. We do Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/Attic/one-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-oracle.xql 9 Sep 2001 17:42:04 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-oracle.xql 10 Oct 2003 12:25:51 -0000 1.3 @@ -16,7 +16,6 @@ and s2.segment_id = c.required_rel_segment and c.constraint_id = :constraint_id and s.package_id = :package_id - and s2.package_id = :package_id Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/Attic/one-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-postgresql.xql 9 Sep 2001 17:42:04 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one-postgresql.xql 10 Oct 2003 12:25:51 -0000 1.3 @@ -16,7 +16,6 @@ and s2.segment_id = c.required_rel_segment and c.constraint_id = :constraint_id and s.package_id = :package_id - and s2.package_id = :package_id 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.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 6 Sep 2002 21:50:02 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/one.tcl 10 Oct 2003 12:25:51 -0000 1.3 @@ -39,19 +39,7 @@ # (itself identified by rel_side) must belong before belonging to # rel_segment -if { ![db_0or1row select_constraint_properties { - select c.constraint_id, c.constraint_name, c.rel_side, - s.segment_id, s.segment_name, s.rel_type, acs_group.name(s.group_id) as group_name, - s2.segment_id as req_segment_id, s2.segment_name as req_segment_name, - s2.rel_type as req_rel_type, acs_group.name(s2.group_id) as req_group_name - from application_group_segments s, application_group_segments s2, - rel_constraints c - where s.segment_id = c.rel_segment - and s2.segment_id = c.required_rel_segment - and c.constraint_id = :constraint_id - and s.package_id = :package_id - and s2.package_id = :package_id -} -column_array props] } { +if { ![db_0or1row select_constraint_properties {} -column_array props] } { ad_return_error "Error" "Constraint #$constraint_id could not be found or is out of the scope of this subsite." return } @@ -102,12 +90,12 @@ set rel_side $props(rel_side) set rel(role) $rel(role_${rel_side}) -set rel(role_pretty_name) $rel(role_${rel_side}_pretty_name) -set rel(role_pretty_plural) $rel(role_${rel_side}_pretty_plural) +set rel(role_pretty_name) [lang::util::localize $rel(role_${rel_side}_pretty_name)] +set rel(role_pretty_plural) [lang::util::localize $rel(role_${rel_side}_pretty_plural)] set req_rel(role) $req_rel(role_${rel_side}) -set req_rel(role_pretty_name) $req_rel(role_${rel_side}_pretty_name) -set req_rel(role_pretty_plural) $req_rel(role_${rel_side}_pretty_plural) +set req_rel(role_pretty_name) [lang::util::localize $req_rel(role_${rel_side}_pretty_name)] +set req_rel(role_pretty_plural) [lang::util::localize $req_rel(role_${rel_side}_pretty_plural)] # Now query for any violations. Note that we use union all since we