From 9b6118854942a4cdac089914695223b6a898a470 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 13 May 2007 11:24:12 +0000 Subject: [PATCH] "fix for bug #727: can not edit widgets below an embeded template" --- etemplate/inc/class.soetemplate.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index fb45b7e90c..4d19902c72 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -1174,16 +1174,16 @@ * * @param string/array $func function to use or array($obj,'method') * @param mixed &$extra extra parameter passed to function + * @param string $path='/' start-path * @return mixed return-value of func or null if nothing returned at all */ - function &widget_tree_walk($func,&$extra) + function &widget_tree_walk($func,&$extra,$path='/') { if (!is_callable($func)) { echo "

boetemplate($this->name)::widget_tree_walk(".print_r($func,true).", ".print_r($extra,true).", ".print_r($opts,true).") func is not callable !!!
".function_backtrace()."

"; return false; } - $path = '/'; foreach($this->children as $c => $nul) { $child = &$this->children[$c]; @@ -1304,7 +1304,7 @@ } if (!is_object($widget['obj'])) break; // cant descent into template - $result =& $widget['obj']->widget_tree_walk($func,$extra); + $result =& $widget['obj']->widget_tree_walk($func,$extra,$path.'/'); break; } return $result;