summaryrefslogtreecommitdiff
path: root/lib/prado/framework/Web/UI/TControl.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-04-07 16:09:16 +0200
committeremkael <emkael@tlen.pl>2016-04-07 16:09:16 +0200
commitd42b25cbf6d3f1e51cb2a3149f1ff54cc5474bc9 (patch)
tree96b734357392d6094cfc5f8284ad8f2578b96b7f /lib/prado/framework/Web/UI/TControl.php
parentac6c2b9c4f787dfdfa00547f764c77d80dad14c0 (diff)
* Prado upgrade (to 3.3.r6b8e6601752b21a8a96c385a5529bbec7bb2b408)
Diffstat (limited to 'lib/prado/framework/Web/UI/TControl.php')
-rw-r--r--lib/prado/framework/Web/UI/TControl.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/prado/framework/Web/UI/TControl.php b/lib/prado/framework/Web/UI/TControl.php
index 055b552..be7b118 100644
--- a/lib/prado/framework/Web/UI/TControl.php
+++ b/lib/prado/framework/Web/UI/TControl.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link https://github.com/pradosoft/prado
- * @copyright Copyright &copy; 2005-2015 The PRADO Group
+ * @copyright Copyright &copy; 2005-2016 The PRADO Group
* @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
* @package System.Web.UI
*/
@@ -769,13 +769,19 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
{
if($this->_trackViewState)
{
- $this->_viewState[$key]=$value;
unset($this->_tempState[$key]);
+ if($value===$defaultValue)
+ unset($this->_viewState[$key]);
+ else
+ $this->_viewState[$key]=$value;
}
else
{
unset($this->_viewState[$key]);
- $this->_tempState[$key]=$value;
+ if($value===$defaultValue)
+ unset($this->_tempState[$key]);
+ else
+ $this->_tempState[$key]=$value;
}
}
@@ -1655,7 +1661,10 @@ class TControl extends TApplicationComponent implements IRenderable, IBindable
foreach($this->_rf[self::RF_CONTROLS] as $control)
{
if($control instanceof TControl)
- $state[$control->_id]=&$control->saveStateRecursive($needViewState);
+ {
+ if(count($tmp = &$control->saveStateRecursive($needViewState)))
+ $state[$control->_id]=$tmp;
+ }
}
}
if($needViewState && !empty($this->_viewState))