@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $month = array('января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'); |
39 | 39 | $yearPosrfix = isset($options['yearPostfix']) ? $options['yearPostfix'] : " г."; |
40 | - return ($dd > 0 ? $dd . " " : '') . $month[$mm - 1] . " " . $yy . $yearPosrfix . (empty($options['notime']) ? " " . $hours : ''); |
|
40 | + return ($dd > 0 ? $dd." " : '').$month[$mm - 1]." ".$yy.$yearPosrfix.(empty($options['notime']) ? " ".$hours : ''); |
|
41 | 41 | case 'select': |
42 | 42 | switch ($colInfo['colParams']['source']) { |
43 | 43 | case 'model': |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | case 'image': |
65 | 65 | $file = Files\File::get($this->model->{$this->valueKey}); |
66 | 66 | if ($file) { |
67 | - return '<img src="' . $file->path . '?resize=60x120" />'; |
|
67 | + return '<img src="'.$file->path.'?resize=60x120" />'; |
|
68 | 68 | } else { |
69 | 69 | return '<img src="/static/system/images/no-image.png?resize=60x120" />'; |
70 | 70 | } |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | public function listen($eventName, $listenCode, $callback, $save = false) |
50 | 50 | { |
51 | 51 | if ($save) { |
52 | - $config = Config::custom(App::$primary->path . '/config/events.php'); |
|
52 | + $config = Config::custom(App::$primary->path.'/config/events.php'); |
|
53 | 53 | $config[$eventName][$listenCode] = serialize($callback); |
54 | - Config::save(App::$primary->path . '/config/events.php', $config); |
|
54 | + Config::save(App::$primary->path.'/config/events.php', $config); |
|
55 | 55 | } else { |
56 | 56 | $this->_listeners[$eventName][$listenCode] = $callback; |
57 | 57 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | if (!empty($this->_listeners[$eventName])) { |
76 | 76 | $listeners = $this->_listeners[$eventName]; |
77 | 77 | } |
78 | - $config = Config::custom(App::$primary->path . '/config/events.php'); |
|
78 | + $config = Config::custom(App::$primary->path.'/config/events.php'); |
|
79 | 79 | if (!empty($config[$eventName])) { |
80 | 80 | foreach ($config[$eventName] as $listenCode => $callback) { |
81 | 81 | $listeners[$listenCode] = (@unserialize($callback) !== false) ? unserialize($callback) : $callback; |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | public function unlisten($eventName, $listenCode, $save = false) |
111 | 111 | { |
112 | 112 | if ($save) { |
113 | - $config = Config::custom(App::$primary->path . '/config/events.php'); |
|
113 | + $config = Config::custom(App::$primary->path.'/config/events.php'); |
|
114 | 114 | if (!empty($config[$eventName][$listenCode])) { |
115 | 115 | unset($config[$eventName][$listenCode]); |
116 | - Config::save(App::$primary->path . '/config/events.php', $config); |
|
116 | + Config::save(App::$primary->path.'/config/events.php', $config); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | if (!empty($this->_listeners[$eventName][$listenCode])) { |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | { |
21 | 21 | if (!$model) { |
22 | 22 | $modulePath = Module::getModulePath($this->module->moduleName); |
23 | - $path = $modulePath . '/models'; |
|
23 | + $path = $modulePath.'/models'; |
|
24 | 24 | if (file_exists($path)) { |
25 | 25 | $files = array_slice(scandir($path), 2); |
26 | 26 | foreach ($files as $file) { |
27 | - if (is_dir($path . '/' . $file)) { |
|
27 | + if (is_dir($path.'/'.$file)) { |
|
28 | 28 | continue; |
29 | 29 | } |
30 | 30 | $model = pathinfo($file, PATHINFO_FILENAME); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | } |
35 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
35 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
36 | 36 | $dataManager = new Ui\DataManager($fullModelName, $dataManager); |
37 | 37 | $title = !empty($dataManager->managerOptions['name']) ? $dataManager->managerOptions['name'] : $fullModelName::objectName(); |
38 | 38 | $this->view->setTitle($title); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function viewAction($model, $pk) |
43 | 43 | { |
44 | - $fullModelName = $this->module->moduleName . '\\' . ucfirst($model); |
|
44 | + $fullModelName = $this->module->moduleName.'\\'.ucfirst($model); |
|
45 | 45 | $item = $fullModelName::get($pk); |
46 | 46 | $this->view->setTitle($item->name()); |
47 | 47 | if (!empty($_POST['comment'])) { |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | // time start |
17 | 17 | define('INJI_TIME_START', microtime(true)); |
18 | 18 | // system files dir |
19 | -define('INJI_SYSTEM_DIR', __DIR__ . '/system'); |
|
19 | +define('INJI_SYSTEM_DIR', __DIR__.'/system'); |
|
20 | 20 | // apps files dir |
21 | -define('INJI_PROGRAM_DIR', __DIR__ . '/program'); |
|
21 | +define('INJI_PROGRAM_DIR', __DIR__.'/program'); |
|
22 | 22 | |
23 | 23 | // check base config |
24 | 24 | if (!file_exists(INJI_SYSTEM_DIR) || !is_dir(INJI_SYSTEM_DIR)) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
38 | +require_once(INJI_SYSTEM_DIR.'/init.php'); |
|
39 | 39 | /** |
40 | 40 | * System error messages |
41 | 41 | */ |
@@ -89,16 +89,16 @@ |
||
89 | 89 | |
90 | 90 | public function name() |
91 | 91 | { |
92 | - if ($this->first_name . $this->last_name . $this->middle_name) { |
|
92 | + if ($this->first_name.$this->last_name.$this->middle_name) { |
|
93 | 93 | $name = ''; |
94 | 94 | if ($this->first_name) { |
95 | - $name.=$this->first_name; |
|
95 | + $name .= $this->first_name; |
|
96 | 96 | } |
97 | 97 | if ($this->middle_name) { |
98 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
98 | + $name .= ($name ? ' ' : '').$this->middle_name; |
|
99 | 99 | } |
100 | 100 | if ($this->last_name) { |
101 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
101 | + $name .= ($name ? ' ' : '').$this->last_name; |
|
102 | 102 | } |
103 | 103 | return $name; |
104 | 104 | } else { |
@@ -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"> |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $table->addRow([ |
39 | 39 | $history->id, |
40 | 40 | $history->wallet->currency->name(), |
41 | - '<span class = "' . ($amount > 0 ? "text-success" : 'text-danger') . '">' . $amount . '</span>', |
|
41 | + '<span class = "'.($amount > 0 ? "text-success" : 'text-danger').'">'.$amount.'</span>', |
|
42 | 42 | $history->comment, |
43 | 43 | $history->date_create |
44 | 44 | ]); |
@@ -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 | } |