Skip to content
Snippets Groups Projects
Commit bc5c14c1 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4199: clearning up recursion in uwService

parent 079ded73
No related branches found
No related tags found
No related merge requests found
......@@ -355,23 +355,16 @@ class UWService implements UWServiceInterface {
// Step through the menus and check for submenus and count.
foreach ($menus as $menu) {
// Increment the menu items counter.
$menu_items_count++;
// If there is a submenu, recursivley call the count function.
if (isset($menu['submenu']) && count($menu['submenu']) > 0) {
// Increment the menu items counter.
$menu_items_count++;
// Recursively check the submenu.
$this->uwCountMenuItems($menu['submenu'], $menu_items_count);
}
// If there are no submenus, simple increment the menu items counter.
else {
// Increment the menu items counter.
$menu_items_count++;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment