Adds missing validation of category's i18n values
authorMatthias Schmidt <gravatronics@live.com>
Thu, 12 Jul 2012 20:10:04 +0000 (22:10 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 12 Jul 2012 20:10:04 +0000 (22:10 +0200)
wcfsetup/install/files/lib/acp/form/AbstractCategoryAddForm.class.php

index e7d3a77a62c4ca73b43f06cbb3a63781a9179ed7..3fb3c6ddb50efa06be577e9fb46eef836d745fff 100644 (file)
@@ -305,6 +305,14 @@ abstract class AbstractCategoryAddForm extends ACPForm {
                parent::validate();
                
                $this->validateParentCategory();
+               
+               if (!I18nHandler::getInstance()->validateValue('title')) {
+                       throw new UserInputException('title');
+               }
+               
+               if (!I18nHandler::getInstance()->validateValue('description')) {
+                       throw new UserInputException('description');
+               }
        }
        
        /**