Completed
Push — master ( 6e0e1d...0afdc4 )
by Alexey
04:12
created
system/modules/Ecommerce/appControllers/EcommerceController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
       foreach ($fields as $field) {
43 43
         if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
44 44
           $error = 1;
45
-          Msg::add('Вы не указали: ' . $field->name);
45
+          Msg::add('Вы не указали: '.$field->name);
46 46
         }
47 47
       }
48 48
       if (!$error) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $extra->price = $card->price;
71 71
         $extra->count = 1;
72 72
         $extra->cart_id = $cart->id;
73
-        $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id;
73
+        $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id;
74 74
         $extra->save();
75 75
         Tools::redirect('/ecommerce/cart/success');
76 76
       }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
       $items = $this->ecommerce->getItems();
85 85
       $return = [];
86 86
       foreach ($items as $item) {
87
-        $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name];
87
+        $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name];
88 88
       }
89 89
       $return = json_encode($return);
90 90
       Cache::set('itemsAutocomplete', [], $return);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
       $categoryIds = array_values(array_filter(explode('/', $category->tree_path)));
159 159
       foreach ($categoryIds as $id) {
160 160
         $cat = Ecommerce\Category::get($id);
161
-        $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id);
161
+        $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id);
162 162
       }
163 163
       $bread[] = array('text' => $category->name);
164 164
       $this->view->setTitle($category->name);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     foreach ($catalogIds as $id) {
224 224
       $cat = Ecommerce\Category::get($id);
225 225
       if ($cat) {
226
-        $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id];
226
+        $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id];
227 227
       }
228 228
     }
229 229
     $bread[] = ['text' => $item->name()];
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
     $this->view->addMetaTag(['property' => 'og:title', 'content' => $item->name]);
240 240
     $this->view->addMetaTag(['property' => 'og:description', 'content' => $item->description]);
241 241
     if ($item->image) {
242
-      $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . INJI_DOMAIN_NAME . $item->image->path]);
242
+      $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.INJI_DOMAIN_NAME.$item->image->path]);
243 243
     }
244
-    $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . INJI_DOMAIN_NAME . '/view/' . $item->id]);
244
+    $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.INJI_DOMAIN_NAME.'/view/'.$item->id]);
245 245
 
246 246
     $this->view->page($options);
247 247
   }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/Init.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
   public function process() {
17 17
     echo "zip=no\n";
18
-    echo 'file_limit=' . \Tools::toBytes(ini_get('post_max_size'));
18
+    echo 'file_limit='.\Tools::toBytes(ini_get('post_max_size'));
19 19
     $this->end();
20 20
 
21 21
     //clean files
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
       $query = \App::$cur->db->newQuery();
24 24
       $query->operation = 'select';
25 25
       $query->table = \Exchange1c\Exchange\File::table();
26
-      $query->cols = \Exchange1c\Exchange\File::colPrefix() . 'id';
26
+      $query->cols = \Exchange1c\Exchange\File::colPrefix().'id';
27 27
       $queryArr = $query->buildQuery();
28
-      $queryArr['query'].=' where `' . \Exchange1c\Exchange\File::colPrefix() . 'deleted` = 0 AND  `' . \Exchange1c\Exchange\File::colPrefix() . 'date_create` < NOW() - INTERVAL ' . \App::$cur->exchange1c->config['maxSaveFilesInterval'];
28
+      $queryArr['query'] .= ' where `'.\Exchange1c\Exchange\File::colPrefix().'deleted` = 0 AND  `'.\Exchange1c\Exchange\File::colPrefix().'date_create` < NOW() - INTERVAL '.\App::$cur->exchange1c->config['maxSaveFilesInterval'];
29 29
       try {
30 30
         $ids = array_keys($query->query($queryArr)->getArray(\Exchange1c\Exchange\File::colPrefix().'id'));
31 31
       } catch (\PDOException $exc) {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         } elseif ($exc->getCode() == '42S22') {
35 35
           $cols = \Exchange1c\Exchange\File::cols();
36 36
           foreach (\Exchange1c\Exchange\File::$cols as $colName => $params) {
37
-            if (!isset($cols[\Exchange1c\Exchange\File::colPrefix() . $colName])) {
37
+            if (!isset($cols[\Exchange1c\Exchange\File::colPrefix().$colName])) {
38 38
               \Exchange1c\Exchange\File::createCol($colName);
39 39
             }
40 40
           }
Please login to merge, or discard this patch.
system/modules/Exchange1c/objects/Mode/File.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,20 +25,20 @@
 block discarded – undo
25 25
     $filename = \Tools::parsePath($_GET['filename']);
26 26
     if (strpos($filename, '/') !== false) {
27 27
       $subDir = substr($filename, 0, strrpos($filename, "/") + 1);
28
-      \Tools::createDir($dir . '/' . $subDir);
28
+      \Tools::createDir($dir.'/'.$subDir);
29 29
     }
30 30
     $text = '';
31
-    if (false === file_put_contents($dir . '/' . $filename, file_get_contents("php://input"))) {
32
-      $text = 'Fail on save file: ' . $filename;
31
+    if (false === file_put_contents($dir.'/'.$filename, file_get_contents("php://input"))) {
32
+      $text = 'Fail on save file: '.$filename;
33 33
       $file->status = 'failure';
34 34
     } else {
35
-      $file->size = ceil(filesize($dir . '/' . $filename));
35
+      $file->size = ceil(filesize($dir.'/'.$filename));
36 36
       $file->name = $filename;
37 37
       $file->status = 'success';
38 38
     }
39 39
     $file->save();
40 40
     if (strpos($filename, '1cbitrix') !== false) {
41
-      $data = new \SimpleXMLElement(file_get_contents($dir . '/' . $filename));
41
+      $data = new \SimpleXMLElement(file_get_contents($dir.'/'.$filename));
42 42
       $orders = new \Exchange1c\Parser\Orders($data);
43 43
       $orders->process();
44 44
     }
Please login to merge, or discard this patch.
system/modules/Exchange1c/models/Exchange/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
   ];
31 31
 
32 32
   public function deleteFile() {
33
-    if ($this->exchange && file_exists($this->exchange->path . '/' . $this->name)) {
34
-      unlink($this->exchange->path . '/' . $this->name);
33
+    if ($this->exchange && file_exists($this->exchange->path.'/'.$this->name)) {
34
+      unlink($this->exchange->path.'/'.$this->name);
35 35
     }
36 36
     $this->deleted = 1;
37 37
     $this->save();
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Walker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
           $walker->migration = $this->migration;
33 33
           $walker->map = $this->map;
34 34
           $walker->data = &$this->data[$path->item];
35
-          $walker->curPath = $this->curPath . $path->item . '/';
35
+          $walker->curPath = $this->curPath.$path->item.'/';
36 36
           $walker->mapPath = $path;
37 37
           $walker->mapPathParent = $this->mapPath;
38 38
           $walker->migtarionLog = $this->migtarionLog;
Please login to merge, or discard this patch.
system/modules/Db/objects/Mysql/Mysql.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 class Mysql extends \Object {
15 15
 
16
-  public $config = [];       // настройки подключения выбраной базы
17
-  public $connect = FALSE;        // ярлык соединения с MySQL
18
-  public $encoding = 'utf-8';        // установленная кодировка
19
-  public $db_name = 'test';         // выбраная в данный момент база
20
-  public $table_prefix = 'inji_';   // префикс названий таблиц
16
+  public $config = []; // настройки подключения выбраной базы
17
+  public $connect = FALSE; // ярлык соединения с MySQL
18
+  public $encoding = 'utf-8'; // установленная кодировка
19
+  public $db_name = 'test'; // выбраная в данный момент база
20
+  public $table_prefix = 'inji_'; // префикс названий таблиц
21 21
   public $pdo = NULL;
22 22
   public $lastQuery = '';
23 23
   public $last_error = '';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     $this->table_prefix = '';
72 72
 
73 73
     $query->where('TABLE_SCHEMA', $old_db);
74
-    $query->where('TABLE_NAME', $old_prefix . $table_name);
74
+    $query->where('TABLE_NAME', $old_prefix.$table_name);
75 75
     $result = $query->select('COLUMNS');
76 76
     $this->db_name = $old_db;
77 77
     $this->table_prefix = $old_prefix;
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/select.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
       $showedInput = count($aditionalInputs) - 1;
24 24
       $aditionValue = !empty($options['aditionalValue']) ? $options['aditionalValue'] : '';
25 25
     }
26
-    $optionsHtml .= "<option data-aditionalInput='" . ( count($aditionalInputs) - 1) . "' value ='{$key}'{$selected}>{$value['text']}</option>";
26
+    $optionsHtml .= "<option data-aditionalInput='".(count($aditionalInputs) - 1)."' value ='{$key}'{$selected}>{$value['text']}</option>";
27 27
   } else {
28 28
     $optionsHtml .= "<option value ='{$key}'{$selected}>{$value}</option>";
29 29
   }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 <?= $label !== false ? "<label>{$label}" : ''; ?>
34 34
 <?php
35 35
 if ($label !== false && !empty($options['createBtn'])) {
36
-  echo ' (<a href="" onclick="' . $options['createBtn']['onclick'] . ';this.disabled=true;return false;">' . $options['createBtn']['text'] . '</a>)';
36
+  echo ' (<a href="" onclick="'.$options['createBtn']['onclick'].';this.disabled=true;return false;">'.$options['createBtn']['text'].'</a>)';
37 37
 }
38 38
 ?>
39 39
 <?= $label !== false ? "</label>" : ''; ?>
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
   if ($key !== $showedInput) {
48 48
     $input['options']['disabled'] = true;
49
-    $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'] . ' hidden' : 'hidden';
49
+    $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'].' hidden' : 'hidden';
50 50
   } else {
51 51
     $input['options']['value'] = empty($input['options']['value']) ? $aditionValue : $input['options']['value'];
52 52
   }
53 53
   if ($input['type'] == 'select') {
54 54
     $input['options']['values'] = \Ui\ActiveForm::getOptionsList($input);
55 55
   }
56
-  $form->input($input['type'], empty($input['name']) ? $name . '[aditional]' : $input['name'], false, $input['options']);
56
+  $form->input($input['type'], empty($input['name']) ? $name.'[aditional]' : $input['name'], false, $input['options']);
57 57
 }
58 58
 ?>
59 59
 <?= empty($options['noContainer']) ? '</div>' : ''; ?>
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $this->formName = $form;
48 48
         $this->form = \App::$cur->ui->getModelForm($this->modelName, $form);
49 49
         if (empty($this->form)) {
50
-          throw new \Exception('empty form ' . $form);
50
+          throw new \Exception('empty form '.$form);
51 51
         }
52 52
         $this->inputs = $this->getInputs();
53 53
       }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
               $this->model->_params[$modelName::index()] = 0;
83 83
             }
84 84
             $relOptions['model']::fixPrefix($relOptions['col']);
85
-            $inputs[$col] = new ActiveForm(new $relOptions['model']([ $relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]);
85
+            $inputs[$col] = new ActiveForm(new $relOptions['model']([$relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]);
86 86
           }
87 87
           $inputs[$col]->parent = $this;
88 88
         } elseif (!empty($modelName::$cols[$col])) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
   public function checkRequest($params = [], $ajax = false) {
97 97
     if (!$this->checkAccess()) {
98
-      $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->formName . '"');
98
+      $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->formName.'"');
99 99
       return [];
100 100
     }
101 101
     $successId = 0;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             if (!empty($this->form['userGroupReadonly'][\Users\User::$cur->group_id]) && in_array($col, $this->form['userGroupReadonly'][\Users\User::$cur->group_id])) {
127 127
               continue;
128 128
             }
129
-            $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($param['type']);
129
+            $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($param['type']);
130 130
             $input = new $inputClassName();
131 131
             $input->activeForm = $this;
132 132
             $input->activeFormParams = $params;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             if ($ajax) {
172 172
               \Msg::show();
173 173
             } elseif (!empty($_GET['redirectUrl'])) {
174
-              \Tools::redirect($_GET['redirectUrl'] . (!empty($_GET['dataManagerHash']) ? '#' . $_GET['dataManagerHash'] : ''));
174
+              \Tools::redirect($_GET['redirectUrl'].(!empty($_GET['dataManagerHash']) ? '#'.$_GET['dataManagerHash'] : ''));
175 175
             }
176 176
             $successId = $this->model->pk();
177 177
           }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
   public function draw($params = [], $ajax = false) {
188 188
     if (!$this->checkAccess()) {
189
-      $this->drawError('you not have access to "' . $this->modelName . '" form with name: "' . $this->formName . '"');
189
+      $this->drawError('you not have access to "'.$this->modelName.'" form with name: "'.$this->formName.'"');
190 190
       return [];
191 191
     }
192 192
     $form = new Form(!empty($this->form['formOptions']) ? $this->form['formOptions'] : []);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     if (is_object($options)) {
198 198
       $options->draw();
199 199
     } else {
200
-      $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($options['type']);
200
+      $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($options['type']);
201 201
       $input = new $inputClassName();
202 202
       $input->form = $form;
203 203
       $input->activeForm = $this;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     }
274 274
     foreach ($values as $key => $value) {
275 275
       if (is_array($value) && !empty($value['input']) && empty($value['input']['noprefix'])) {
276
-        $values[$key]['input']['name'] = $aditionalInputNamePrefix . "[{$value['input']['name']}]";
276
+        $values[$key]['input']['name'] = $aditionalInputNamePrefix."[{$value['input']['name']}]";
277 277
       }
278 278
     }
279 279
     return $values;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
    */
296 296
   public function checkAccess() {
297 297
     if (empty($this->form)) {
298
-      $this->drawError('"' . $this->modelName . '" form with name: "' . $this->formName . '" not found');
298
+      $this->drawError('"'.$this->modelName.'" form with name: "'.$this->formName.'" not found');
299 299
       return false;
300 300
     }
301 301
     if (\App::$cur->Access && !\App::$cur->Access->checkAccess($this)) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/appAdminControllers/EcommerceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@
 block discarded – undo
75 75
         unset($items[$key]);
76 76
         unset($item);
77 77
       }
78
-      echo 'Происходит процесс индексации: проиндексировано ' . $i * $count;
79
-      Tools::redirect('/admin/ecommerce/reSearchIndex/' . $i);
78
+      echo 'Происходит процесс индексации: проиндексировано '.$i * $count;
79
+      Tools::redirect('/admin/ecommerce/reSearchIndex/'.$i);
80 80
     }
81 81
   }
82 82
 
Please login to merge, or discard this patch.