diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 418a5b8ca7..f935f3f2b8 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -426,8 +426,14 @@ class boetemplate extends soetemplate */ protected function haveExtension($type,$function='') { - return (self::$extensions[$type] || $this->loadExtension($type,$ui)) && - ($function == '' || self::$extensions[$type]->public_functions[$function]); + if (self::$extensions[$type] || $this->loadExtension($type,$ui)) + { + if (empty($function)) return true; + + return isset(self::$extensions[$type]->public_functions[$function]) ? + self::$extensions[$type]->public_functions[$function] : false; + } + return false; } /** diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 03b839e7f9..7a321e7cb1 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -989,6 +989,7 @@ class etemplate extends boetemplate $readonly = $cell['readonly'] !== false && ($readonly || $cell['readonly']); // might be set or unset (===false) by extension + if (is_null($name)) $name = $cell['name']; self::set_array($content,$name,$value); if ($cell['type'] == $type.'-'.$sub_type) break; // stop if no further type-change @@ -1661,7 +1662,8 @@ class etemplate extends boetemplate break; } // extension-processing need to be after all other and only with diff. name - if ($ext_type && !$readonly && $this->haveExtension($ext_type,'post_process')) + if ($ext_type && !$readonly && ($have = $this->haveExtension($ext_type,'post_process')) && + ($have === true || isset($have[$cell['type']]))) // check if post-process should be used for all sub-types { // unset it first, if it is already set, to be after the other widgets of the ext. $to_process = self::$request->get_to_process($form_name); self::$request->unset_to_process($form_name);