@@ -13,11 +13,11 @@ discard block |
||
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 |
||
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; |
@@ -23,7 +23,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)) { |
@@ -75,8 +75,8 @@ |
||
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 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'size' => $_FILES['ActiveForm_simpleItem']['size']['Ecommerce\Item']['image'], |
72 | 72 | 'error' => $_FILES['ActiveForm_simpleItem']['error']['Ecommerce\Item']['image'], |
73 | 73 | ], [ |
74 | - 'upload_code' => 'activeForm:' . 'Ecommerce\Item' . ':' . $item->pk(), |
|
74 | + 'upload_code' => 'activeForm:'.'Ecommerce\Item'.':'.$item->pk(), |
|
75 | 75 | 'accept_group' => 'image' |
76 | 76 | ]); |
77 | 77 | if ($file_id) { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'option' => ['type' => 'select', 'source' => 'model', 'model' => 'Ecommerce\Item\Offer\Option', 'label' => 'Свойство предложения'], |
169 | 169 | 'value' => ['type' => 'dynamicType', 'typeSource' => 'selfMethod', 'selfMethod' => 'realType', 'label' => 'Значение'], |
170 | 170 | ] |
171 | - ],'label'=>'Параметры предложения' |
|
171 | + ], 'label'=>'Параметры предложения' |
|
172 | 172 | ] |
173 | 173 | ], |
174 | 174 | 'map' => [ |
@@ -225,17 +225,17 @@ discard block |
||
225 | 225 | public function beforeSave() { |
226 | 226 | |
227 | 227 | if ($this->id) { |
228 | - $this->search_index = $this->name . ' '; |
|
228 | + $this->search_index = $this->name.' '; |
|
229 | 229 | if ($this->category) { |
230 | - $this->search_index .= $this->category->name . ' '; |
|
230 | + $this->search_index .= $this->category->name.' '; |
|
231 | 231 | } |
232 | 232 | if ($this->options) { |
233 | 233 | foreach ($this->options as $option) { |
234 | 234 | if ($option->item_option_searchable && $option->value) { |
235 | 235 | if ($option->item_option_type != 'select') { |
236 | - $this->search_index .= $option->value . ' '; |
|
236 | + $this->search_index .= $option->value.' '; |
|
237 | 237 | } elseif (!empty($option->option->items[$option->value])) { |
238 | - $option->option->items[$option->value]->value . ' '; |
|
238 | + $option->option->items[$option->value]->value.' '; |
|
239 | 239 | } |
240 | 240 | } |
241 | 241 | } |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | foreach ($offer->options as $option) { |
247 | 247 | if ($option->item_offer_option_searchable && $option->value) { |
248 | 248 | if ($option->item_offer_option_type != 'select') { |
249 | - $this->search_index .= $option->value . ' '; |
|
249 | + $this->search_index .= $option->value.' '; |
|
250 | 250 | } elseif (!empty($option->option->items[$option->value])) { |
251 | - $option->option->items[$option->value]->value . ' '; |
|
251 | + $option->option->items[$option->value]->value.' '; |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | 'col' => 'item_id', |
272 | 272 | //'resultKey' => 'code', |
273 | 273 | 'resultKey' => 'item_option_id', |
274 | - 'join' => [Item\Option::table(), Item\Option::index() . ' = ' . Item\Param::colPrefix() . Item\Option::index()] |
|
274 | + 'join' => [Item\Option::table(), Item\Option::index().' = '.Item\Param::colPrefix().Item\Option::index()] |
|
275 | 275 | ], |
276 | 276 | 'offers' => [ |
277 | 277 | 'type' => 'many', |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $curPrice = $price; |
308 | 308 | } elseif ( |
309 | 309 | (!$price->type->roles && !$curPrice) || |
310 | - ($price->type->roles && !$curPrice && strpos($price->type->roles, "|" . \Users\User::$cur->role_id . "|") !== false) |
|
310 | + ($price->type->roles && !$curPrice && strpos($price->type->roles, "|".\Users\User::$cur->role_id."|") !== false) |
|
311 | 311 | ) { |
312 | 312 | $curPrice = $price; |
313 | 313 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public static function uriParse($uri) { |
38 | 38 | $answerPos = strpos($uri, '?'); |
39 | - $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri) )), 1); |
|
39 | + $params = array_slice(explode('/', substr($uri, 0, $answerPos ? $answerPos : strlen($uri))), 1); |
|
40 | 40 | |
41 | 41 | foreach ($params as $key => $param) { |
42 | 42 | if ($param != '') { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $path = explode('/', $path); |
62 | 62 | $cur = ''; |
63 | 63 | foreach ($path as $item) { |
64 | - $cur .= $item . '/'; |
|
64 | + $cur .= $item.'/'; |
|
65 | 65 | if (!file_exists($cur)) { |
66 | 66 | mkdir($cur); |
67 | 67 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public static function resizeImage($img_path, $max_width = 1000, $max_height = 1000, $crop = false, $pos = 'center') { |
83 | 83 | ini_set("gd.jpeg_ignore_warning", 1); |
84 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($img_path); |
|
84 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($img_path); |
|
85 | 85 | switch ($img_type) { |
86 | 86 | case 1: |
87 | 87 | $img_type = 'gif'; |
@@ -107,14 +107,14 @@ discard block |
||
107 | 107 | |
108 | 108 | if ($crop === true || $crop == 'q') { |
109 | 109 | if ($img_width > $img_height) { |
110 | - $imgX = floor(( $img_width - $img_height ) / 2); |
|
110 | + $imgX = floor(($img_width - $img_height) / 2); |
|
111 | 111 | $imgY = 0; |
112 | 112 | $img_width = $img_height; |
113 | 113 | $new_width = $max_width; |
114 | 114 | $new_height = $max_height; |
115 | 115 | } else { |
116 | 116 | $imgX = 0; |
117 | - $imgY = floor(( $img_height - $img_width ) / 2); |
|
117 | + $imgY = floor(($img_height - $img_width) / 2); |
|
118 | 118 | $img_height = $img_width; |
119 | 119 | $new_width = $max_width; |
120 | 120 | $new_height = $max_height; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $new_width = $max_width; |
136 | 136 | $new_height = $max_height; |
137 | 137 | //Находим начальные координаты (центрируем новое изображение) |
138 | - $imgX = (int) (($ow / 2) - ($img_width / 2) ); |
|
138 | + $imgX = (int) (($ow / 2) - ($img_width / 2)); |
|
139 | 139 | if ($pos == 'center') { |
140 | 140 | $imgY = (int) (($oh / 2) - ($img_height / 2)); |
141 | 141 | } else { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | if (!headers_sent()) { |
209 | 209 | header("Location: {$href}"); |
210 | 210 | } else { |
211 | - echo '\'"><script>window.location="' . $href . '";</script>'; |
|
211 | + echo '\'"><script>window.location="'.$href.'";</script>'; |
|
212 | 212 | } |
213 | 213 | exit("Перенаправление на: <a href = '{$href}'>{$href}</a>"); |
214 | 214 | } |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $pathArray = $cleanPathArray; |
267 | 267 | $cleanPathArray = []; |
268 | 268 | } while ($changes); |
269 | - return (strpos($path, '/') === 0 ? '/' : '') . implode('/', $pathArray); |
|
269 | + return (strpos($path, '/') === 0 ? '/' : '').implode('/', $pathArray); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | if (empty($month[$mm - 1])) { |
287 | 287 | return 'Не указано'; |
288 | 288 | } |
289 | - return ($dd > 0 ? $dd . " " : '') . $month[$mm - 1] . " " . $yy . " " . $hours; |
|
289 | + return ($dd > 0 ? $dd." " : '').$month[$mm - 1]." ".$yy." ".$hours; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -364,10 +364,10 @@ discard block |
||
364 | 364 | if (in_array($file, ['.', '..'])) { |
365 | 365 | continue; |
366 | 366 | } |
367 | - if (is_dir($from . '/' . $file)) { |
|
368 | - self::copyFiles($from . '/' . $file, $to . '/' . $file); |
|
367 | + if (is_dir($from.'/'.$file)) { |
|
368 | + self::copyFiles($from.'/'.$file, $to.'/'.$file); |
|
369 | 369 | } else { |
370 | - copy($from . '/' . $file, $to . '/' . $file); |
|
370 | + copy($from.'/'.$file, $to.'/'.$file); |
|
371 | 371 | } |
372 | 372 | } |
373 | 373 | } |
@@ -46,21 +46,21 @@ discard block |
||
46 | 46 | } |
47 | 47 | } |
48 | 48 | $fileObject->name = $fileinfo['filename']; |
49 | - $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension']; |
|
50 | - if ($fileObject->id && file_exists($sitePath . $fileObject->path)) |
|
51 | - unlink($sitePath . $fileObject->path); |
|
49 | + $fileObject->path = $type->type_dir.date('Y-m-d').'/'.microtime(true).'.'.$fileinfo['extension']; |
|
50 | + if ($fileObject->id && file_exists($sitePath.$fileObject->path)) |
|
51 | + unlink($sitePath.$fileObject->path); |
|
52 | 52 | |
53 | - Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/'); |
|
53 | + Tools::createDir($sitePath.$type->type_dir.date('Y-m-d').'/'); |
|
54 | 54 | |
55 | - if (!move_uploaded_file($file['tmp_name'], $sitePath . $fileObject->path)) { |
|
55 | + if (!move_uploaded_file($file['tmp_name'], $sitePath.$fileObject->path)) { |
|
56 | 56 | return false; |
57 | 57 | } |
58 | 58 | |
59 | 59 | if ($type->allow_resize && $type->options && json_decode($type->options, true)) { |
60 | 60 | $typeOptions = json_decode($type->options, true); |
61 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($sitePath . $fileObject->path); |
|
61 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($sitePath.$fileObject->path); |
|
62 | 62 | if ($img_height > $typeOptions['max_height'] || $img_width > $typeOptions['max_width']) { |
63 | - Tools::resizeImage($sitePath . $fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
|
63 | + Tools::resizeImage($sitePath.$fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
@@ -104,25 +104,25 @@ discard block |
||
104 | 104 | } |
105 | 105 | } |
106 | 106 | $fileObject->name = $fileinfo['filename']; |
107 | - $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension']; |
|
108 | - if ($fileObject->id && file_exists($sitePath . $fileObject->path)) |
|
109 | - unlink($sitePath . $fileObject->path); |
|
107 | + $fileObject->path = $type->type_dir.date('Y-m-d').'/'.microtime(true).'.'.$fileinfo['extension']; |
|
108 | + if ($fileObject->id && file_exists($sitePath.$fileObject->path)) |
|
109 | + unlink($sitePath.$fileObject->path); |
|
110 | 110 | |
111 | - Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/'); |
|
111 | + Tools::createDir($sitePath.$type->type_dir.date('Y-m-d').'/'); |
|
112 | 112 | |
113 | 113 | $file = @file_get_contents($url); |
114 | 114 | if ($file === false) { |
115 | 115 | return 0; |
116 | 116 | } |
117 | - if (!file_put_contents($sitePath . $fileObject->path, $file)) { |
|
117 | + if (!file_put_contents($sitePath.$fileObject->path, $file)) { |
|
118 | 118 | return 0; |
119 | 119 | } |
120 | 120 | |
121 | 121 | if ($type->allow_resize && $type->options && json_decode($type->options, true)) { |
122 | 122 | $typeOptions = json_decode($type->options, true); |
123 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($sitePath . $fileObject->path); |
|
123 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($sitePath.$fileObject->path); |
|
124 | 124 | if ($img_height > $typeOptions['max_height'] || $img_width > $typeOptions['max_width']) { |
125 | - Tools::resizeImage($sitePath . $fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
|
125 | + Tools::resizeImage($sitePath.$fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if (!$dataManager->checkAccess()) { |
3 | - echo 'you not have access to "' . $dataManager->modelName . '" manager with name: "' . $dataManager->managerName . '"'; |
|
3 | + echo 'you not have access to "'.$dataManager->modelName.'" manager with name: "'.$dataManager->managerName.'"'; |
|
4 | 4 | return false; |
5 | 5 | } |
6 | 6 | ?> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | continue; |
47 | 47 | } |
48 | - if(++$i && !($i%2)){ |
|
48 | + if (++$i && !($i % 2)) { |
|
49 | 49 | echo '</div><div class="row">'; |
50 | 50 | } |
51 | 51 | echo '<div class="col-md-6">'; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $options = [ |
74 | 74 | 'where' => !empty($filters['getRows']['where']) ? $filters['getRows']['where'] : '' |
75 | 75 | ]; |
76 | - if (isset($cols[$relations[$colInfo['colParams']['relation']]['model']::colPrefix() . 'name'])) { |
|
76 | + if (isset($cols[$relations[$colInfo['colParams']['relation']]['model']::colPrefix().'name'])) { |
|
77 | 77 | $options['order'] = 'name'; |
78 | 78 | } |
79 | 79 | $items = $relations[$colInfo['colParams']['relation']]['model']::getList($options); |
@@ -134,14 +134,14 @@ |
||
134 | 134 | $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]); |
135 | 135 | foreach ($categorys as $category) { |
136 | 136 | if ($category->alias) { |
137 | - $href .="/{$category->alias}"; |
|
137 | + $href .= "/{$category->alias}"; |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | } |
141 | 141 | if ((!$href || $href == '/materials') && !$this->alias) { |
142 | - return ($href ? $href : '/materials') . '/view/' . $this->pk(); |
|
142 | + return ($href ? $href : '/materials').'/view/'.$this->pk(); |
|
143 | 143 | } |
144 | - return $href . "/" . ($this->alias ? $this->alias : $this->pk()); |
|
144 | + return $href."/".($this->alias ? $this->alias : $this->pk()); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | public function resolveTemplate() { |