@@ -25,7 +25,7 @@ |
||
25 | 25 | if ($param->type == 'custom') { |
26 | 26 | $parserName = $param->value; |
27 | 27 | } else { |
28 | - $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type); |
|
28 | + $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type); |
|
29 | 29 | } |
30 | 30 | if (!\Tools::isAssoc($this->data)) { |
31 | 31 | foreach ($this->data as $data) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | 'subscriber_device_subscriber_id' => 'int(11) UNSIGNED NOT NULL', |
30 | 30 | 'subscriber_device_date_last_check' => 'timestamp NOT NULL DEFAULT 0', |
31 | 31 | 'subscriber_device_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', |
32 | - ],[ |
|
33 | - 'UNIQUE INDEX ' . App::$cur->db->table_prefix . 'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
|
32 | + ], [ |
|
33 | + 'UNIQUE INDEX '.App::$cur->db->table_prefix.'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
|
34 | 34 | ]); |
35 | 35 | App::$cur->db->createTable('notifications_subscribe', [ |
36 | 36 | 'subscribe_id' => 'pk', |
@@ -16,9 +16,9 @@ |
||
16 | 16 | $app = new App(); |
17 | 17 | $app->name = $appOptions->name; |
18 | 18 | $app->system = true; |
19 | - $app->staticPath = "/" . $appOptions->dir . "/static"; |
|
20 | - $app->templatesPath = "/" . $appOptions->dir . "/static/templates"; |
|
21 | - $app->path = INJI_PROGRAM_DIR . '/' . $appOptions->dir; |
|
19 | + $app->staticPath = "/".$appOptions->dir."/static"; |
|
20 | + $app->templatesPath = "/".$appOptions->dir."/static/templates"; |
|
21 | + $app->path = INJI_PROGRAM_DIR.'/'.$appOptions->dir; |
|
22 | 22 | $app->type = 'app'; |
23 | 23 | $app->installed = true; |
24 | 24 | $app->params = []; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | foreach ($inputs[$inputName]['cols'] as $col) { |
59 | 59 | $part = trim($part); |
60 | 60 | if ($part && strlen($part) > 2) { |
61 | - $colWhere[] = [$col, '%' . $part . '%', 'LIKE', $first ? 'AND' : 'OR']; |
|
61 | + $colWhere[] = [$col, '%'.$part.'%', 'LIKE', $first ? 'AND' : 'OR']; |
|
62 | 62 | $first = false; |
63 | 63 | } |
64 | 64 | } |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | case 'relation': |
25 | 25 | $relations = $colInfo['modelName']::relations(); |
26 | 26 | $relValue = $relations[$colInfo['colParams']['relation']]['model']::get($item->$colName); |
27 | - $value = $relValue ? "<a href='/admin/" . str_replace('\\', '/view/', $relations[$colInfo['colParams']['relation']]['model']) . "/" . $relValue->pk() . "'>" . $relValue->name() . "</a>" : 'Не задано'; |
|
27 | + $value = $relValue ? "<a href='/admin/".str_replace('\\', '/view/', $relations[$colInfo['colParams']['relation']]['model'])."/".$relValue->pk()."'>".$relValue->name()."</a>" : 'Не задано'; |
|
28 | 28 | break; |
29 | 29 | } |
30 | 30 | break; |
31 | 31 | case 'image': |
32 | 32 | $file = Files\File::get($item->$colName); |
33 | 33 | if ($file) { |
34 | - $value = '<img src="' . $file->path . '?resize=60x120" />'; |
|
34 | + $value = '<img src="'.$file->path.'?resize=60x120" />'; |
|
35 | 35 | } else { |
36 | 36 | $value = '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
37 | 37 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ]]); |
59 | 59 | ?>)</h3> |
60 | 60 | <?php |
61 | - foreach (\Dashboard\Comment::getList([ 'where' => [ |
|
61 | + foreach (\Dashboard\Comment::getList(['where' => [ |
|
62 | 62 | ['item_id', $item->id], |
63 | 63 | ['model', $modelName], |
64 | 64 | ], 'order' => ['date_create', 'desc']]) as $comment) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | echo '<td>'; |
35 | 35 | $col['options']['noContainer'] = true; |
36 | 36 | $col['options']['value'] = $row[$colName]; |
37 | - $form->input($col['type'], $name . '[' . ($i) . '][' . $colName . ']', false, $col['options']); |
|
37 | + $form->input($col['type'], $name.'['.($i).']['.$colName.']', false, $col['options']); |
|
38 | 38 | echo '</td>'; |
39 | 39 | } |
40 | 40 | echo '<td class="actionTd"><a class="btn btn-danger btn-xs" onclick="inji.Ui.forms.delRowFromList(this);"><i class="glyphicon glyphicon-remove"></i></a></td>'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | foreach ($options['cols'] as $colName => $col) { |
64 | 64 | echo '<td>'; |
65 | 65 | $col['options']['noContainer'] = true; |
66 | - $form->input($col['type'], $name . '[counterPlaceholder][' . $colName . ']', false, $col['options']); |
|
66 | + $form->input($col['type'], $name.'[counterPlaceholder]['.$colName.']', false, $col['options']); |
|
67 | 67 | echo '</td>'; |
68 | 68 | } |
69 | 69 | ?> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | } else { |
14 | 14 | $dataManager = new \Ui\DataManager($options['relation']['type'] == 'relModel' ? $options['relation']['relModel'] : $options['relation']['model'], 'manager'); |
15 | 15 | $dataManager->predraw(); |
16 | - echo '<h3>' . $dataManager->table->name . '</h3>'; |
|
16 | + echo '<h3>'.$dataManager->table->name.'</h3>'; |
|
17 | 17 | echo '<h4 class=" text-muted">Чтобы добавить связи, сначала создайте объект</h4>'; |
18 | 18 | echo '<p class=" text-muted">Просто заполните доступные поля и нажмите кнопку внизу формы. После этого дополнительные поля разблокируются</p>'; |
19 | 19 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | |
2 | 2 | <?php |
3 | 3 | echo empty($options['noContainer']) ? '<div class="form-group">' : ''; |
4 | -echo $label !== false ? "<label>{$label}" . (!empty($options['required']) ? ' <span class="required-star">*</span>' : '') . "</label>" : ''; |
|
4 | +echo $label !== false ? "<label>{$label}".(!empty($options['required']) ? ' <span class="required-star">*</span>' : '')."</label>" : ''; |
|
5 | 5 | ?> |
6 | 6 | <div class="row"> |
7 | 7 | <div class="col-xs-6"> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -$id = 'activeForm-' . Tools::randomString(); |
|
2 | +$id = 'activeForm-'.Tools::randomString(); |
|
3 | 3 | $formInputs = $activeForm->inputs; |
4 | 4 | foreach ($formInputs as $inputName => $inputParams) { |
5 | 5 | if (is_object($inputParams)) { |