"fix for bug #727: can not edit widgets below an embeded template"

This commit is contained in:
Ralf Becker 2007-05-13 11:24:12 +00:00
parent b07f9f9704
commit 9b61188549

View File

@ -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 "<p><b>boetemplate($this->name)::widget_tree_walk</b>(".print_r($func,true).", ".print_r($extra,true).", ".print_r($opts,true).") func is not callable !!!<br>".function_backtrace()."</p>";
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;