@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function straightenMenu($menu_item, $depth) |
| 24 | 24 | { |
| 25 | - if(!$menu_item['link']) return; |
|
| 25 | + if (!$menu_item['link']) return; |
|
| 26 | 26 | $obj = new stdClass; |
| 27 | 27 | $obj->href = $menu_item['href']; |
| 28 | 28 | $obj->depth = $depth; |
| 29 | 29 | $obj->text = $menu_item['text']; |
| 30 | 30 | $obj->open_window = $menu_item['open_window']; |
| 31 | 31 | $this->result[] = $obj; |
| 32 | - if(!$menu_item['list']) return; |
|
| 33 | - foreach($menu_item['list'] as $item) |
|
| 32 | + if (!$menu_item['list']) return; |
|
| 33 | + foreach ($menu_item['list'] as $item) |
|
| 34 | 34 | { |
| 35 | - $this->straightenMenu($item, $depth+1); |
|
| 35 | + $this->straightenMenu($item, $depth + 1); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
@@ -46,22 +46,22 @@ discard block |
||
| 46 | 46 | $oAdminModel = getAdminModel('menu'); |
| 47 | 47 | $menu_info = $oAdminModel->getMenu($menu_srl); |
| 48 | 48 | |
| 49 | - if(!$menu_srl) |
|
| 49 | + if (!$menu_srl) |
|
| 50 | 50 | { |
| 51 | 51 | $oMenuAdminController = getAdminController('menu'); |
| 52 | 52 | $homeMenuCacheFile = $oMenuAdminController->getHomeMenuCacheFile(); |
| 53 | 53 | |
| 54 | - if(file_exists($homeMenuCacheFile)) |
|
| 54 | + if (file_exists($homeMenuCacheFile)) |
|
| 55 | 55 | { |
| 56 | 56 | @include($homeMenuCacheFile); |
| 57 | 57 | } |
| 58 | 58 | $menu_info->php_file = './files/cache/menu/'.$homeMenuSrl.'.php'; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if(file_exists($menu_info->php_file)) @include($menu_info->php_file); |
|
| 62 | - if(is_array($menu->list)) |
|
| 61 | + if (file_exists($menu_info->php_file)) @include($menu_info->php_file); |
|
| 62 | + if (is_array($menu->list)) |
|
| 63 | 63 | { |
| 64 | - foreach($menu->list as $menu_item) |
|
| 64 | + foreach ($menu->list as $menu_item) |
|
| 65 | 65 | { |
| 66 | 66 | $this->straightenMenu($menu_item, 0); |
| 67 | 67 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | Context::set('menu', $this->result); |
| 71 | 71 | |
| 72 | - $this->setTemplatePath(sprintf("%stpl/",$this->module_path)); |
|
| 72 | + $this->setTemplatePath(sprintf("%stpl/", $this->module_path)); |
|
| 73 | 73 | $this->setTemplateFile('menu.html'); |
| 74 | 74 | } |
| 75 | 75 | } |