$category->decreaseRank(); if (claro_failure::get_last_failure() == 'category_no_predecessor') { $dialogBox->error(get_lang('This category can\'t be moved up')); } else { $dialogBox->success(get_lang('Category moved up')); } } else { $dialogBox->error(get_lang('Category not found')); } break; // Shift or displace category (down) // Shift or displace category (down) case 'exMoveDown': $category = new claroCategory(); if ($category->load($id)) { $category->increaseRank(); if (claro_failure::get_last_failure() == 'category_no_successor') { $dialogBox->error(get_lang('This category can\'t be moved down')); } else { $dialogBox->success(get_lang('Category moved down')); } } else { $dialogBox->error(get_lang('Category not found')); } break; // Change the visibility of a category // Change the visibility of a category case 'exVisibility': $category = new claroCategory(null, null, null, null, null, null, null, null); if ($category->load($id)) { if ($category->swapVisibility()) {