From b87d577aa19898aa9aeb5a3d9a1d162ab94f39ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 5 Feb 2012 20:50:13 +0100 Subject: [PATCH] Fixed validation --- file/lib/acp/form/ChatRoomAddForm.class.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/file/lib/acp/form/ChatRoomAddForm.class.php b/file/lib/acp/form/ChatRoomAddForm.class.php index 46dd2f6..422dbcb 100644 --- a/file/lib/acp/form/ChatRoomAddForm.class.php +++ b/file/lib/acp/form/ChatRoomAddForm.class.php @@ -68,23 +68,8 @@ public function validate() { parent::validate(); // validate title - try { - if (!I18nHandler::getInstance()->validateValue('title')) { - throw new UserInputException('title'); - } - } - catch (UserInputException $e) { - $this->errorType[$e->getField()] = $e->getType(); - } - - // validate topic - try { - if (!I18nHandler::getInstance()->validateValue('topic')) { - throw new UserInputException('topic'); - } - } - catch (UserInputException $e) { - $this->errorType[$e->getField()] = $e->getType(); + if (!I18nHandler::getInstance()->validateValue('title')) { + throw new UserInputException('title'); } }