Completed
Push — master ( 18aa30...8e3681 )
by Alexey
04:31
created
system/modules/Ecommerce/Ecommerce.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     $name = '';
49 49
     foreach ($fields as $field) {
50 50
       if ($field->save && !empty($data[$field->id])) {
51
-        $name .= htmlspecialchars($data[$field->id]) . ' ';
51
+        $name .= htmlspecialchars($data[$field->id]).' ';
52 52
       }
53 53
     }
54 54
     $name = trim($name);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     $name = '';
105 105
     foreach ($fields as $field) {
106 106
       if ($field->save && !empty($data[$field->id])) {
107
-        $name .= htmlspecialchars($data[$field->id]) . ' ';
107
+        $name .= htmlspecialchars($data[$field->id]).' ';
108 108
       }
109 109
     }
110 110
     $name = trim($name);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
       foreach ($options['sort'] as $col => $direction) {
190 190
         switch ($col) {
191 191
           case 'price':
192
-            $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
192
+            $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
193 193
             break;
194 194
           case 'name':
195 195
             $selectOptions['order'][] = ['name', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
@@ -208,22 +208,22 @@  discard block
 block discarded – undo
208 208
       $selectOptions['where'][] = ['image_file_id', 0, '!='];
209 209
     }
210 210
 
211
-    $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index() . ' = ' . Ecommerce\Item\Offer::colPrefix() . Ecommerce\Item::index(), 'inner'];
211
+    $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index().' = '.Ecommerce\Item\Offer::colPrefix().Ecommerce\Item::index(), 'inner'];
212 212
 
213 213
     $selectOptions['join'][] = [Ecommerce\Item\Offer\Price::table(),
214
-        Ecommerce\Item\Offer::index() . ' = ' . Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer::index() .
215
-        (empty($this->config['show_zero_price']) ? ' and ' . Ecommerce\Item\Offer\Price::colPrefix() . 'price>0' : ''),
214
+        Ecommerce\Item\Offer::index().' = '.Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer::index().
215
+        (empty($this->config['show_zero_price']) ? ' and '.Ecommerce\Item\Offer\Price::colPrefix().'price>0' : ''),
216 216
         empty($this->config['show_without_price']) ? 'inner' : 'left'];
217 217
 
218 218
     $selectOptions['join'][] = [
219
-        Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer\Price\Type::index() . ' = ' . Ecommerce\Item\Offer\Price\Type::index()
219
+        Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer\Price\Type::index().' = '.Ecommerce\Item\Offer\Price\Type::index()
220 220
     ];
221 221
 
222 222
     $selectOptions['where'][] = [
223 223
         [Ecommerce\Item\Offer\Price\Type::index(), NULL, 'is'],
224 224
         [
225
-            [Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles', '', '=', 'OR'],
226
-            [Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles', '%|' . \Users\User::$cur->role_id . '|%', 'LIKE', 'OR'],
225
+            [Ecommerce\Item\Offer\Price\Type::colPrefix().'roles', '', '=', 'OR'],
226
+            [Ecommerce\Item\Offer\Price\Type::colPrefix().'roles', '%|'.\Users\User::$cur->role_id.'|%', 'LIKE', 'OR'],
227 227
         ],
228 228
     ];
229 229
 
@@ -231,10 +231,10 @@  discard block
 block discarded – undo
231 231
     if (!empty($this->config['view_filter'])) {
232 232
       if (!empty($this->config['view_filter']['options'])) {
233 233
         foreach ($this->config['view_filter']['options'] as $optionId => $optionValue) {
234
-          $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
235
-              'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
236
-              'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value = "' . (int) $optionValue . '"',
237
-              'inner', 'option' . $optionId];
234
+          $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
235
+              'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
236
+              'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value = "'.(int) $optionValue.'"',
237
+              'inner', 'option'.$optionId];
238 238
         }
239 239
       }
240 240
     }
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
         switch ($col) {
245 245
           case 'price':
246 246
             if (!empty($filter['min'])) {
247
-              $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['min'], '>='];
247
+              $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['min'], '>='];
248 248
             }
249 249
             if (!empty($filter['max'])) {
250
-              $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['max'], '<='];
250
+              $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['max'], '<='];
251 251
             }
252 252
             break;
253 253
           case 'options':
@@ -258,14 +258,14 @@  discard block
 block discarded – undo
258 258
                 foreach ($optionValue as $val) {
259 259
                   $optionValueArr[] = \App::$cur->db->connection->pdo->quote($val);
260 260
                 }
261
-                $qstr = 'IN (' . implode(',', $optionValueArr) . ')';
261
+                $qstr = 'IN ('.implode(',', $optionValueArr).')';
262 262
               } else {
263
-                $qstr = '= ' . \App::$cur->db->connection->pdo->quote($optionValue);
263
+                $qstr = '= '.\App::$cur->db->connection->pdo->quote($optionValue);
264 264
               }
265
-              $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
266
-                  'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
267
-                  'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value ' . $qstr . '',
268
-                  'inner', 'option' . $optionId];
265
+              $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
266
+                  'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
267
+                  'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value '.$qstr.'',
268
+                  'inner', 'option'.$optionId];
269 269
             }
270 270
             break;
271 271
           case 'offerOptions':
@@ -277,14 +277,14 @@  discard block
 block discarded – undo
277 277
                 foreach ($optionValue as $val) {
278 278
                   $optionValueArr[] = \App::$cur->db->connection->pdo->quote($val);
279 279
                 }
280
-                $qstr = 'IN (' . implode(',', $optionValueArr) . ')';
280
+                $qstr = 'IN ('.implode(',', $optionValueArr).')';
281 281
               } else {
282
-                $qstr = '= ' . \App::$cur->db->connection->pdo->quote($optionValue);
282
+                $qstr = '= '.\App::$cur->db->connection->pdo->quote($optionValue);
283 283
               }
284
-              $selectOptions['join'][] = [Ecommerce\Item\Offer\Param::table(), Ecommerce\Item\Offer::index() . ' = ' . 'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . Ecommerce\Item\Offer::index() . ' AND ' .
285
-                  'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . Ecommerce\Item\Offer\Option::index() . ' = "' . (int) $optionId . '" AND ' .
286
-                  'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . 'value ' . $qstr,
287
-                  'inner', 'offerOption' . $optionId];
284
+              $selectOptions['join'][] = [Ecommerce\Item\Offer\Param::table(), Ecommerce\Item\Offer::index().' = '.'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().Ecommerce\Item\Offer::index().' AND '.
285
+                  'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().Ecommerce\Item\Offer\Option::index().' = "'.(int) $optionId.'" AND '.
286
+                  'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().'value '.$qstr,
287
+                  'inner', 'offerOption'.$optionId];
288 288
             }
289 289
             break;
290 290
         }
@@ -299,13 +299,13 @@  discard block
 block discarded – undo
299 299
           continue;
300 300
         }
301 301
         $category = \Ecommerce\Category::get($categoryId);
302
-        $where[] = ['tree_path', $category->tree_path . (int) $categoryId . '/%', 'LIKE', $first ? 'AND' : 'OR'];
302
+        $where[] = ['tree_path', $category->tree_path.(int) $categoryId.'/%', 'LIKE', $first ? 'AND' : 'OR'];
303 303
         $first = false;
304 304
       }
305 305
       $selectOptions['where'][] = $where;
306 306
     } elseif (!empty($options['parent'])) {
307 307
       $category = \Ecommerce\Category::get($options['parent']);
308
-      $selectOptions['where'][] = ['tree_path', $category->tree_path . (int) $options['parent'] . '/%', 'LIKE'];
308
+      $selectOptions['where'][] = ['tree_path', $category->tree_path.(int) $options['parent'].'/%', 'LIKE'];
309 309
     }
310 310
 
311 311
     //search
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
       foreach (explode(' ', $searchStr) as $part) {
316 316
         $part = trim($part);
317 317
         if ($part && strlen($part) > 2) {
318
-          $searchArr[] = ['search_index', '%' . $part . '%', 'LIKE'];
318
+          $searchArr[] = ['search_index', '%'.$part.'%', 'LIKE'];
319 319
         }
320 320
       }
321 321
       if (!empty($searchArr)) {
@@ -334,19 +334,19 @@  discard block
 block discarded – undo
334 334
       }
335 335
       $selectOptions['where'][] = [
336 336
           '(
337
-          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . 'count`),0) 
338
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Item\Offer\Warehouse::table() . ' iciw 
339
-            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . '
340
-                ' . ($warehouseIds ? ' AND iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Warehouse::index() . ' IN(' . implode(',', $warehouseIds) . ')' : '') . '
337
+          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix().'count`),0) 
338
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Item\Offer\Warehouse::table().' iciw 
339
+            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().'
340
+                ' . ($warehouseIds ? ' AND iciw.'.\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Warehouse::index().' IN('.implode(',', $warehouseIds).')' : '').'
341 341
             )
342 342
           -
343
-          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0)
344
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Warehouse\Block::table() . ' iewb
345
-            inner JOIN ' . \App::$cur->db->table_prefix . \Ecommerce\Cart::table() . ' icc ON icc.' . \Ecommerce\Cart::index() . ' = iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
346
-                (`' . \Ecommerce\Cart::colPrefix() . 'warehouse_block` = 1 and `' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(2,3,6)) ||
347
-                (`' . \Ecommerce\Cart::colPrefix() . \Ecommerce\Cart\Status::index() . '` in(0,1) and `' . \Ecommerce\Cart::colPrefix() . 'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
343
+          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix().'count) ,0)
344
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Warehouse\Block::table().' iewb
345
+            inner JOIN ' . \App::$cur->db->table_prefix.\Ecommerce\Cart::table().' icc ON icc.'.\Ecommerce\Cart::index().' = iewb.'.\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index().' AND (
346
+                (`' . \Ecommerce\Cart::colPrefix().'warehouse_block` = 1 and `'.\Ecommerce\Cart::colPrefix().'cart_status_id` in(2,3,6)) ||
347
+                (`' . \Ecommerce\Cart::colPrefix().\Ecommerce\Cart\Status::index().'` in(0,1) and `'.\Ecommerce\Cart::colPrefix().'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
348 348
             )
349
-            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . ')
349
+            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().')
350 350
           )',
351 351
           0,
352 352
           '>'
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     $items = Ecommerce\Item::getList($selectOptions);
375 375
     $items = Ecommerce\Item\Param::getList([
376 376
                 'where' => ['item_id', array_keys($items), 'IN'],
377
-                'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index() . ' = ' . \Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' and ' . \Ecommerce\Item\Option::colPrefix() . 'searchable = 1', 'inner']],
377
+                'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index().' = '.\Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' and '.\Ecommerce\Item\Option::colPrefix().'searchable = 1', 'inner']],
378 378
                 'distinct' => \Ecommerce\Item\Option::index()
379 379
     ]);
380 380
     return $items;
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     if (is_array($counts)) {
406 406
       $sum = 0;
407 407
       foreach ($counts as $count) {
408
-        $sum +=$count['count'];
408
+        $sum += $count['count'];
409 409
       }
410 410
       return $sum;
411 411
     }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 
440 440
     if (!empty($conf['files']['aditionTemplateFiels'])) {
441 441
       foreach ($conf['files']['aditionTemplateFiels'] as $file) {
442
-        $return[$file['file']] = '- ' . $file['name'];
442
+        $return[$file['file']] = '- '.$file['name'];
443 443
       }
444 444
     }
445 445
     return $return;
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
       $map[] = [
514 514
           'name' => $item->name,
515 515
           'url' => [
516
-              'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($item->getHref())
516
+              'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($item->getHref())
517 517
           ],
518 518
       ];
519 519
     }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         $map[] = [
527 527
             'name' => $item->name,
528 528
             'url' => [
529
-                'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($item->getHref())
529
+                'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($item->getHref())
530 530
             ],
531 531
         ];
532 532
       }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/DataManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     'id' => $dataManager->managerId,
4 4
     'class' => 'dataManager',
5 5
     'data-params' => $params,
6
-    'data-modelname' => ($model ? get_class($model) : $dataManager->modelName) . ($model && $model->pk() ? ':' . $model->pk() : ''),
6
+    'data-modelname' => ($model ? get_class($model) : $dataManager->modelName).($model && $model->pk() ? ':'.$model->pk() : ''),
7 7
     'data-managername' => $dataManager->managerName,
8 8
     'data-cols' => $dataManager->cols,
9 9
     'data-options' => array_merge($dataManager->managerOptions, ['actions'=>$dataManager->getActions()])
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     'style' => ''
23 23
 ];
24 24
 if (!empty($dataManager->managerOptions['categorys'])) {
25
-  $mainCol['style'].='margin-left:260px;';
25
+  $mainCol['style'] .= 'margin-left:260px;';
26 26
   echo '<div class ="pull-left dataManager-categorys" style = "width:250px;">';
27 27
   $this->widget('Ui\DataManager/categorys', compact('dataManager'));
28 28
   echo '</div>';
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/select.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $aditionalInputs = [];
3 3
 $showedInput = false;
4
-if(!empty($options['createBtn'])){
4
+if (!empty($options['createBtn'])) {
5 5
   $optionsHtml = '<option disabled onclick="'.$options['createBtn']['onclick'].'">'.$options['createBtn']['text'].'</option>';
6
-}else {
6
+} else {
7 7
   $optionsHtml = '';
8 8
 }
9 9
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     }
18 18
     if (
19 19
             (!is_array($primaryValue) && ($key === $primaryValue || (isset($form->userDataTree[$name]) && $form->userDataTree[$name] === $key))) ||
20
-            (is_array($primaryValue) && (in_array($key,$primaryValue) || (isset($form->userDataTree[$name]) && in_array($key,$form->userDataTree[$name]))))
20
+            (is_array($primaryValue) && (in_array($key, $primaryValue) || (isset($form->userDataTree[$name]) && in_array($key, $form->userDataTree[$name]))))
21 21
             ) {
22 22
         $selected = ' selected="selected"';
23 23
     }
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             $showedInput = count($aditionalInputs) - 1;
28 28
             $aditionValue = !empty($options['aditionalValue']) ? $options['aditionalValue'] : '';
29 29
         }
30
-        $optionsHtml .= "<option data-aditionalInput='" . ( count($aditionalInputs) - 1) . "' value ='{$key}'{$selected}>{$value['text']}</option>";
30
+        $optionsHtml .= "<option data-aditionalInput='".(count($aditionalInputs) - 1)."' value ='{$key}'{$selected}>{$value['text']}</option>";
31 31
     } else {
32 32
         $optionsHtml .= "<option value ='{$key}'{$selected}>{$value}</option>";
33 33
     }
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 
45 45
     if ($key !== $showedInput) {
46 46
         $input['options']['disabled'] = true;
47
-        $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'] . ' hidden' : 'hidden';
47
+        $input['options']['class'] = !empty($input['options']['class']) ? $input['options']['class'].' hidden' : 'hidden';
48 48
     } else {
49 49
         $input['options']['value'] = empty($input['options']['value']) ? $aditionValue : $input['options']['value'];
50 50
     }
51 51
     if ($input['type'] == 'select') {
52 52
         $input['options']['values'] = \Ui\ActiveForm::getOptionsList($input);
53 53
     }
54
-    $form->input($input['type'], empty($input['name']) ? $name . '[aditional]' : $input['name'], false, $input['options']);
54
+    $form->input($input['type'], empty($input['name']) ? $name.'[aditional]' : $input['name'], false, $input['options']);
55 55
 }
56 56
 ?>
57 57
 <?= empty($options['noContainer']) ? '</div>' : ''; ?>
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm/Input/Select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     if (!empty($modelName)) {
41 41
       $inputOptions['createBtn'] = [
42 42
           'text' => 'Создать элемент',
43
-          'onclick' => 'inji.Ui.forms.popUp(\'' . addslashes($modelName) . '\',{},function(elem){'
43
+          'onclick' => 'inji.Ui.forms.popUp(\''.addslashes($modelName).'\',{},function(elem){'
44 44
           . 'return function(data,modal){inji.Ui.forms.submitAjax($(elem).closest(\'form\')[0], {notSave: true});}}(this))'
45 45
       ];
46 46
     }
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $this->name = $this->managerOptions['name'];
59 59
         }
60 60
 
61
-        $this->managerId = str_replace('\\', '_', 'dataManager_' . $this->modelName . '_' . $this->managerName . '_' . \Tools::randomString());
61
+        $this->managerId = str_replace('\\', '_', 'dataManager_'.$this->modelName.'_'.$this->managerName.'_'.\Tools::randomString());
62 62
     }
63 63
 
64 64
     /**
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
         if (!empty($this->managerOptions['filters'])) {
103 103
             $buttons[] = [
104 104
                 'text' => 'Фильтры',
105
-                'onclick' => '  var modal = $("#' . $this->managerId . '_filters");
105
+                'onclick' => '  var modal = $("#'.$this->managerId.'_filters");
106 106
                 modal.modal("show");',
107 107
             ];
108 108
         }
109 109
         $buttons[] = [
110 110
             'text' => 'Добавить элемент',
111
-            'onclick' => 'inji.Ui.dataManagers.get(this).newItem("' . str_replace('\\', '\\\\', $modelName) . '",' . json_encode($formParams) . ');',
111
+            'onclick' => 'inji.Ui.dataManagers.get(this).newItem("'.str_replace('\\', '\\\\', $modelName).'",'.json_encode($formParams).');',
112 112
         ];
113 113
 
114 114
         return $buttons;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                     'className' => $action
139 139
                 ];
140 140
             }
141
-            $return[$key]['className'] = strpos($return[$key]['className'], '\\') === false && class_exists('Ui\DataManager\Action\\' . $return[$key]['className']) ? 'Ui\DataManager\Action\\' . $return[$key]['className'] : $return[$key]['className'];
141
+            $return[$key]['className'] = strpos($return[$key]['className'], '\\') === false && class_exists('Ui\DataManager\Action\\'.$return[$key]['className']) ? 'Ui\DataManager\Action\\'.$return[$key]['className'] : $return[$key]['className'];
142 142
             if (!class_exists($return[$key]['className']) || ($onlyGroupActions && !$return[$key]['className']::$groupAction)) {
143 143
                 unset($return[$key]);
144 144
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
               <?php
171 171
               foreach ($actions as $action => $actionParams) {
172 172
                   if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) {
173
-                      echo "<li><a role='button' href ='#' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>";
173
+                      echo "<li><a role='button' href ='#' onclick='inji.Ui.dataManagers.get(this).groupAction(\"".str_replace('\\', '\\\\', $action)."\");return false;'>{$actionParams['className']::$name}</a></li>";
174 174
                   }
175 175
               }
176 176
               ?>
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             return [];
222 222
         }
223 223
         if (!$this->checkAccess()) {
224
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
224
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
225 225
             return [];
226 226
         }
227 227
         $modelName = $this->modelName;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             $queryParams['start'] = $this->page * $this->limit - $this->limit;
238 238
         }
239 239
         if (!empty($params['categoryPath']) && $modelName::$categoryModel) {
240
-            $queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE'];
240
+            $queryParams['where'][] = ['tree_path', $params['categoryPath'].'%', 'LIKE'];
241 241
         }
242 242
         if (!empty($params['appType'])) {
243 243
             $queryParams['appType'] = $params['appType'];
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                         if (!empty($params['filters'][$col]['max'])) {
297 297
                             if ($colInfo['colParams']['type'] == 'dateTime' && !strpos($params['filters'][$col]['max'], ' ')) {
298 298
 
299
-                                $date = $params['filters'][$col]['max'] . ' 23:59:59';
299
+                                $date = $params['filters'][$col]['max'].' 23:59:59';
300 300
                             } else {
301 301
                                 $date = $params['filters'][$col]['max'];
302 302
                             }
@@ -323,16 +323,16 @@  discard block
 block discarded – undo
323 323
                         }
324 324
                         switch ($params['filters'][$col]['compareType']) {
325 325
                             case 'contains':
326
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'] . '%', 'LIKE'];
326
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'].'%', 'LIKE'];
327 327
                                 break;
328 328
                             case 'equals':
329 329
                                 $queryParams['where'][] = [$col, $params['filters'][$col]['value']];
330 330
                                 break;
331 331
                             case 'starts_with':
332
-                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'] . '%', 'LIKE'];
332
+                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'].'%', 'LIKE'];
333 333
                                 break;
334 334
                             case 'ends_with':
335
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'], 'LIKE'];
335
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'], 'LIKE'];
336 336
                                 break;
337 337
                         }
338 338
                         break;
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                 $item = $relation['relModel']::get([[$item->index(), $item->id], [$model->index(), $model->id]]);
372 372
             }
373 373
             $row = [];
374
-            $row[] = '<input type ="checkbox" name = "pk[]" value =' . $item->pk() . '>';
374
+            $row[] = '<input type ="checkbox" name = "pk[]" value ='.$item->pk().'>';
375 375
             $row[] = $item->pk();
376 376
             foreach ($this->managerOptions['cols'] as $key => $colName) {
377 377
                 if (!empty($params['download'])) {
@@ -417,16 +417,16 @@  discard block
 block discarded – undo
417 417
                     $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
418 418
                     $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
419 419
                     $count = $count ? $count : 'Нет';
420
-                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count}</a>";
420
+                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count}</a>";
421 421
                 case 'many':
422 422
                     $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
423 423
                     $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
424 424
                     $count = $count ? $count : 'Нет';
425
-                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count}</a>";
425
+                    return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count}</a>";
426 426
                 default :
427 427
                     if ($item->{$modelName::$cols[$colName]['relation']}) {
428 428
                         if (\App::$cur->name == 'admin') {
429
-                            $href = "<a href ='/admin/" . str_replace('\\', '/view/', $relations[$modelName::$cols[$colName]['relation']]['model']) . "/" . $item->{$modelName::$cols[$colName]['relation']}->pk() . "'>";
429
+                            $href = "<a href ='/admin/".str_replace('\\', '/view/', $relations[$modelName::$cols[$colName]['relation']]['model'])."/".$item->{$modelName::$cols[$colName]['relation']}->pk()."'>";
430 430
                             if (!empty($modelName::$cols[$colName]['showCol'])) {
431 431
                                 $href .= $item->{$modelName::$cols[$colName]['relation']}->{$modelName::$cols[$colName]['showCol']};
432 432
                             } else {
@@ -456,18 +456,18 @@  discard block
 block discarded – undo
456 456
                     case 'many':
457 457
                         $managerParams = ['relation' => $modelName::$cols[$colName]['relation']];
458 458
                         $count = $item->{$modelName::$cols[$colName]['relation']}(array_merge($params, ['count' => 1]));
459
-                        return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"" . str_replace('\\', '\\\\', $modelName) . ":" . $item->pk() . "\"," . json_encode(array_merge($params, $managerParams)) . ")'>{$count} " . \Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов']) . "</a>";
459
+                        return "<a class = 'btn btn-xs btn-primary' onclick = 'inji.Ui.dataManagers.popUp(\"".str_replace('\\', '\\\\', $modelName).":".$item->pk()."\",".json_encode(array_merge($params, $managerParams)).")'>{$count} ".\Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов'])."</a>";
460 460
                     default:
461 461
                         return $item->$colName;
462 462
                 }
463 463
             } elseif (!empty($modelName::$cols[$colName]['type'])) {
464
-                if (\App::$cur->name == 'admin' && $originalCol == 'name' || ( $dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) {
464
+                if (\App::$cur->name == 'admin' && $originalCol == 'name' || ($dataManager && !empty($dataManager->managerOptions['colToView']) && $dataManager->managerOptions['colToView'] == $originalCol)) {
465 465
                     $formName = $dataManager && !empty($dataManager->managerOptions['editForm']) ? $dataManager->managerOptions['editForm'] : 'manager';
466
-                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem));
467
-                    return "<a href ='/admin/" . str_replace('\\', '/view/', get_class($originalItem)) . "/{$originalItem->id}?formName={$formName}&redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
466
+                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/'.str_replace('\\', '/', get_class($originalItem));
467
+                    return "<a href ='/admin/".str_replace('\\', '/view/', get_class($originalItem))."/{$originalItem->id}?formName={$formName}&redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
468 468
                 } elseif (\App::$cur->name == 'admin' && $colName == 'name') {
469
-                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/' . str_replace('\\', '/', get_class($originalItem));
470
-                    return "<a href ='/admin/" . str_replace('\\', '/view/', get_class($item)) . "/{$item->id}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
469
+                    $redirectUrl = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/admin/'.str_replace('\\', '/', get_class($originalItem));
470
+                    return "<a href ='/admin/".str_replace('\\', '/view/', get_class($item))."/{$item->id}?redirectUrl={$redirectUrl}'>{$item->$colName}</a>";
471 471
                 } else {
472 472
                     return \Model::resloveTypeValue($item, $colName);
473 473
                 }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             return [];
503 503
         }
504 504
         if (!$this->checkAccess()) {
505
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
505
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
506 506
             return [];
507 507
         }
508 508
         if (!empty($params['limit'])) {
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         ];
517 517
         $modelName = $this->modelName;
518 518
         if (!empty($params['categoryPath']) && $modelName::$categoryModel) {
519
-            $queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE'];
519
+            $queryParams['where'][] = ['tree_path', $params['categoryPath'].'%', 'LIKE'];
520 520
         }
521 521
         if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) {
522 522
             foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) {
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
                         if (!empty($params['filters'][$col]['max'])) {
571 571
                             if ($colInfo['colParams']['type'] == 'dateTime' && !strpos($params['filters'][$col]['max'], ' ')) {
572 572
 
573
-                                $date = $params['filters'][$col]['max'] . ' 23:59:59';
573
+                                $date = $params['filters'][$col]['max'].' 23:59:59';
574 574
                             } else {
575 575
                                 $date = $params['filters'][$col]['max'];
576 576
                             }
@@ -597,16 +597,16 @@  discard block
 block discarded – undo
597 597
                         }
598 598
                         switch ($params['filters'][$col]['compareType']) {
599 599
                             case 'contains':
600
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'] . '%', 'LIKE'];
600
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'].'%', 'LIKE'];
601 601
                                 break;
602 602
                             case 'equals':
603 603
                                 $queryParams['where'][] = [$col, $params['filters'][$col]['value']];
604 604
                                 break;
605 605
                             case 'starts_with':
606
-                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'] . '%', 'LIKE'];
606
+                                $queryParams['where'][] = [$col, $params['filters'][$col]['value'].'%', 'LIKE'];
607 607
                                 break;
608 608
                             case 'ends_with':
609
-                                $queryParams['where'][] = [$col, '%' . $params['filters'][$col]['value'], 'LIKE'];
609
+                                $queryParams['where'][] = [$col, '%'.$params['filters'][$col]['value'], 'LIKE'];
610 610
                                 break;
611 611
                         }
612 612
                         break;
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
             $tableCols[] = !empty($colOptions['label']) ? $colOptions['label'] : $colName;
641 641
         }
642 642
         $tableCols[] = '';
643
-        $this->table->class .=' datamanagertable';
643
+        $this->table->class .= ' datamanagertable';
644 644
         $this->table->setCols($tableCols);
645 645
     }
646 646
 
@@ -663,12 +663,12 @@  discard block
 block discarded – undo
663 663
             return false;
664 664
         }
665 665
         if (!$this->checkAccess()) {
666
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->managerName . '"');
666
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->managerName.'"');
667 667
             return [];
668 668
         }
669 669
         $tree = new Tree();
670 670
         $tree->ul($this->managerOptions['categorys']['model'], 0, function($category) {
671
-            $path = $category->tree_path . ($category->pk() ? $category->pk() . "/" : '');
671
+            $path = $category->tree_path.($category->pk() ? $category->pk()."/" : '');
672 672
             $cleanClassName = str_replace('\\', '\\\\', get_class($category));
673 673
             return "<a href='#' onclick='inji.Ui.dataManagers.get(this).switchCategory(this);return false;' data-index='{$category->index()}' data-path ='{$path}' data-id='{$category->pk()}' data-model='{$this->managerOptions['categorys']['model']}'> {$category->name}</a> 
674 674
                 
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/filters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
           case 'radio':
24 24
             echo "<label>{$option->name}</label>";
25 25
             foreach ($option->items as $item) {
26
-              $this->widget('Ui\Form/' . $option->type, [
26
+              $this->widget('Ui\Form/'.$option->type, [
27 27
                   'label' => $item->name,
28 28
                   'name' => "filters[options][{$option->id}]",
29 29
                   !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }
48 48
             break;
49 49
           default:
50
-            $this->widget('Ui\Form/' . ($option->type ? $option->type : 'text'), [
50
+            $this->widget('Ui\Form/'.($option->type ? $option->type : 'text'), [
51 51
                 'label' => $option->name,
52 52
                 'name' => "filters[options][{$option->id}]",
53 53
                 'options' => [
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -114,17 +114,17 @@  discard block
 block discarded – undo
114 114
   public function beforeSave() {
115 115
 
116 116
     if ($this->id) {
117
-      $this->search_index = $this->name . ' ';
117
+      $this->search_index = $this->name.' ';
118 118
       if ($this->category) {
119
-        $this->search_index .= $this->category->name . ' ';
119
+        $this->search_index .= $this->category->name.' ';
120 120
       }
121 121
       if ($this->options) {
122 122
         foreach ($this->options as $option) {
123 123
           if ($option->item_option_searchable && $option->value) {
124 124
             if ($option->item_option_type != 'select') {
125
-              $this->search_index .= $option->value . ' ';
125
+              $this->search_index .= $option->value.' ';
126 126
             } elseif (!empty($option->option->items[$option->value])) {
127
-              $option->option->items[$option->value]->value . ' ';
127
+              $option->option->items[$option->value]->value.' ';
128 128
             }
129 129
           }
130 130
         }
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
             foreach ($offer->options as $option) {
136 136
               if ($option->item_offer_option_searchable && $option->value) {
137 137
                 if ($option->item_offer_option_type != 'select') {
138
-                  $this->search_index .= $option->value . ' ';
138
+                  $this->search_index .= $option->value.' ';
139 139
                 } elseif (!empty($option->option->items[$option->value])) {
140
-                  $option->option->items[$option->value]->value . ' ';
140
+                  $option->option->items[$option->value]->value.' ';
141 141
                 }
142 142
               }
143 143
             }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             'col' => 'item_id',
161 161
             //'resultKey' => 'code',
162 162
             'resultKey' => 'item_option_id',
163
-            'join' => [Item\Option::table(), Item\Option::index() . ' = ' . Item\Param::colPrefix() . Item\Option::index()]
163
+            'join' => [Item\Option::table(), Item\Option::index().' = '.Item\Param::colPrefix().Item\Option::index()]
164 164
         ],
165 165
         'offers' => [
166 166
             'type' => 'many',
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $curPrice = $price;
197 197
       } elseif (
198 198
               (!$price->type->roles && !$curPrice) ||
199
-              ($price->type->roles && !$curPrice && strpos($price->type->roles, "|" . \Users\User::$cur->role_id . "|") !== false)
199
+              ($price->type->roles && !$curPrice && strpos($price->type->roles, "|".\Users\User::$cur->role_id."|") !== false)
200 200
       ) {
201 201
         $curPrice = $price;
202 202
       }
Please login to merge, or discard this patch.
system/modules/Money/objects/Sums.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,21 +55,21 @@
 block discarded – undo
55 55
       if ($first) {
56 56
         $first = false;
57 57
       } else {
58
-        $string.= '<br />';
58
+        $string .= '<br />';
59 59
       }
60
-      $string.= '<span style="white-space:nowrap;">';
61
-      $string.= number_format($sum, 2, '.', ' ');
60
+      $string .= '<span style="white-space:nowrap;">';
61
+      $string .= number_format($sum, 2, '.', ' ');
62 62
       if (\App::$cur->money) {
63 63
         $currency = \Money\Currency::get($currency_id);
64 64
         if ($currency) {
65
-          $string.= ' ' . $currency->acronym();
65
+          $string .= ' '.$currency->acronym();
66 66
         } else {
67
-          $string.= ' руб.';
67
+          $string .= ' руб.';
68 68
         }
69 69
       } else {
70
-        $string.= ' руб.';
70
+        $string .= ' руб.';
71 71
       }
72
-      $string.= '</span>';
72
+      $string .= '</span>';
73 73
     }
74 74
     return $string;
75 75
   }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/CartController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $warecount = $cartitem->price->offer->warehouseCount($cart->id);
62 62
             if ($cartitem->count > $warecount) {
63 63
               $error = true;
64
-              Msg::add('Вы заказали <b>' . $cartitem->item->name . '</b> больше чем есть на складе. на складе: <b>' . $warecount . '</b>', 'danger');
64
+              Msg::add('Вы заказали <b>'.$cartitem->item->name.'</b> больше чем есть на складе. на складе: <b>'.$warecount.'</b>', 'danger');
65 65
             }
66 66
           }
67 67
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
           foreach ($deliverys[$cart->delivery_id]->fields as $field) {
74 74
             if (empty($_POST['deliveryFields'][$field->id]) && $field->required) {
75 75
               $error = 1;
76
-              Msg::add('Вы не указали: ' . $field->name);
76
+              Msg::add('Вы не указали: '.$field->name);
77 77
             }
78 78
           }
79 79
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         foreach (\Ecommerce\UserAdds\Field::getList() as $field) {
90 90
           if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
91 91
             $error = 1;
92
-            Msg::add('Вы не указали: ' . $field->name);
92
+            Msg::add('Вы не указали: '.$field->name);
93 93
           }
94 94
         }
95 95
         if (!empty($_POST['discounts']['card_item_id'])) {
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
           }
127 127
           $cart = \Ecommerce\Cart::get($cart->id);
128 128
           if (!empty(\App::$cur->ecommerce->config['notify_mail'])) {
129
-            $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/ecommerce/Cart">Админ панель</a>';
130
-            $title = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
131
-            \Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
129
+            $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/ecommerce/Cart">Админ панель</a>';
130
+            $title = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
131
+            \Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
132 132
           }
133 133
           if ($this->notifications) {
134 134
             $notification = new Notifications\Notification();
135
-            $notification->name = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
135
+            $notification->name = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
136 136
             $notification->text = 'Перейдите в админ панель чтобы просмотреть новый заказ';
137 137
             $notification->chanel_id = $this->notifications->getChanel('Ecommerce-orders')->id;
138 138
             $notification->save();
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
         'href' => '/ecommerce/cart'
178 178
     ];
179 179
     $bread[] = [
180
-        'text' => 'Заказ: №' . $cart->id,
181
-        'href' => '/ecommerce/cart/orderDetail/' . $cart->id
180
+        'text' => 'Заказ: №'.$cart->id,
181
+        'href' => '/ecommerce/cart/orderDetail/'.$cart->id
182 182
     ];
183
-    $this->view->setTitle('Заказ №' . $cart->id);
183
+    $this->view->setTitle('Заказ №'.$cart->id);
184 184
     $this->view->page(['data' => compact('cart', 'bread')]);
185 185
   }
186 186
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
       $result->send();
269 269
     }
270 270
 
271
-    $item->sales ++;
271
+    $item->sales++;
272 272
     $item->save();
273 273
 
274 274
     if (empty($_GET['count']))
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
     $stages = Ecommerce\Cart\Stage::getList();
281 281
     if (empty($this->module->config['sell_over_warehouse']) && $price->offer->warehouseCount() < $count) {
282 282
       $result->success = false;
283
-      $result->content = 'На складе недостаточно товара! Доступно: ' . $price->offer->warehouseCount();
283
+      $result->content = 'На складе недостаточно товара! Доступно: '.$price->offer->warehouseCount();
284 284
       $result->send();
285 285
     }
286 286
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     }
299 299
     $cart->date_last_activ = date('Y-m-d H:i:s');
300 300
     $cart->calc();
301
-    $result->successMsg = '<a href="/ecommerce/view/' . $item->id . '">' . $item->name() . ($price->offer->name() ? ' (' . $price->offer->name() . ')' : '') . '</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
301
+    $result->successMsg = '<a href="/ecommerce/view/'.$item->id.'">'.$item->name().($price->offer->name() ? ' ('.$price->offer->name().')' : '').'</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
302 302
     $result->send();
303 303
   }
304 304
 
Please login to merge, or discard this patch.