@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | foreach ($fields as $field) { |
44 | 44 | if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) { |
45 | 45 | $error = 1; |
46 | - Msg::add('Вы не указали: ' . $field->name); |
|
46 | + Msg::add('Вы не указали: '.$field->name); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | if (!$error) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $extra->price = $card->price; |
72 | 72 | $extra->count = 1; |
73 | 73 | $extra->cart_id = $cart->id; |
74 | - $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id; |
|
74 | + $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id; |
|
75 | 75 | $extra->save(); |
76 | 76 | Tools::redirect('/ecommerce/cart/success'); |
77 | 77 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $items = $this->ecommerce->getItems(); |
87 | 87 | $return = []; |
88 | 88 | foreach ($items as $item) { |
89 | - $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name]; |
|
89 | + $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name]; |
|
90 | 90 | } |
91 | 91 | $return = json_encode($return); |
92 | 92 | Cache::set('itemsAutocomplete', [], $return); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $categoryIds = array_values(array_filter(explode('/', $category->tree_path))); |
163 | 163 | foreach ($categoryIds as $id) { |
164 | 164 | $cat = Ecommerce\Category::get($id); |
165 | - $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id); |
|
165 | + $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id); |
|
166 | 166 | } |
167 | 167 | $this->view->setTitle($category->name); |
168 | 168 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | foreach ($catalogIds as $id) { |
227 | 227 | $cat = Ecommerce\Category::get($id); |
228 | 228 | if ($cat) { |
229 | - $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id]; |
|
229 | + $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id]; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | $bread[] = ['text' => $item->name()]; |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | $this->view->addMetaTag(['property' => 'og:title', 'content' => $item->name]); |
242 | 242 | $this->view->addMetaTag(['property' => 'og:description', 'content' => $item->description]); |
243 | 243 | if ($item->image) { |
244 | - $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . INJI_DOMAIN_NAME . $item->image->path]); |
|
244 | + $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.INJI_DOMAIN_NAME.$item->image->path]); |
|
245 | 245 | } |
246 | - $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . INJI_DOMAIN_NAME . '/view/' . $item->id]); |
|
246 | + $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.INJI_DOMAIN_NAME.'/view/'.$item->id]); |
|
247 | 247 | |
248 | 248 | $options['content'] = $item->view ? $item->view : 'view'; |
249 | 249 | $this->view->page($options); |
@@ -23,11 +23,11 @@ discard block |
||
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 = ''; |
@@ -45,7 +45,7 @@ discard block |
||
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 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $model->save(); |
30 | 30 | } |
31 | 31 | } |
32 | - return 'Измненено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['запись', 'записи', 'записей']); |
|
32 | + return 'Измненено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['запись', 'записи', 'записей']); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ob_end_clean(); |
97 | 97 | header('Content-Encoding: UTF-8'); |
98 | 98 | header("Content-Type: text/csv"); |
99 | - header("Content-Disposition: attachment; filename=" . $request['modelName']::$objectName . '.csv'); |
|
99 | + header("Content-Disposition: attachment; filename=".$request['modelName']::$objectName.'.csv'); |
|
100 | 100 | echo "\xEF\xBB\xBF"; // UTF-8 BOM |
101 | 101 | |
102 | 102 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | echo ";"; |
109 | 109 | } |
110 | 110 | $endRow = false; |
111 | - echo '"' . $options['label'] . '"'; |
|
111 | + echo '"'.$options['label'].'"'; |
|
112 | 112 | } |
113 | 113 | echo "\n"; |
114 | 114 | $endRow = true; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | echo ";"; |
123 | 123 | } |
124 | 124 | $endRow = false; |
125 | - echo '"' . str_replace(["\n", '"'], ['“'], $col) . '"'; |
|
125 | + echo '"'.str_replace(["\n", '"'], ['“'], $col).'"'; |
|
126 | 126 | } |
127 | 127 | echo "\n"; |
128 | 128 | $endRow = true; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $pages = $dataManager->getPages($request['params'], $request['model']); |
144 | 144 | if ($pages) { |
145 | 145 | $pages->draw(); |
146 | - echo '<div style="background:#fff;">записей: <b>' . $pages->options['count'] . '</b>. страница <b>' . $pages->params['page'] . '</b> из <b>' . $pages->params['pages'] . '</b></div>'; |
|
146 | + echo '<div style="background:#fff;">записей: <b>'.$pages->options['count'].'</b>. страница <b>'.$pages->params['page'].'</b> из <b>'.$pages->params['pages'].'</b></div>'; |
|
147 | 147 | } |
148 | 148 | $result->content['pages'] = ob_get_contents(); |
149 | 149 | ob_end_clean(); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | if (!empty($actions[$request['action']])) { |
220 | 220 | $actionParams = $actions[$request['action']]; |
221 | 221 | if (!empty($actionParams['access']['groups']) && !in_array(\Users\User::$cur->group_id, $actionParams['access']['groups'])) { |
222 | - $result->content = 'У вас нет прав доступа к операции ' . (!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']); |
|
222 | + $result->content = 'У вас нет прав доступа к операции '.(!isset($actionParams['name']) ? $actionParams['className']::$name : $actionParams['name']); |
|
223 | 223 | } else { |
224 | 224 | try { |
225 | 225 | $result->successMsg = $actionParams['className']::groupAction($dataManager, $ids, $actionParams, !empty($_GET['adInfo']) ? $_GET['adInfo'] : []); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | } |
233 | 233 | } else { |
234 | - $result->content = 'У вас нет прав доступа к менеджеру ' . $request['managerName'] . ' модели ' . $request['modelName']; |
|
234 | + $result->content = 'У вас нет прав доступа к менеджеру '.$request['managerName'].' модели '.$request['modelName']; |
|
235 | 235 | } |
236 | 236 | $result->send(); |
237 | 237 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | } |
9 | 9 | ?>> |
10 | 10 | <?php |
11 | - } |
|
12 | - ?> |
|
11 | + } |
|
12 | + ?> |
|
13 | 13 | <?= !empty($header) ? "<h1>{$header}</h1>" : ''; ?> |
14 | 14 | |
15 | 15 | \ No newline at end of file |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | if (empty($params['activeForm']) || $params['activeForm']->parent === null) { |
3 | 3 | ?> |
4 | - <form <?= $form->id ? 'id="' . $form->id . '"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>" enctype="multipart/form-data" |
|
4 | + <form <?= $form->id ? 'id="'.$form->id.'"' : ''; ?> action ="<?= $form->action; ?>" method ="<?= $form->method; ?>" enctype="multipart/form-data" |
|
5 | 5 | <?php |
6 | 6 | foreach ($options as $attribute => $value) { |
7 | 7 | echo " {$attribute} = '{$value}' "; |
@@ -5,10 +5,10 @@ |
||
5 | 5 | <div class="form-group"> |
6 | 6 | <button class ='btn btn-primary' |
7 | 7 | <?php |
8 | - foreach ($attributs as $attribute => $value) { |
|
9 | - echo " {$attribute} = '{$value}' "; |
|
10 | - } |
|
11 | - ?> |
|
8 | + foreach ($attributs as $attribute => $value) { |
|
9 | + echo " {$attribute} = '{$value}' "; |
|
10 | + } |
|
11 | + ?> |
|
12 | 12 | ><?= $btnText; ?></button> |
13 | 13 | </div> |
14 | 14 | <?php |
@@ -216,7 +216,7 @@ |
||
216 | 216 | |
217 | 217 | public static function itemName($item) |
218 | 218 | { |
219 | - return $item->pk() . '. ' . $item->name(); |
|
219 | + return $item->pk().'. '.$item->name(); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | public static $forms = [ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME); |
73 | 73 | if ($this->model->{$this->param->value}) { |
74 | 74 | $file = \Files\File::get($this->model->{$this->param->value}); |
75 | - if ($file && $value && file_exists($dir . '/' . $value) && file_exists(\App::$primary->path . $file->path) && md5_file($dir . '/' . $value) == md5_file(\App::$primary->path . $file->path)) { |
|
75 | + if ($file && $value && file_exists($dir.'/'.$value) && file_exists(\App::$primary->path.$file->path) && md5_file($dir.'/'.$value) == md5_file(\App::$primary->path.$file->path)) { |
|
76 | 76 | $notEq = false; |
77 | 77 | } |
78 | 78 | if ($file && $notEq) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | } |
83 | 83 | if ($notEq) { |
84 | - $this->model->{$this->param->value} = \App::$primary->files->uploadFromUrl($dir . '/' . $value, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']); |
|
84 | + $this->model->{$this->param->value} = \App::$primary->files->uploadFromUrl($dir.'/'.$value, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']); |
|
85 | 85 | } |
86 | 86 | break; |
87 | 87 | default: |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if ($param->type == 'custom') { |
63 | 63 | $parserName = $param->value; |
64 | 64 | } else { |
65 | - $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type); |
|
65 | + $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type); |
|
66 | 66 | } |
67 | 67 | $parser = new $parserName; |
68 | 68 | $parser->data = &$data[$param->code]; |