summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-12-21 12:55:05 +0000
committerctrlaltca@gmail.com <>2011-12-21 12:55:05 +0000
commitb26680c80e112cc91755fea84426f2d57beb4232 (patch)
tree82dfae906183cbbcc3b65ab6975c12d0a2ea3322
parente542ea49ceb77ad48f144a9f4ab1eaaafe4dc198 (diff)
fix #314
-rw-r--r--HISTORY1
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveFileUpload.php1
-rw-r--r--framework/Web/UI/WebControls/TFileUpload.php2
3 files changed, 3 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 94544c07..8a1b9c31 100644
--- a/HISTORY
+++ b/HISTORY
@@ -36,6 +36,7 @@ BUG: Issue #275 - THttpResponse::writeFile delivers the wrong content type (ctrl
BUG: Issue #283 - constructUrl does not work as before in TShellApplication (ctrlaltca)
BUG: Issue #284 - Wrong reading of information_schema (ctrlaltca)
BUG: Issue #301 - Fixed a bug in TActiveFileUpload (ctrlaltca)
+BUG: Issue #314 - T(Active)FileUpload $_errorCode private vs protected (ctrlaltca)
ENH: Issue #337 - Prado serialization optimizations (Gabor)
BUG: Issue #341 - TSafeHtmlParser messes up UTF8-encoded strings (ctrlaltca)
BUG: Issue #342 - TStyle does no accept style values with ":" (ctrlaltca)
diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
index 1a49c20d..8cc1fe9a 100755
--- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php
+++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php
@@ -274,6 +274,7 @@ EOS;
if(!$this->getPage()->getIsPostBack() && isset($_GET['TActiveFileUpload_InputId']) && isset($_GET['TActiveFileUpload_TargetId']) && $_GET['TActiveFileUpload_InputId'] == $this->getClientID())
{
+ // 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());
diff --git a/framework/Web/UI/WebControls/TFileUpload.php b/framework/Web/UI/WebControls/TFileUpload.php
index 593acc70..218a185b 100644
--- a/framework/Web/UI/WebControls/TFileUpload.php
+++ b/framework/Web/UI/WebControls/TFileUpload.php
@@ -57,7 +57,7 @@ class TFileUpload extends TWebControl implements IPostBackDataHandler, IValidata
/**
* @var integer error code of the current file upload
*/
- private $_errorCode=UPLOAD_ERR_NO_FILE;
+ protected $_errorCode=UPLOAD_ERR_NO_FILE;
private $_dataChanged=false;
private $_isValid=true;