From 9abe56ff94edfef5ccf0ee7a53035c40e5a600e9 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 23 Jul 2012 23:48:11 +0000 Subject: [PATCH] Check modifications array for attributes too - catches attributes set by app (eg: disabled) --- etemplate/inc/class.etemplate_widget.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.etemplate_widget.inc.php b/etemplate/inc/class.etemplate_widget.inc.php index 51b2db2b4e..9e335a64f1 100644 --- a/etemplate/inc/class.etemplate_widget.inc.php +++ b/etemplate/inc/class.etemplate_widget.inc.php @@ -173,6 +173,13 @@ class etemplate_widget } } } + + // Add in anything in the modification array + if(is_array(self::$request->modifications[$this->id])) + { + $this->attrs = array_merge($this->attrs,self::$request->modifications[$this->id]); + } + return $template; } @@ -343,10 +350,8 @@ class etemplate_widget $expand['cont'] =& self::get_array(self::$request->content, $cname); $expand['cname'] = $cname; } - if ($respect_disabled && ($disabled = $this->attrs['disabled'])) + if ($respect_disabled && ($disabled = $this->attrs['disabled'] || $disabled = self::check_disabled($disabled, $expand))) { - // check if disabled contains @ or ! - $disabled = self::check_disabled($disabled, $expand); if ($disabled) { error_log(__METHOD__."('$method_name', ".array2string($params).', '.array2string($respect_disabled).") $this disabled='{$this->attrs['disabled']}'='$disabled': NOT running");