From 1fd2ac430e0d636dec4ff724f0deaa1883d142fe Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 29 Sep 2007 19:56:41 +0000 Subject: Fixed TConditional expression context. --- framework/Web/UI/WebControls/TConditional.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/Web/UI/WebControls/TConditional.php b/framework/Web/UI/WebControls/TConditional.php index 70eedf6d..41535ca4 100644 --- a/framework/Web/UI/WebControls/TConditional.php +++ b/framework/Web/UI/WebControls/TConditional.php @@ -74,7 +74,7 @@ class TConditional extends TControl $result=true; try { - $result=$this->evaluateExpression($this->_condition); + $result=$this->getTemplateControl()->evaluateExpression($this->_condition); } catch(Exception $e) { @@ -99,6 +99,8 @@ class TConditional extends TControl } /** + * Sets the PHP expression to be evaluated for conditionally displaying content. + * The context of the expression is the template control containing TConditional. * @param string the PHP expression used for determining which template to use. */ public function setCondition($value) -- cgit v1.2.3