Fix SmileyAddForm
authorTim Düsterhus <timwolla@googlemail.com>
Fri, 4 Oct 2013 12:23:44 +0000 (14:23 +0200)
committerTim Düsterhus <timwolla@googlemail.com>
Fri, 4 Oct 2013 12:23:44 +0000 (14:23 +0200)
- proper validation of smileyPath
- reset aliases after submit

see http://beta.woltlab.com/index.php/Thread/4046-Fehler-beim-Smiley-hinzuf%C3%BCgen/

wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php

index 15fbc9be5a4fb3a77ca309f578353e1a480dfebb..dd941998c6eafd79c543f1109cc4e4d747c20ed1 100644 (file)
@@ -173,6 +173,7 @@ class SmileyAddForm extends AbstractForm {
                $this->categoryID = 0;
                $this->showOrder = 0;
                $this->smileyPath = '';
+               $this->alises = '';
                
                I18nHandler::getInstance()->reset();
                
@@ -213,7 +214,7 @@ class SmileyAddForm extends AbstractForm {
                        throw new UserInputException('smileyPath');
                }
                
-               if (!file_exists(WCF_DIR.$this->smileyPath)) {
+               if (!is_file(WCF_DIR.$this->smileyPath)) {
                        throw new UserInputException('smileyPath', 'notFound');
                }