All pastes #632171 Raw Edit

Zeug

public text v1 · immutable
#632171 ·published 2007-07-24 17:27 UTC
rendered paste body
function &menubench_get_menu_items($curkey, &$keys, &$items,
	&$templ, $curtemplkey = 'current_item', $prefix = '', $postfix = '')
{
	$str = '';
	$dosep = false;
	reset($keys);
	while($ent = each($keys))
	{
		if(!isset($items[$ent[1]]))
			continue;

		if($curkey != $ent[1])
			$w = 'item';
		else
			$w = $curtemplkey;
		$str .= menubench_get_item(
			$templ, $w, $items[$ent[1]], $dosep);
			echo $str;
	}
	if($dosep)
		if( preg_match( '/^http/', $str) ) 
			$str = $str.$postfix;
		else
			$str = $prefix.$str.$postfix;
	return $str;
}