Completed
Push — master ( 1ececc...cd826b )
by Alexey
04:48
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.
system/modules/Ecommerce/models/Item/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         'manager' => [
44 44
             'map' => [
45 45
                 ['name', 'code'],
46
-                ['delivery', 'electronic','discount']
46
+                ['delivery', 'electronic', 'discount']
47 47
             ]
48 48
         ]
49 49
     ];
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@
 block discarded – undo
2 2
   <div class="col-md-4">
3 3
     <ul class="nav nav-pills nav-stacked">
4 4
       <?php
5
-      $hiddenId = Tools::randomString();
6
-      foreach ($payTypes as $payType) {
7
-          if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
-              $checked = 'checked';
9
-          } else {
10
-              $checked = '';
11
-          }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
-          echo $payType->name;
14
-          echo '</a></li>';
15
-      }
16
-      $form->input('hidden', "payType", '', [
17
-          'value' => $cart->paytype_id,
18
-          'attributes' => [
19
-              'id' => $hiddenId
20
-          ],
21
-      ]);
22
-      ?>
5
+        $hiddenId = Tools::randomString();
6
+        foreach ($payTypes as $payType) {
7
+            if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
+                $checked = 'checked';
9
+            } else {
10
+                $checked = '';
11
+            }
12
+            echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
+            echo $payType->name;
14
+            echo '</a></li>';
15
+        }
16
+        $form->input('hidden', "payType", '', [
17
+            'value' => $cart->paytype_id,
18
+            'attributes' => [
19
+                'id' => $hiddenId
20
+            ],
21
+        ]);
22
+        ?>
23 23
     </ul>
24 24
   </div>
25 25
   <div class="col-md-8">
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
           } else {
10 10
               $checked = '';
11 11
           }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
12
+          echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$payType->id.'\';inji.Ecommerce.Cart.calcSum();return false;">';
13 13
           echo $payType->name;
14 14
           echo '</a></li>';
15 15
       }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/delivery.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@
 block discarded – undo
2 2
   <div class="col-md-4">
3 3
     <ul class="nav nav-pills nav-stacked">
4 4
       <?php
5
-      $hiddenId = Tools::randomString();
6
-      foreach ($deliverys as $delivery) {
7
-          if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) {
8
-              $checked = 'checked';
9
-          } else {
10
-              $checked = '';
11
-          }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
-          echo $delivery->name;
14
-          echo '</a></li>';
15
-      }
16
-      $form->input('hidden', "delivery", '', [
17
-          'value' => $cart->delivery_id,
18
-          'attributes' => [
19
-              'id' => $hiddenId
20
-          ],
21
-      ]);
22
-      ?>
5
+        $hiddenId = Tools::randomString();
6
+        foreach ($deliverys as $delivery) {
7
+            if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) {
8
+                $checked = 'checked';
9
+            } else {
10
+                $checked = '';
11
+            }
12
+            echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
+            echo $delivery->name;
14
+            echo '</a></li>';
15
+        }
16
+        $form->input('hidden', "delivery", '', [
17
+            'value' => $cart->delivery_id,
18
+            'attributes' => [
19
+                'id' => $hiddenId
20
+            ],
21
+        ]);
22
+        ?>
23 23
     </ul>
24 24
   </div>
25 25
   <div class="col-md-8">
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
                 $form->input($field->type, "deliveryFields[{$field->id}]", $field->name, ['required' => $field->required]);
40 40
             }
41 41
         }
42
-    }
43
-    else {
42
+    } else {
44 43
         echo "<h4>Выберите способ доставки</h4>";
45 44
     }
46 45
     ?>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
           } else {
10 10
               $checked = '';
11 11
           }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
12
+          echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$delivery->id.'\';inji.Ecommerce.Cart.calcSum();return false;">';
13 13
           echo $delivery->name;
14 14
           echo '</a></li>';
15 15
       }
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     if ($cart->delivery) {
28 28
         echo "<h4>Информация о доставке</h4>";
29 29
         if ($cart->delivery->price_text || $cart->delivery->price) {
30
-            echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>';
30
+            echo "<div>Стоимость доставки: <b>".($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price.' '.($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))).'</b></div>';
31 31
         }
32 32
         if ((float) $cart->delivery->max_cart_price) {
33
-            echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>';
33
+            echo '<div>При заказе товаров на сумму от '.$cart->delivery->max_cart_price.' руб - бесплатно</div>';
34 34
         }
35 35
         echo $cart->delivery->info;
36 36
         if ($cart->delivery->fields) {
Please login to merge, or discard this patch.
system/modules/Users/appControllers/content/login.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
         <h3>Вход</h3>
6 6
         <div class="form-group">
7 7
           <?php
8
-          $socials = Users\Social::getList(['where' => ['active', 1]]);
9
-          if ($socials) {
10
-              echo 'Войти через: ';
11
-              foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
-                  $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name();
13
-                  echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> ";
14
-              }
15
-          }
16
-          ?>
8
+            $socials = Users\Social::getList(['where' => ['active', 1]]);
9
+            if ($socials) {
10
+                echo 'Войти через: ';
11
+                foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
+                    $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name();
13
+                    echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> ";
14
+                }
15
+            }
16
+            ?>
17 17
         </div>
18 18
         <form action = '' method = 'POST' >
19 19
           <div class ='row'>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
           if ($socials) {
10 10
               echo 'Войти через: ';
11 11
               foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) {
12
-                  $text = $social->image ? '<img src ="' . Statics::file($social->image->path, '25x25', 'q') . '">' : $social->name();
12
+                  $text = $social->image ? '<img src ="'.Statics::file($social->image->path, '25x25', 'q').'">' : $social->name();
13 13
                   echo "<a href = '/users/social/auth/{$social->code}'>{$text}</a> ";
14 14
               }
15 15
           }
Please login to merge, or discard this patch.
system/modules/Exchange1c/appAdminControllers/Exchange1cController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
         foreach ($reExchange->files as $reFile) {
27 27
             if (strpos($reFile->name, '/')) {
28
-                Tools::createDir($exchange->path . '/' . substr($reFile->name, 0, strrpos($reFile->name, '/')));
28
+                Tools::createDir($exchange->path.'/'.substr($reFile->name, 0, strrpos($reFile->name, '/')));
29 29
             }
30
-            copy($reExchange->path . '/' . $reFile->name, $exchange->path . '/' . $reFile->name);
30
+            copy($reExchange->path.'/'.$reFile->name, $exchange->path.'/'.$reFile->name);
31 31
         }
32 32
 
33 33
         //Tools::copyFiles($reExchange->path, $exchange->path);
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
             $log->query = $reLog->query;
47 47
             $log->save();
48 48
 
49
-            $modeClass = 'Exchange1c\Mode\\' . ucfirst(strtolower($log->info));
49
+            $modeClass = 'Exchange1c\Mode\\'.ucfirst(strtolower($log->info));
50 50
             if (!class_exists($modeClass)) {
51 51
                 $log->status = 'failure';
52
-                $log->info = 'mode class ' . $modeClass . ' not found';
52
+                $log->info = 'mode class '.$modeClass.' not found';
53 53
                 $log->date_end = date('Y-m-d H:i:s');
54 54
                 $log->save();
55 55
             }
Please login to merge, or discard this patch.
system/modules/Exchange1c/appControllers/Exchange1cController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             $exchange->type = $_GET['type'];
35 35
             $exchange->session = session_id();
36 36
             $exchange->save();
37
-            $exchange->path = App::$cur->path . '/tmp/Exchange1c/' . date('Y-m-d') . '/' . $exchange->id;
37
+            $exchange->path = App::$cur->path.'/tmp/Exchange1c/'.date('Y-m-d').'/'.$exchange->id;
38 38
             $exchange->save();
39 39
         }
40 40
 
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
         $log->status = 'process';
46 46
         $log->query = json_encode($_GET);
47 47
         $log->save();
48
-        $modeClass = 'Exchange1c\Mode\\' . ucfirst(strtolower($_GET['mode']));
48
+        $modeClass = 'Exchange1c\Mode\\'.ucfirst(strtolower($_GET['mode']));
49 49
         if (!class_exists($modeClass)) {
50 50
             $log->status = 'failure';
51
-            $log->info = 'mode class ' . $modeClass . ' not found';
51
+            $log->info = 'mode class '.$modeClass.' not found';
52 52
             $log->date_end = date('Y-m-d H:i:s');
53 53
             $log->save();
54 54
         }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Checkauth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public function process()
17 17
     {
18 18
         $_SESSION['auth'] = true;
19
-        \App::$cur->exchange1c->response('success', session_name() . "\n" . session_id(), false);
19
+        \App::$cur->exchange1c->response('success', session_name()."\n".session_id(), false);
20 20
         $this->end();
21 21
     }
22 22
 
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Query.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         header("Content-Type: text/xml");
27 27
         header("Expires: Thu, 19 Feb 1998 13:24:18 GMT");
28
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
28
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
29 29
         header("Cache-Control: no-cache, must-revalidate");
30 30
         header("Cache-Control: post-check=0,pre-check=0");
31 31
         header("Cache-Control: max-age=0");
Please login to merge, or discard this patch.