@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME); |
| 26 | 26 | $this->model->image_file_id = 0; |
| 27 | 27 | foreach ($value as $key => $imagePath) { |
| 28 | - if (!$imagePath || !file_exists($dir . '/' . $imagePath)) { |
|
| 28 | + if (!$imagePath || !file_exists($dir.'/'.$imagePath)) { |
|
| 29 | 29 | continue; |
| 30 | 30 | } |
| 31 | 31 | $notEq = true; |
| 32 | - $md5Cur = md5_file($dir . '/' . $imagePath); |
|
| 32 | + $md5Cur = md5_file($dir.'/'.$imagePath); |
|
| 33 | 33 | foreach ($this->model->images as $imageId => $image) { |
| 34 | 34 | if (!$image->file) { |
| 35 | - var_dump($image,$this->model->images); |
|
| 35 | + var_dump($image, $this->model->images); |
|
| 36 | 36 | $image->delete(); |
| 37 | 37 | continue; |
| 38 | 38 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | if ($notEq) { |
| 55 | - $file_id = \App::$primary->files->uploadFromUrl($dir . '/' . $imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']); |
|
| 55 | + $file_id = \App::$primary->files->uploadFromUrl($dir.'/'.$imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']); |
|
| 56 | 56 | if ($file_id) { |
| 57 | 57 | $image = new \Ecommerce\Item\Image([ |
| 58 | 58 | 'item_id' => $this->model->pk(), |