Index: openacs-4/packages/acs-subsite/www/admin/rel-types/new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/new-2.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-subsite/www/admin/rel-types/new-2.tcl 15 Jun 2015 11:14:18 -0000 1.8 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/new-2.tcl 7 Aug 2017 23:47:58 -0000 1.9 @@ -21,7 +21,7 @@ role_two:optional min_n_rels_two:optional max_n_rels_two:optional - { return_url "" } + { return_url:localurl "" } } -properties { context:onevalue supertype_pretty_name:onevalue @@ -74,24 +74,12 @@ and r.rel_type = t.object_type } -set object_types_one_list [db_list_of_lists select_object_types_one { - select replace(lpad(' ', (level - 1) * 4), ' ', ' ') || t.pretty_name, - t.object_type as rel_type - from acs_object_types t - connect by prior t.object_type = t.supertype - start with t.object_type=:max_object_type_one -}] +set object_types_one_list [db_list_of_lists select_object_types_one {}] foreach obj $object_types_one_list { lappend object_types_one_list_i18n [lang::util::localize $obj] } -set object_types_two_list [db_list_of_lists select_object_types_two { - select replace(lpad(' ', (level - 1) * 4), ' ', ' ') || t.pretty_name, - t.object_type as rel_type - from acs_object_types t - connect by prior t.object_type = t.supertype - start with t.object_type=:max_object_type_two -}] +set object_types_two_list [db_list_of_lists select_object_types_two {}] foreach obj $object_types_two_list { lappend object_types_two_list_i18n [lang::util::localize $obj] } @@ -175,20 +163,12 @@ Please back up and choose another." } else { # let's make sure the names are unique - if { [db_string pretty_name_unique { - select case when exists (select 1 from acs_object_types t where t.pretty_name = :pretty_name) - then 1 else 0 end - from dual - }] } { + if { [db_string pretty_name_unique {}] } { incr exception_count append exception_text "
  • The specified pretty name, $pretty_name, already exists. Please enter another
  • " } - if { [db_string pretty_plural_unique { - select case when exists (select 1 from acs_object_types t where t.pretty_plural = :pretty_plural) - then 1 else 0 end - from dual - }] } { + if { [db_string pretty_plural_unique {}] } { incr exception_count append exception_text "
  • The specified pretty plural, $pretty_plural, already exists. Please enter another
  • " } @@ -218,3 +198,9 @@ } ad_return_template + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: