Completed
Push — master ( bb267d...fbe197 )
by Alexey
05:29
created
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/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@
 block discarded – undo
24 24
 
25 25
         if (strpos($_GET['filename'], '/') !== false) {
26 26
             $subDir = substr($_GET['filename'], 0, strrpos($_GET['filename'], "/") + 1);
27
-            \Tools::createDir($dir . '/' . $subDir);
27
+            \Tools::createDir($dir.'/'.$subDir);
28 28
         }
29 29
         $status = 'success';
30 30
         $text = '';
31
-        if (false === file_put_contents($dir . '/' . $_GET['filename'], file_get_contents("php://input"))) {
31
+        if (false === file_put_contents($dir.'/'.$_GET['filename'], file_get_contents("php://input"))) {
32 32
             $status = 'failure';
33
-            $text = 'Fail on save file: ' . $_GET['filename'];
33
+            $text = 'Fail on save file: '.$_GET['filename'];
34 34
         }
35 35
         if (strpos($_GET['filename'], '1cbitrix') !== false) {
36
-            $data = new \SimpleXMLElement(file_get_contents($dir . '/' . $_GET['filename']));
36
+            $data = new \SimpleXMLElement(file_get_contents($dir.'/'.$_GET['filename']));
37 37
             $orders = new \Exchange1c\Parser\Orders($data);
38 38
             $orders->process();
39 39
         }
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.
system/modules/Exchange1c/objects/Mode/Import.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 {
16 16
     public function process()
17 17
     {
18
-        \App::$cur->Migrations->startMigration(1, strpos($_GET['filename'], 'import') !== false ? 1 : 2, $this->exchange->path . '/' . $_GET['filename']);
18
+        \App::$cur->Migrations->startMigration(1, strpos($_GET['filename'], 'import') !== false ? 1 : 2, $this->exchange->path.'/'.$_GET['filename']);
19 19
         echo 'success';
20 20
         $this->end();
21 21
     }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Init.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
         echo "zip=no\n";
19
-        echo 'file_limit=' . \Tools::toBytes(ini_get('post_max_size'));
19
+        echo 'file_limit='.\Tools::toBytes(ini_get('post_max_size'));
20 20
         $this->end();
21 21
     }
22 22
 
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Orders.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $cart->warehouse_block = 0;
71 71
                 foreach ($cart->cartItems as $cci) {
72 72
                     if ($cci->price && $cci->price->offer) {
73
-                        $cci->price->offer->changeWarehouse('-' . (float) $cci->count);
73
+                        $cci->price->offer->changeWarehouse('-'.(float) $cci->count);
74 74
                     }
75 75
                 }
76 76
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         foreach ($cart->cartItems as $cartItem) {
134 134
             $isset = false;
135 135
             foreach ($cItems as $key => $cItem) {
136
-                if (!($cItem['item_id'] == $cartItem->item_id )) {
136
+                if (!($cItem['item_id'] == $cartItem->item_id)) {
137 137
                     continue;
138 138
                 }
139 139
                 $isset = true;
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Parser/Item/Images.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
         $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME);
24 24
         $this->model->image_file_id = 0;
25 25
         foreach ($value as $key => $imagePath) {
26
-            if (!$imagePath || !file_exists($dir . '/' . $imagePath)) {
26
+            if (!$imagePath || !file_exists($dir.'/'.$imagePath)) {
27 27
                 continue;
28 28
             }
29 29
             $notEq = true;
30
-            $md5Cur = md5_file($dir . '/' . $imagePath);
30
+            $md5Cur = md5_file($dir.'/'.$imagePath);
31 31
             foreach ($this->model->images as $imageId => $image) {
32 32
                 $file = $image->file;
33 33
                 $md5File = '';
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
                     $file->save();
39 39
                 }
40 40
 
41
-                if ($file && $imagePath && file_exists($dir . '/' . $imagePath) && file_exists(\App::$primary->path . $file->path) && $md5Cur == $md5File) {
41
+                if ($file && $imagePath && file_exists($dir.'/'.$imagePath) && file_exists(\App::$primary->path.$file->path) && $md5Cur == $md5File) {
42 42
                     $notEq = false;
43 43
                     break;
44 44
                     $ids[] = $imageId;
45 45
                 }
46 46
             }
47 47
             if ($notEq) {
48
-                $file_id = \App::$primary->files->uploadFromUrl($dir . '/' . $imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
48
+                $file_id = \App::$primary->files->uploadFromUrl($dir.'/'.$imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
49 49
                 $image = new \Ecommerce\Item\Image([
50 50
                     'item_id' => $this->model->pk(),
51 51
                     'file_id' => $file_id
Please login to merge, or discard this patch.