@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | $user = App::$User->identity(); |
93 | 93 | // user is not authed ? |
94 | 94 | if (!$user || !App::$User->isAuth()) { |
95 | - $redirectUrl = App::$Alias->scriptUrl . '/user/login'; |
|
95 | + $redirectUrl = App::$Alias->scriptUrl.'/user/login'; |
|
96 | 96 | App::$Response->redirect($redirectUrl, true); |
97 | 97 | exit(); |
98 | 98 | } |
99 | 99 | |
100 | - $permission = env_name . '/' . App::$Request->getController() . '/' . App::$Request->getAction(); |
|
100 | + $permission = env_name.'/'.App::$Request->getController().'/'.App::$Request->getAction(); |
|
101 | 101 | // doesn't have permission? get the f*ck out |
102 | 102 | if (!$user->role->can($permission)) { |
103 | 103 | throw new ForbiddenException(__('You got no access rights to this page')); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function getConfigs(): ?array |
149 | 149 | { |
150 | - $configs = $this->type === 'widget' ? (array)$this->widget->configs : (array)$this->application->configs; |
|
150 | + $configs = $this->type === 'widget' ? (array) $this->widget->configs : (array) $this->application->configs; |
|
151 | 151 | foreach ($configs as $cfg => $value) { |
152 | 152 | if (Any::isInt($value)) { |
153 | 153 | $configs[$cfg] = $value; |
@@ -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 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | // don't use breadcrumbs on injected pathway rule |
32 | 32 | $breadcrumbs = null; |
33 | -if (!\App::$Request->isPathInjected() && (bool)$model->getCategory()->getProperty('showCategory')) { |
|
33 | +if (!\App::$Request->isPathInjected() && (bool) $model->getCategory()->getProperty('showCategory')) { |
|
34 | 34 | $breadcrumbs = [ |
35 | 35 | Url::to('/') => __('Home') |
36 | 36 | ]; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $breadcrumbs[Url::to('content/list', [$cat['path']])] = $cat['name']; |
43 | 43 | } |
44 | 44 | } |
45 | - $breadcrumbs[] = __('Content') . ': ' . Str::sub($title, 0, 40); |
|
45 | + $breadcrumbs[] = __('Content').': '.Str::sub($title, 0, 40); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
@@ -55,15 +55,15 @@ discard block |
||
55 | 55 | ]); |
56 | 56 | |
57 | 57 | $properties = [ |
58 | - 'date' => (bool)$model->getCategory()->getProperty('showDate'), |
|
59 | - 'author' => (bool)$model->getCategory()->getProperty('showAuthor'), |
|
60 | - 'views' => (bool)$model->getCategory()->getProperty('showViews'), |
|
61 | - 'category' => (bool)$model->getCategory()->getProperty('showCategory'), |
|
62 | - 'rating' => (bool)$model->getCategory()->getProperty('showRating'), |
|
63 | - 'tags' => (bool)$model->getCategory()->getProperty('showTags') |
|
58 | + 'date' => (bool) $model->getCategory()->getProperty('showDate'), |
|
59 | + 'author' => (bool) $model->getCategory()->getProperty('showAuthor'), |
|
60 | + 'views' => (bool) $model->getCategory()->getProperty('showViews'), |
|
61 | + 'category' => (bool) $model->getCategory()->getProperty('showCategory'), |
|
62 | + 'rating' => (bool) $model->getCategory()->getProperty('showRating'), |
|
63 | + 'tags' => (bool) $model->getCategory()->getProperty('showTags') |
|
64 | 64 | ]; |
65 | -$showComments = (bool)$model->getCategory()->getProperty('showComments'); |
|
66 | -$showPoster = (bool)$model->getCategory()->getProperty('showPoster'); |
|
65 | +$showComments = (bool) $model->getCategory()->getProperty('showComments'); |
|
66 | +$showPoster = (bool) $model->getCategory()->getProperty('showPoster'); |
|
67 | 67 | ?> |
68 | 68 | |
69 | 69 | <?php $this->push('css') ?> |
@@ -75,24 +75,24 @@ discard block |
||
75 | 75 | <h1><?= $model->title ?></h1> |
76 | 76 | <?php if (Arr::in(true, $properties)): ?> |
77 | 77 | <div class="meta"> |
78 | - <?php if ((bool)$properties['category']): ?> |
|
78 | + <?php if ((bool) $properties['category']): ?> |
|
79 | 79 | <span class="spaced"><i class="fa fa-list"></i> <?= Url::a(['content/list', [$model->catPath]], $model->catName, ['itemprop' => 'genre']) ?></span> |
80 | 80 | <?php endif; ?> |
81 | - <?php if ((bool)$properties['date']): ?> |
|
81 | + <?php if ((bool) $properties['date']): ?> |
|
82 | 82 | <span class="spaced"><i class="fa fa-calendar"></i> <time datetime="<?= date('c', Date::convertToTimestamp($model->getRecord()->created_at)) ?> itemprop="datePublished"><?= $model->createDate ?></time></span> |
83 | 83 | <?php endif; ?> |
84 | - <?php if ((bool)$properties['author']): ?> |
|
84 | + <?php if ((bool) $properties['author']): ?> |
|
85 | 85 | <?php if ($model->authorId && $model->authorId > 0): ?> |
86 | 86 | <span class="spaced"><i class="fa fa-user"></i> <?= Url::a(['profile/show', [$model->authorId]], $model->authorName, ['itemprop' => 'author']) ?></span> |
87 | 87 | <?php else: ?> |
88 | 88 | <span class="spaced"><i class="fa fa-user"></i> <s><?= $model->authorName ?></s></span> |
89 | 89 | <?php endif; ?> |
90 | 90 | <?php endif; ?> |
91 | - <?php if ((bool)$properties['views']): ?> |
|
91 | + <?php if ((bool) $properties['views']): ?> |
|
92 | 92 | <span class="spaced"><i class="fa fa-eye"></i> <?= $model->views ?></span> |
93 | 93 | <?php endif ?> |
94 | 94 | <?php if (\App::$User->isAuth() && \App::$User->identity()->role->can('Admin/Content/Update')): ?> |
95 | - <span class="float-right"><a href="<?= \App::$Alias->scriptUrl . '/admin/content/update/' . $model->id ?>" target="_blank"><i class="fa fa-pencil" style="color: #ff0000;"></i></a></span> |
|
95 | + <span class="float-right"><a href="<?= \App::$Alias->scriptUrl.'/admin/content/update/'.$model->id ?>" target="_blank"><i class="fa fa-pencil" style="color: #ff0000;"></i></a></span> |
|
96 | 96 | <?php endif; ?> |
97 | 97 | </div> |
98 | 98 | <?php else: ?> |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | <div id="content-text"> |
110 | 110 | <?php if ($showPoster === true && $model->posterFull && $model->posterThumb): ?> |
111 | 111 | <a href="<?= $model->posterFull ?>" data-fancybox="image"> |
112 | - <img alt="<?= __('Poster for') ?>: <?= Str::lowerCase($model->title) ?>" src="<?= \App::$Alias->scriptUrl . $model->posterThumb ?>" class="image_poster img-thumbnail" /> |
|
112 | + <img alt="<?= __('Poster for') ?>: <?= Str::lowerCase($model->title) ?>" src="<?= \App::$Alias->scriptUrl.$model->posterThumb ?>" class="image_poster img-thumbnail" /> |
|
113 | 113 | </a> |
114 | - <?php endif ;?> |
|
114 | + <?php endif; ?> |
|
115 | 115 | <?= $model->text ?> |
116 | 116 | </div> |
117 | 117 | </div> |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | <?php foreach ($model->galleryItems as $thumb => $full): ?> |
122 | 122 | <div class="col-6 col-lg-4 mt-2"> |
123 | 123 | <figure> |
124 | - <a class="d-block mb-4" data-fancybox="images" href="<?= \App::$Alias->scriptUrl . $full ?>"> |
|
125 | - <img class="img-fluid" src="<?= \App::$Alias->scriptUrl . $thumb ?>" alt="gallery image"> |
|
124 | + <a class="d-block mb-4" data-fancybox="images" href="<?= \App::$Alias->scriptUrl.$full ?>"> |
|
125 | + <img class="img-fluid" src="<?= \App::$Alias->scriptUrl.$thumb ?>" alt="gallery image"> |
|
126 | 126 | </a> |
127 | 127 | </figure> |
128 | 128 | </div> |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | </div> |
145 | 145 | <div id="similar-collapse-<?= $item['id'] ?>" class="collapse" aria-labelledby="similar-heading-<?= $item['id'] ?>" data-parent="#accordion-similar-group"> |
146 | 146 | <div class="card-body"> |
147 | - <a href="<?= \App::$Alias->baseUrl . $item['uri'] ?>"> |
|
147 | + <a href="<?= \App::$Alias->baseUrl.$item['uri'] ?>"> |
|
148 | 148 | <?= $item['snippet'] ?> |
149 | 149 | </a> |
150 | 150 | </div> |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | echo '<i class="fa fa-tags"></i> '; |
176 | 176 | foreach ($model->metaKeywords as $tag) { |
177 | 177 | $tag = trim($tag); |
178 | - echo Url::a(['content/tag', [urlencode($tag)]], $tag, ['class' => 'badge badge-secondary']) . " "; |
|
178 | + echo Url::a(['content/tag', [urlencode($tag)]], $tag, ['class' => 'badge badge-secondary'])." "; |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 | ?> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <h1><?= __('Category list') ?></h1> |
26 | 26 | <div class="row"> |
27 | 27 | <div class="col-md-12"> |
28 | - <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> ' . __('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
28 | + <?= Url::a(['content/categoryupdate'], '<i class="fa fa-plus"></i> '.__('Add category'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
29 | 29 | </div> |
30 | 30 | </div> |
31 | 31 | <div class="table-responsive"> |
@@ -56,17 +56,17 @@ discard block |
||
56 | 56 | <tr> |
57 | 57 | <td> |
58 | 58 | <div class="row"> |
59 | - <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset+2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div> |
|
60 | - <div class="col-md-<?= $set ?> col-xs-<?= $set-2 ?>"> |
|
59 | + <div class="d-none d-md-block col-md-<?= $offset ?> col-xs-<?= $offset + 2 ?> " style="border-bottom: 2px solid #8a8a8a;height: 1px;padding-top: 10px;"></div> |
|
60 | + <div class="col-md-<?= $set ?> col-xs-<?= $set - 2 ?>"> |
|
61 | 61 | <?= $row->getLocaled('title') ?> |
62 | 62 | <sup>id: <?= $row->id ?></sup> |
63 | - <a href="<?= \App::$Alias->scriptUrl . '/content/list/' . $row->path ?>" target="_blank" class="badge badge-secondary">/<?= $row->path ?></a> |
|
63 | + <a href="<?= \App::$Alias->scriptUrl.'/content/list/'.$row->path ?>" target="_blank" class="badge badge-secondary">/<?= $row->path ?></a> |
|
64 | 64 | </div> |
65 | 65 | </div> |
66 | 66 | </td> |
67 | 67 | <td class="text-center"> |
68 | 68 | <?php $btn = $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'dropdown' => ['class' => 'btn-group btn-group-sm'], 'role' => 'group'], 4) |
69 | - ->add('<i class="fa fa-eye"></i>', [\App::$Alias->scriptUrl . '/content/list/' . $row->path], ['html' => true]) |
|
69 | + ->add('<i class="fa fa-eye"></i>', [\App::$Alias->scriptUrl.'/content/list/'.$row->path], ['html' => true]) |
|
70 | 70 | ->add('<i class="fa fa-plus"></i>', ['content/categoryupdate', null, ['parent' => $row->id]], ['class' => 'btn btn-success', 'data-toggle' => 'tooltip', 'title' => __('Add subcategory'), 'html' => true]) |
71 | 71 | ->add('<i class="fa fa-cog"></i>', ['content/categoryupdate', [$row->id]], ['class' => 'btn btn-primary', 'data-toggle' => 'tooltip', 'title' => __('Category configurations'), 'html' => true]); |
72 | 72 | if ($row->id > 1) { |
@@ -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"> |