From 1b237f5c0a50fc3e986ec52fa6771eec0c7c351c Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Tue, 11 Oct 2011 07:53:51 +0000 Subject: TActiveFileUpload: fix when 2 TActiveFileUpload are present in the same page and one of them in inside 2 (o more) nested templates (refs #90) --- framework/Web/UI/ActiveControls/TActiveFileUpload.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/ActiveControls') diff --git a/framework/Web/UI/ActiveControls/TActiveFileUpload.php b/framework/Web/UI/ActiveControls/TActiveFileUpload.php index 2c85aff0..98a7f422 100755 --- a/framework/Web/UI/ActiveControls/TActiveFileUpload.php +++ b/framework/Web/UI/ActiveControls/TActiveFileUpload.php @@ -97,7 +97,8 @@ class TActiveFileUpload extends TFileUpload implements IActiveControl, ICallback * the invocation of the attached event handlers. * @param TEventParameter event parameter to be passed to the event handlers */ - public function onFileUpload($param){ + public function onFileUpload($param) + { if ($this->_flag->getValue() && $this->getPage()->getIsPostBack() && $param == $this->_target->getUniqueID()){ // save the file so that it will persist past the end of this return. $localName = str_replace('\\', '/', tempnam(Prado::getPathOfNamespace($this->getTempPath()),'')); @@ -217,7 +218,7 @@ EOS; */ public function raisePostDataChangedEvent() { - $this->onFileUpload($this->getPage()->getRequest()->itemAt('tempActiveUploadField')); + $this->onFileUpload($this->getPage()->getRequest()->itemAt('TActiveFileUpload_TargetId')); } protected function pushParamsAndGetToken(TActiveFileUploadCallbackParams $params) -- cgit v1.2.3