- check for empty category name

This commit is contained in:
steinm 2012-02-27 19:32:34 +00:00
parent bbcfb77f5b
commit dfbc974ee9

View File

@ -33,7 +33,10 @@ $action = $_GET["action"];
//Neue Kategorie anlegen -----------------------------------------------------------------------------
if ($action == "addcategory") {
$name = $_GET["name"];
$name = trim($_GET["name"]);
if($name == '') {
UI::exitError(getMLText("admin_tools"),getMLText("category_noname"));
}
if (is_object($dms->getDocumentCategoryByName($name))) {
UI::exitError(getMLText("admin_tools"),getMLText("category_exists"));
}