1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-09 17:16:20 +02:00

Menu Manager $pref loop fix.

This commit is contained in:
Cameron
2013-05-20 17:09:58 -07:00
parent de24998308
commit e55b3cbbd9

View File

@ -76,12 +76,14 @@ class e_menu
} }
$eMenuArea = $this->getData(THEME_LAYOUT); $eMenuArea = $this->getData(THEME_LAYOUT);
//print_a($eMenuArea);
} }
else // the old v1.x way. else // the old v1.x way.
{ {
$eMenuArea = $this->getDataLegacy(); $eMenuArea = $this->getDataLegacy();
} }
$total = array(); $total = array();
foreach($eMenuArea as $area => $val) foreach($eMenuArea as $area => $val)
@ -137,18 +139,17 @@ class e_menu
*/ */
protected function getData($layout) protected function getData($layout)
{ {
$pref = e107::getPref('menu_layouts'); $mpref = e107::getPref('menu_layouts');
if(!varset($pref[$layout])) if(!varset($mpref[$layout]))
{ {
return array(); return array();
} }
foreach($mpref[$layout] as $area=>$v)
foreach($pref[$layout] as $area=>$v);
{ {
$c = 1; $c = 1;
foreach($v as $val) foreach($v as $val)
{ {
$class = intval($val['class']); $class = intval($val['class']);
@ -170,12 +171,15 @@ class e_menu
'menu_parms' => $val['parms'] 'menu_parms' => $val['parms']
); );
$c++; $c++;
} }
} }
// print_a($ret);
return $ret; return $ret;