Index: branches/RC/themes/default2007/platform/inc/script.js =================================================================== diff -u -r9021 -r9022 --- branches/RC/themes/default2007/platform/inc/script.js (.../script.js) (revision 9021) +++ branches/RC/themes/default2007/platform/inc/script.js (.../script.js) (revision 9022) @@ -30,14 +30,20 @@ } } -ItemCategories.prototype.AddCategory = function($separator, $delete_button) { +ItemCategories.prototype.AddCategory = function($separator, $delete_button, $max_categories) { var $category_id = this.CategorySelector.options[this.CategorySelector.selectedIndex].value; var $category_name = this.CategorySelector.options[this.CategorySelector.selectedIndex].innerHTML.trim(); if ((this.SearchCategory($category_id) !== false) || ($category_id == this.PrimaryCategory) || ($category_id == 0)) { // don't add same category twice & don't allow to add item's primary category return ; } + + if ((this.MoreCategories.length + 1) > $max_categories) + { + // don't add more category - $max_categories limit + return ; + } // strip trailing HTML spaces & separator var $separator_pos = $category_name.indexOf($separator);