@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | <div class="col-md-6"> |
30 | 30 | <?php |
31 | 31 | if ($type === 'trash') { |
32 | - echo Url::a(['content/clear'], '<i class="fa fa-minus"></i> ' . __('Remove all'), ['class' => 'btn btn-danger', 'html' => true]); |
|
32 | + echo Url::a(['content/clear'], '<i class="fa fa-minus"></i> '.__('Remove all'), ['class' => 'btn btn-danger', 'html' => true]); |
|
33 | 33 | } else { |
34 | - echo Url::a(['content/update'], '<i class="fa fa-plus"></i> ' . __('Add content'), ['class' => 'btn btn-primary', 'html' => true]); |
|
34 | + echo Url::a(['content/update'], '<i class="fa fa-plus"></i> '.__('Add content'), ['class' => 'btn btn-primary', 'html' => true]); |
|
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | </div> |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | <i class="fa fa-filter"></i> <?= __('Filters') ?> |
55 | 55 | </button> |
56 | 56 | <div class="dropdown-menu" aria-labelledby="btnCategories"> |
57 | - <?= Url::a(['content/index', null, ['type' => 'all']], '<i class="fa fa-list"></i> ' . __('All'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
58 | - <?= Url::a(['content/index', null, ['type' => 'moderate']], '<i class="fa fa-exclamation"></i> ' . __('Moderate'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
59 | - <?= Url::a(['content/index', null, ['type' => 'trash']], '<i class="fa fa-trash"></i> ' . __('Trash'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
57 | + <?= Url::a(['content/index', null, ['type' => 'all']], '<i class="fa fa-list"></i> '.__('All'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
58 | + <?= Url::a(['content/index', null, ['type' => 'moderate']], '<i class="fa fa-exclamation"></i> '.__('Moderate'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
59 | + <?= Url::a(['content/index', null, ['type' => 'trash']], '<i class="fa fa-trash"></i> '.__('Trash'), ['class' => 'dropdown-item', 'html' => true]) ?> |
|
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | </div> |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | if (!$content->category) { |
86 | 86 | continue; |
87 | 87 | } |
88 | - $frontLink = \App::$Alias->scriptUrl . '/content/read'; |
|
88 | + $frontLink = \App::$Alias->scriptUrl.'/content/read'; |
|
89 | 89 | if (!Str::likeEmpty($content->category->path)) { |
90 | - $frontLink .= '/' . $content->category->path; |
|
90 | + $frontLink .= '/'.$content->category->path; |
|
91 | 91 | } |
92 | - $frontLink .= '/' . $content->path; |
|
92 | + $frontLink .= '/'.$content->path; |
|
93 | 93 | |
94 | 94 | $actionMenu = $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'dropdown' => ['class' => 'btn-group btn-group-sm']], 2); |
95 | - if (!(bool)$content->display) { |
|
95 | + if (!(bool) $content->display) { |
|
96 | 96 | $actionMenu->add('<i class="fa fa-eye-slash" style="color: #ff0000;"></i>', ['content/display', [$content->id], ['status' => 1]], [ |
97 | 97 | 'html' => true, |
98 | 98 | 'class' => 'btn btn-light', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | ]); |
109 | 109 | } |
110 | 110 | |
111 | - if (!(bool)$content->important) { |
|
111 | + if (!(bool) $content->important) { |
|
112 | 112 | $actionMenu->add('<i class="fa fa-star-o"></i>', ['content/important', [$content->id], ['status' => 1]], [ |
113 | 113 | 'html' => true, |
114 | 114 | 'class' => 'btn btn-light', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $hiddenExist = true; |
139 | 139 | } |
140 | 140 | |
141 | - $contentInfo = '<div>' . Url::a(['content/update', [$content->id]], $content->getLocaled('title')) . '</div>'; |
|
141 | + $contentInfo = '<div>'.Url::a(['content/update', [$content->id]], $content->getLocaled('title')).'</div>'; |
|
142 | 142 | $contentInfo .= '<div class="small">'; |
143 | 143 | $contentInfo .= __('Category: <a href="%url%">%name%</a>', ['name' => $content->category->getLocaled('title'), 'url' => Url::to('content/categoryupdate', [$content->category_id])]); |
144 | 144 | $contentInfo .= '</div>'; |
@@ -54,8 +54,8 @@ |
||
54 | 54 | $table->row([ |
55 | 55 | ['text' => $row->id], |
56 | 56 | ['text' => $row->getLocaled('name')], |
57 | - ['text' => '<span class="' . $labelClass . '">' . $row->type . '</span>', 'html' => true], |
|
58 | - ['text' => '<code>' . ($row->reg_cond == 0 ? '!' : null) . 'preg_match("' . $row->reg_exp . '", input)' . '</code>', 'html' => true], |
|
57 | + ['text' => '<span class="'.$labelClass.'">'.$row->type.'</span>', 'html' => true], |
|
58 | + ['text' => '<code>'.($row->reg_cond == 0 ? '!' : null).'preg_match("'.$row->reg_exp.'", input)'.'</code>', 'html' => true], |
|
59 | 59 | ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
60 | 60 | ->add('<i class="fa fa-pencil"></i>', ['profile/fieldupdate', [$row->id]], ['class' => 'btn btn-primary', 'html' => true]) |
61 | 61 | ->add('<i class="fa fa-trash-o"></i>', ['profile/fielddelete', [$row->id]], ['class' => 'btn btn-danger', 'html' => true]) |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | // initialize model with answer add if thread is not closed |
43 | 43 | $model = null; |
44 | - if (!(bool)$record->closed) { |
|
44 | + if (!(bool) $record->closed) { |
|
45 | 45 | $model = new FormAnswerAdd($record); |
46 | 46 | if ($model->send()) { |
47 | 47 | if ($model->validate()) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | ['text' => $profile->user->email], |
43 | 43 | ['text' => $profile->nick], |
44 | 44 | ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], |
45 | - ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], |
|
45 | + ['text' => ($profile->rating > 0 ? '+' : null).$profile->rating], |
|
46 | 46 | ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
47 | 47 | ->add('<i class="fa fa-pencil"></i>', ['profile/update', [$profile->id]], ['html' => true, 'class' => 'btn btn-primary']) |
48 | 48 | ->add('<i class="fa fa-trash-o"></i>', ['user/delete', [$profile->user->id]], ['html' => true, 'class' => 'btn btn-danger']) |
@@ -30,28 +30,28 @@ discard block |
||
30 | 30 | <div class="card"> |
31 | 31 | <div class="card-header" style="background-color: #cadcee"> |
32 | 32 | <?php |
33 | - if (!(bool)$record->readed) { |
|
33 | + if (!(bool) $record->readed) { |
|
34 | 34 | echo '<i class="fa fa-bell"></i> '; |
35 | 35 | } |
36 | 36 | ?> |
37 | 37 | <?= __('Message sent') ?>: <?= Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?>. |
38 | 38 | <?php |
39 | - if (!(bool)$record->closed) { |
|
40 | - echo '<span class="badge badge-success">' . __('Opened') . '</span>'; |
|
39 | + if (!(bool) $record->closed) { |
|
40 | + echo '<span class="badge badge-success">'.__('Opened').'</span>'; |
|
41 | 41 | } else { |
42 | - echo '<span class="badge badge-danger">' . __('Closed') . '</span>'; |
|
42 | + echo '<span class="badge badge-danger">'.__('Closed').'</span>'; |
|
43 | 43 | } |
44 | 44 | ?> |
45 | 45 | <?php |
46 | 46 | $btngrp = $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm', 'role' => 'group'], 4); |
47 | 47 | |
48 | 48 | // show "mark as read" button if message is not readed |
49 | - if (!(bool)$record->readed) { |
|
49 | + if (!(bool) $record->readed) { |
|
50 | 50 | $btngrp->add('<i class="fa fa-bookmark-o"></i>', ['feedback/turn', ['read', $record->id]], ['class' => 'btn btn-success', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Mark as read')]); |
51 | 51 | } |
52 | 52 | |
53 | 53 | // show close/open button depend of current status |
54 | - if (!(bool)$record->closed) { |
|
54 | + if (!(bool) $record->closed) { |
|
55 | 55 | $btngrp->add('<i class="fa fa-eye-slash"></i>', ['feedback/turn', ['close', $record->id]], ['class' => 'btn btn-warning', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Close')]); |
56 | 56 | } else { |
57 | 57 | $btngrp->add('<i class="fa fa-eye"></i>', ['feedback/turn', ['open', $record->id]], ['class' => 'btn btn-info', 'html' => true, 'data-toggle' => 'tooltip', 'title' => __('Open')]); |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | </div> |
65 | 65 | <div class="card-body"> |
66 | 66 | <?php |
67 | - if ((bool)$record->closed) { |
|
68 | - echo '<p class="alert alert-warning">' . __('The feedback request is closed! Thread in only-read mode') . '.</p>'; |
|
67 | + if ((bool) $record->closed) { |
|
68 | + echo '<p class="alert alert-warning">'.__('The feedback request is closed! Thread in only-read mode').'.</p>'; |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | <p><?= Str::replace("\n", "<br />", $record->message) ?></p> |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | <div class="card-body"> |
81 | 81 | <?php |
82 | 82 | $uInfo = 'no'; |
83 | - if ((int)$record->user_id > 0) { |
|
83 | + if ((int) $record->user_id > 0) { |
|
84 | 84 | $user = \App::$User->identity($record->user_id); |
85 | 85 | if ($user && $user->getId() > 0) { |
86 | 86 | $uInfo = Url::a(['user/update', [$user->getId()]], $user->profile->getNickname()); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | <?php foreach ($record->answers as $answer): ?> |
104 | 104 | <div class="card"> |
105 | 105 | <div class="card-header"> |
106 | - <?= __('From') ?>: <?= $answer->name . '(' . $answer->email . ')' . ((int)$answer->user_id > 0 ? Url::a(['user/update', [$answer->user_id]], '[id' . $answer->user_id . ']') : null) ?>, |
|
106 | + <?= __('From') ?>: <?= $answer->name.'('.$answer->email.')'.((int) $answer->user_id > 0 ? Url::a(['user/update', [$answer->user_id]], '[id'.$answer->user_id.']') : null) ?>, |
|
107 | 107 | <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
108 | 108 | <div class="pull-right"> |
109 | 109 | <?= $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | <div class="table-responsive"> |
27 | 27 | <?= $this->table(['class' => 'table table-bordered']) |
28 | 28 | ->body([ |
29 | - [['text' => __('Sender')], ['text' => $record->name . ' (' . $record->email . ')']], |
|
29 | + [['text' => __('Sender')], ['text' => $record->name.' ('.$record->email.')']], |
|
30 | 30 | [['text' => __('Date')], ['text' => Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR)]], |
31 | 31 | [['text' => __('Message')], ['text' => $record->message]] |
32 | 32 | ])->display() ?> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <h1><?= __('Sitemap') ?></h1> |
21 | 21 | |
22 | 22 | <p><?= __('Sitemap its a special application to generate sitemap as xml file over sitemap standart for search engines.') ?></p> |
23 | -<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl . '/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
23 | +<p><?= __('Sitemap main index') ?>: <a href="<?= \App::$Alias->scriptUrl.'/sitemap' ?>" target="_blank">/sitemap</a></p> |
|
24 | 24 | <h3><?= __('Sitemap files') ?></h3> |
25 | 25 | <?php |
26 | 26 | $items = []; |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | |
33 | 33 | $list = $this->listing('ul'); |
34 | 34 | |
35 | -foreach($model->files as $file) { |
|
36 | - $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl . $file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]); |
|
35 | +foreach ($model->files as $file) { |
|
36 | + $list->li(['type' => 'link', 'link' => \Ffcms\Core\App::$Alias->scriptUrl.$file, 'text' => $file, 'linkProperties' => ['target' => '_blank']]); |
|
37 | 37 | } |
38 | 38 | echo $list->display(); |
39 | 39 | ?> |
@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | $this->data[$lang][] = [ |
56 | 56 | 'uri' => Url::stringUrl($uri, $lang), |
57 | 57 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
58 | - 'freq' => (string)$freq, |
|
59 | - 'priority' => (float)$priority |
|
58 | + 'freq' => (string) $freq, |
|
59 | + 'priority' => (float) $priority |
|
60 | 60 | ]; |
61 | 61 | } |
62 | 62 | } else { // only one language, multilanguage is disabled |
63 | 63 | $this->data[App::$Properties->get('singleLanguage')][] = [ |
64 | 64 | 'uri' => Url::stringUrl($uri), |
65 | 65 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
66 | - 'freq' => (string)$freq, |
|
67 | - 'priority' => (float)$priority |
|
66 | + 'freq' => (string) $freq, |
|
67 | + 'priority' => (float) $priority |
|
68 | 68 | ]; |
69 | 69 | } |
70 | 70 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'items' => $items |
88 | 88 | ]); |
89 | 89 | |
90 | - File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml); |
|
90 | + File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml); |
|
91 | 91 | } |
92 | 92 | return true; |
93 | 93 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function delete(string $type, ?string $id = null): ?string |
34 | 34 | { |
35 | 35 | // sounds like a multiply delete definition |
36 | - if (!$id || (int)$id < 1) { |
|
36 | + if (!$id || (int) $id < 1) { |
|
37 | 37 | $ids = $this->request->query->get('selected'); |
38 | 38 | if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) { |
39 | 39 | throw new NotFoundException('Bad conditions'); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($model->send() && $model->validate()) { |
69 | 69 | $model->make(); |
70 | 70 | App::$Session->getFlashBag()->add('success', __('Comments or answers are successful deleted!')); |
71 | - $this->response->redirect('comments/' . ($type === self::TYPE_ANSWER ? 'answerlist' : 'index')); |
|
71 | + $this->response->redirect('comments/'.($type === self::TYPE_ANSWER ? 'answerlist' : 'index')); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | // render view |