@@ -25,9 +25,9 @@ |
||
25 | 25 | */ |
26 | 26 | public function deleteRoute(): ?string |
27 | 27 | { |
28 | - $type = (string)$this->request->query->get('type'); |
|
29 | - $loader = (string)$this->request->query->get('loader'); |
|
30 | - $source = Str::lowerCase((string)$this->request->query->get('path')); |
|
28 | + $type = (string) $this->request->query->get('type'); |
|
29 | + $loader = (string) $this->request->query->get('loader'); |
|
30 | + $source = Str::lowerCase((string) $this->request->query->get('path')); |
|
31 | 31 | |
32 | 32 | $model = new EntityDeleteRoute($type, $loader, $source); |
33 | 33 | if ($model->send() && $model->validate()) { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function files(): ?string |
25 | 25 | { |
26 | 26 | return $this->view->render('main/files', [ |
27 | - 'connector' => App::$Alias->scriptUrl . '/api/main/files?lang=' . $this->request->getLanguage() |
|
27 | + 'connector' => App::$Alias->scriptUrl.'/api/main/files?lang='.$this->request->getLanguage() |
|
28 | 28 | ]); |
29 | 29 | } |
30 | 30 | } |
31 | 31 | \ No newline at end of file |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $search = \Apps\ActiveRecord\App::getItem('widget', $controller); |
83 | 83 | |
84 | 84 | // check what we got |
85 | - if (!$search || (int)$search->id < 1) { |
|
85 | + if (!$search || (int) $search->id < 1) { |
|
86 | 86 | throw new NotFoundException('Widget is not founded'); |
87 | 87 | } |
88 | 88 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | ->first(); |
118 | 118 | |
119 | 119 | // check if widget admin controller exists |
120 | - if (!$record || (int)$record->id < 1) { |
|
120 | + if (!$record || (int) $record->id < 1) { |
|
121 | 121 | throw new ForbiddenException('Widget is not founded'); |
122 | 122 | } |
123 | 123 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $search = \Apps\ActiveRecord\App::getItem('app', $controller); |
85 | 85 | |
86 | 86 | // check what we got |
87 | - if (!$search || (int)$search->id < 1) { |
|
87 | + if (!$search || (int) $search->id < 1) { |
|
88 | 88 | throw new NotFoundException('App is not founded'); |
89 | 89 | } |
90 | 90 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $search = \Apps\ActiveRecord\App::where('sys_name', $controllerName) |
117 | 117 | ->where('type', 'app') |
118 | 118 | ->first(); |
119 | - if (!$search || (int)$search->id < 1) { |
|
119 | + if (!$search || (int) $search->id < 1) { |
|
120 | 120 | throw new ForbiddenException('App is not founded'); |
121 | 121 | } |
122 | 122 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <h1><?= __('Feedback list') ?></h1> |
26 | 26 | <?php |
27 | 27 | if (!$records || $records->count() < 1) { |
28 | - echo '<p class="alert alert-warning">' . __('Feedback requests is empty now!') . '</p>'; |
|
28 | + echo '<p class="alert alert-warning">'.__('Feedback requests is empty now!').'</p>'; |
|
29 | 29 | $this->stop(); |
30 | 30 | return; |
31 | 31 | } |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | foreach ($records as $item) { |
46 | 46 | /** @var \Apps\ActiveRecord\FeedbackPost $item*/ |
47 | 47 | $table->row([ |
48 | - ['text' => $item->id . (!$item->readed ? ' <i class="fa fa-bell alert-info"></i>' : null) . ($item->closed ? ' <i class="fa fa-eye-slash alert-danger"></i>' : null), 'html' => true], |
|
48 | + ['text' => $item->id.(!$item->readed ? ' <i class="fa fa-bell alert-info"></i>' : null).($item->closed ? ' <i class="fa fa-eye-slash alert-danger"></i>' : null), 'html' => true], |
|
49 | 49 | ['text' => Url::a(['feedback/read', [$item->id]], Text::snippet($item->message, 40)), 'html' => true], |
50 | - ['text' => '<span class="badge badge-light">' . $item->answers->count() . '</span>', 'html' => true], |
|
50 | + ['text' => '<span class="badge badge-light">'.$item->answers->count().'</span>', 'html' => true], |
|
51 | 51 | ['text' => $item->email], |
52 | - ['text' => (bool)$item->closed ? '<span class="badge badge-danger">' . __('Closed') . '</span>' : '<span class="label label-success">' . __('Opened') . '</span>', 'html' => true, '!secure' => true], |
|
52 | + ['text' => (bool) $item->closed ? '<span class="badge badge-danger">'.__('Closed').'</span>' : '<span class="label label-success">'.__('Opened').'</span>', 'html' => true, '!secure' => true], |
|
53 | 53 | ['text' => Date::convertToDatetime($item->updated_at, Date::FORMAT_TO_HOUR)], |
54 | 54 | ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'role' => 'group']) |
55 | 55 | ->add('<i class="fa fa-feed"></i>', ['feedback/read', [$item->id]], ['class' => 'btn btn-light', 'html' => true]) |
@@ -37,7 +37,7 @@ |
||
37 | 37 | <div class="text-right"><strong><?= __('Profile preview') ?></strong></div> |
38 | 38 | </div> |
39 | 39 | <div class="col-md-9"> |
40 | - <a href="<?= \App::$Alias->scriptUrl . '/profile/show/' . $model->_user->id ?>" target="_blank"><?= __('View profile on website') ?></a> |
|
40 | + <a href="<?= \App::$Alias->scriptUrl.'/profile/show/'.$model->_user->id ?>" target="_blank"><?= __('View profile on website') ?></a> |
|
41 | 41 | </div> |
42 | 42 | </div> |
43 | 43 | <div class="row mt-3 mb-3"> |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | <div class="media-left"> |
175 | 175 | <a href="<?= ($comment->user ? Url::link(['user/update', [$comment->user->id]]) : '#') ?>"> |
176 | 176 | <?php |
177 | - $commentAva = \App::$Alias->scriptUrl . '/upload/user/avatar/small/default.jpg'; |
|
177 | + $commentAva = \App::$Alias->scriptUrl.'/upload/user/avatar/small/default.jpg'; |
|
178 | 178 | if ($comment->user && $comment->user->id > 0) { |
179 | 179 | $commentAva = $comment->user->profile->getAvatarUrl('small'); |
180 | 180 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | </li> |
252 | 252 | <li class="nav-item<?= (\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? ' active' : null ?>"> |
253 | 253 | <?= Url::a(['#system-dropdown'], |
254 | - '<i class="fa fa-fire"></i> <span class="nav-text">' . __('System') . '</span>', |
|
254 | + '<i class="fa fa-fire"></i> <span class="nav-text">'.__('System').'</span>', |
|
255 | 255 | [ |
256 | 256 | 'class' => 'nav-container', |
257 | 257 | 'data-toggle' => 'collapse', |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | ]) |
260 | 260 | ?> |
261 | 261 | |
262 | - <?= $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . ((\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? 'in show' : null), 'id' => 'system-dropdown']) |
|
263 | - ->menu(['link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true]) |
|
264 | - ->menu(['link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> ' . __('Files'), 'html' => true]) |
|
265 | - ->menu(['link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> ' . __('Antivirus'), 'html' => true]) |
|
266 | - ->menu(['link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> ' . __('Routing'), 'html' => true]) |
|
267 | - ->menu(['link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> ' . __('Updates'), 'html' => true]) |
|
262 | + <?= $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.((\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? 'in show' : null), 'id' => 'system-dropdown']) |
|
263 | + ->menu(['link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> '.__('Settings'), 'html' => true]) |
|
264 | + ->menu(['link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> '.__('Files'), 'html' => true]) |
|
265 | + ->menu(['link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> '.__('Antivirus'), 'html' => true]) |
|
266 | + ->menu(['link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> '.__('Routing'), 'html' => true]) |
|
267 | + ->menu(['link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> '.__('Updates'), 'html' => true]) |
|
268 | 268 | ->display(); |
269 | 269 | ?> |
270 | 270 | </li> |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | ?> |
283 | 283 | <li class="nav-item<?= (array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? ' active' : null ?>"> |
284 | 284 | <?= Url::a(['#apps-dropdown'], |
285 | - '<i class="fa fa-plug"></i> <span class="nav-text">' . __('Applications') . '</span>', |
|
285 | + '<i class="fa fa-plug"></i> <span class="nav-text">'.__('Applications').'</span>', |
|
286 | 286 | [ |
287 | 287 | 'class' => 'nav-container', |
288 | 288 | 'data-toggle' => 'collapse', |
@@ -291,18 +291,18 @@ discard block |
||
291 | 291 | ?> |
292 | 292 | |
293 | 293 | <?php |
294 | - $appMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . ((array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? 'in show' : null), 'id' => 'apps-dropdown']); |
|
294 | + $appMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.((array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? 'in show' : null), 'id' => 'apps-dropdown']); |
|
295 | 295 | foreach ($apps as $app) { |
296 | 296 | /** @var \Apps\ActiveRecord\App $app */ |
297 | - $appMenu->menu(['link' => [Str::lowerCase($app->sys_name) . '/index'], 'text' => $app->getLocaleName()]); |
|
297 | + $appMenu->menu(['link' => [Str::lowerCase($app->sys_name).'/index'], 'text' => $app->getLocaleName()]); |
|
298 | 298 | } |
299 | - $appMenu->menu(['link' => 'application/index', 'text' => __('All apps') . '...']); |
|
299 | + $appMenu->menu(['link' => 'application/index', 'text' => __('All apps').'...']); |
|
300 | 300 | echo $appMenu->display(); |
301 | 301 | ?> |
302 | 302 | </li> |
303 | 303 | <li class="nav-item<?= (array_key_exists(\App::$Request->getController(), $widgets) || \App::$Request->getController() === 'Widget') ? ' active' : null ?>"> |
304 | 304 | <?= Url::a(['#widgets-dropdown'], |
305 | - '<i class="fa fa-puzzle-piece"></i> <span class="nav-text">' . __('Widgets') . '</span>', |
|
305 | + '<i class="fa fa-puzzle-piece"></i> <span class="nav-text">'.__('Widgets').'</span>', |
|
306 | 306 | [ |
307 | 307 | 'class' => 'nav-container', |
308 | 308 | 'data-toggle' => 'collapse', |
@@ -311,12 +311,12 @@ discard block |
||
311 | 311 | ?> |
312 | 312 | |
313 | 313 | <?php |
314 | - $widgetMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . ((array_key_exists(\App::$Request->getController(), $widgets) || \App::$Request->getController() === 'Widget') ? 'in show' : null), 'id' => 'widgets-dropdown']); |
|
314 | + $widgetMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.((array_key_exists(\App::$Request->getController(), $widgets) || \App::$Request->getController() === 'Widget') ? 'in show' : null), 'id' => 'widgets-dropdown']); |
|
315 | 315 | foreach ($widgets as $widget) { |
316 | 316 | /** @var \Apps\ActiveRecord\App $widget */ |
317 | - $widgetMenu->menu(['link' => [Str::lowerCase($widget->sys_name) . '/index'], 'text' => $widget->getLocaleName()]); |
|
317 | + $widgetMenu->menu(['link' => [Str::lowerCase($widget->sys_name).'/index'], 'text' => $widget->getLocaleName()]); |
|
318 | 318 | } |
319 | - $widgetMenu->menu(['link' => 'widget/index', 'text' => __('All widgets') . '...']); |
|
319 | + $widgetMenu->menu(['link' => 'widget/index', 'text' => __('All widgets').'...']); |
|
320 | 320 | echo $widgetMenu->display(); |
321 | 321 | ?> |
322 | 322 | </li> |
@@ -134,7 +134,8 @@ discard block |
||
134 | 134 | <span class="text-sm">No feedback queries found</span> |
135 | 135 | </div> |
136 | 136 | </div> |
137 | - <?php else: ?> |
|
137 | + <?php else { |
|
138 | + : ?> |
|
138 | 139 | <?php foreach ($features->getFeedback() as $feed): ?> |
139 | 140 | <div class="media"> |
140 | 141 | <div class="media-left"> |
@@ -145,7 +146,9 @@ discard block |
||
145 | 146 | <span class="text-sm"><?= Text::snippet($feed->message, 100) ?></span> |
146 | 147 | </div> |
147 | 148 | </div> |
148 | - <?php endforeach; ?> |
|
149 | + <?php endforeach; |
|
150 | +} |
|
151 | +?> |
|
149 | 152 | <?php endif; ?> |
150 | 153 | </div> |
151 | 154 | |
@@ -167,7 +170,8 @@ discard block |
||
167 | 170 | <span class="text-sm">No comments found</span> |
168 | 171 | </div> |
169 | 172 | </div> |
170 | - <?php else: ?> |
|
173 | + <?php else { |
|
174 | + : ?> |
|
171 | 175 | <?php foreach ($features->getComments() as $comment): ?> |
172 | 176 | <?php /** @var \Apps\ActiveRecord\CommentPost $comment */ ?> |
173 | 177 | <div class="media"> |
@@ -175,6 +179,7 @@ discard block |
||
175 | 179 | <a href="<?= ($comment->user ? Url::link(['user/update', [$comment->user->id]]) : '#') ?>"> |
176 | 180 | <?php |
177 | 181 | $commentAva = \App::$Alias->scriptUrl . '/upload/user/avatar/small/default.jpg'; |
182 | +} |
|
178 | 183 | if ($comment->user && $comment->user->id > 0) { |
179 | 184 | $commentAva = $comment->user->profile->getAvatarUrl('small'); |
180 | 185 | } |
@@ -220,9 +225,12 @@ discard block |
||
220 | 225 | <?php foreach ($breadcrumbs as $url => $text): ?> |
221 | 226 | <?php if (\Ffcms\Core\Helper\Type\Any::isInt($url)): ?> |
222 | 227 | <?= $text ?> |
223 | - <?php else: ?> |
|
228 | + <?php else { |
|
229 | + : ?> |
|
224 | 230 | <a href="<?= $url ?>"><?= $text ?></a> / |
225 | - <?php endif; ?> |
|
231 | + <?php endif; |
|
232 | +} |
|
233 | +?> |
|
226 | 234 | <?php endforeach; ?> |
227 | 235 | <?php endif; ?> |
228 | 236 | </h2> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $index = implode('-', $this->_skip); |
63 | 63 | // try to get this slow query from cache |
64 | - $cache = App::$Cache->getItem('entity.content.search.index.' . $index); |
|
64 | + $cache = App::$Cache->getItem('entity.content.search.index.'.$index); |
|
65 | 65 | if (!$cache->isHit()) { |
66 | 66 | $cache->set($this->makeSearch()); |
67 | 67 | $cache->expiresAfter(static::CACHE_TIME); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'id' => $item->id, |
96 | 96 | 'title' => $item->getLocaled('title'), |
97 | 97 | 'snippet' => Text::snippet($text), |
98 | - 'uri' => '/content/read/' . $item->getPath(), |
|
98 | + 'uri' => '/content/read/'.$item->getPath(), |
|
99 | 99 | 'thumb' => $item->getPosterThumbUri() |
100 | 100 | ]; |
101 | 101 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ]); |
56 | 56 | |
57 | 57 | foreach ($records as $user) { |
58 | - $roleHtml = $user->role->color ? '<span class="badge badge-light" style="color: ' . $user->role->color . '">' . $user->role->name . '</span>' : $user->role->name; |
|
58 | + $roleHtml = $user->role->color ? '<span class="badge badge-light" style="color: '.$user->role->color.'">'.$user->role->name.'</span>' : $user->role->name; |
|
59 | 59 | |
60 | 60 | $table->row([ |
61 | 61 | ['text' => $user->id], |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->add('<i class="fa fa-trash-o"></i>', ['user/delete', [$user->id]], ['class' => 'btn btn-danger', 'html' => true]) |
70 | 70 | ->display(), |
71 | 71 | 'properties' => ['class' => 'text-center'], 'html' => true], |
72 | - 'properties' => ['class' => 'checkbox-row' . ($user->approve_token !== null ? ' bg-warning' : null)] |
|
72 | + 'properties' => ['class' => 'checkbox-row'.($user->approve_token !== null ? ' bg-warning' : null)] |
|
73 | 73 | |
74 | 74 | ]); |
75 | 75 | } |