Completed
Push — master ( b5207b...337c6f )
by Alexey
05:05
created
system/modules/Menu/widgets/menu.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,18 +9,20 @@
 block discarded – undo
9 9
 $menu = \Menu\Menu::get($code, 'code');
10 10
 if ($menu) {
11 11
     foreach ($menu->items(['where' => ['parent_id', 0], 'order' => ['weight', 'asc']]) as $item) {
12
-        if (urldecode($_SERVER['REQUEST_URI']) == $item->href)
13
-            $active = ' class = "active" ';
14
-        else
15
-            $active = '';
12
+        if (urldecode($_SERVER['REQUEST_URI']) == $item->href) {
13
+                    $active = ' class = "active" ';
14
+        } else {
15
+                    $active = '';
16
+        }
16 17
         echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>";
17 18
         if ($item->childs(['order' => ['weight', 'asc']])) {
18 19
             echo "<ul>";
19 20
             foreach ($item->childs as $item) {
20
-                if (urldecode($_SERVER['REQUEST_URI']) == $item->href)
21
-                    $active = ' class = "active" ';
22
-                else
23
-                    $active = '';
21
+                if (urldecode($_SERVER['REQUEST_URI']) == $item->href) {
22
+                                    $active = ' class = "active" ';
23
+                } else {
24
+                                    $active = '';
25
+                }
24 26
                 echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>";
25 27
             }
26 28
             echo "</ul>";
Please login to merge, or discard this patch.