diff options
author | ctrlaltca <> | 2013-01-02 14:42:24 +0000 |
---|---|---|
committer | ctrlaltca <> | 2013-01-02 14:42:24 +0000 |
commit | edf2251aca60a970e822079d23933e5b70b26571 (patch) | |
tree | 366b6688efbb03f20f47268bea57859cea673c70 /framework/Web/UI | |
parent | 8e5f2510bd577e15095e46afc7d0ba6808549bf8 (diff) |
backported all related changes up to 3229 to branch/3.2
Diffstat (limited to 'framework/Web/UI')
-rwxr-xr-x | framework/Web/UI/ActiveControls/TActiveFileUpload.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php index ca924026..6c6d4bd1 100755 --- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php +++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php @@ -276,7 +276,7 @@ EOS; // tricky workaround to intercept "uploaded file too big" error: real uploads happens in onFileUpload instead $this->_errorCode = UPLOAD_ERR_FORM_SIZE; $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),'')); - $filename = addslashes($this->getFileName()); + $fileName = addslashes($this->getFileName()); $params = new TActiveFileUploadCallbackParams; $params->localName = $localName; diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index db1bba32..08c677b1 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -507,7 +507,6 @@ abstract class TBaseValidator extends TLabel implements IValidator */ public function validate() { - $this->setIsValid(true); $this->onValidate(); if($this->getVisible(true) && $this->getEnabled(true)) { @@ -536,6 +535,8 @@ abstract class TBaseValidator extends TLabel implements IValidator $this->setIsValid(true); $this->onValidationSuccess(); } + } else { + $this->setIsValid(true); } return $this->getIsValid(); } |