From edf2251aca60a970e822079d23933e5b70b26571 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Wed, 2 Jan 2013 14:42:24 +0000 Subject: backported all related changes up to 3229 to branch/3.2 --- framework/Web/UI/ActiveControls/TActiveFileUpload.php | 2 +- framework/Web/UI/WebControls/TBaseValidator.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web') 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(); } -- cgit v1.2.3