Index: openacs-4/packages/ecommerce/www/admin/cat/category-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/cat/category-add.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/cat/category-add.tcl 20 Apr 2001 20:51:13 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/cat/category-add.tcl 17 Jul 2001 23:59:03 -0000 1.2 @@ -18,9 +18,14 @@ # equal to the new sort key (average of prev_sort_key and next_sort_key); # otherwise warn them that their form is not up-to-date +### gilbertw - added do the calculation outside of the db. PostgreSQL encloses +# the bind variables in ' ' +# where sort_key = (:prev_sort_key + :next_sort_key)/2 +set sort_key [expr ($prev_sort_key + $next_sort_key)/2] + set n_conflicts [db_string get_n_conflicts "select count(*) from ec_categories -where sort_key = (:prev_sort_key + :next_sort_key)/2"] +where sort_key = :sort_key"] if { $n_conflicts > 0 } { ad_return_complaint 1 "
  • The category page appears to be out-of-date;