@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | public $captcha; |
23 | 23 | |
24 | 24 | /** |
25 | - * Labels for visual display |
|
26 | - */ |
|
25 | + * Labels for visual display |
|
26 | + */ |
|
27 | 27 | public function labels() |
28 | 28 | { |
29 | 29 | return [ |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | - * Validation rules |
|
37 | - */ |
|
36 | + * Validation rules |
|
37 | + */ |
|
38 | 38 | public function rules() |
39 | 39 | { |
40 | 40 | return [ |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | - * Parse public attribute values from input object data |
|
35 | - */ |
|
34 | + * Parse public attribute values from input object data |
|
35 | + */ |
|
36 | 36 | public function before() |
37 | 37 | { |
38 | 38 | $this->name = $this->_role->name; |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Display labels data |
|
45 | + * Display labels data |
|
46 | 46 | * @return array |
47 | - */ |
|
47 | + */ |
|
48 | 48 | public function labels() |
49 | 49 | { |
50 | 50 | return [ |
@@ -95,5 +95,5 @@ |
||
95 | 95 | </div> |
96 | 96 | <?php if (count($staticItems) < 1 && count($dynamicItems) < 1): ?> |
97 | 97 | <p class="alert alert-warning"><?= __('Custom routes is not yet found') ?></p> |
98 | -<?php endif ;?> |
|
99 | -<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> ' . __('New route'), ['class' => 'btn btn-primary']) ?> |
|
100 | 98 | \ No newline at end of file |
99 | +<?php endif; ?> |
|
100 | +<?= Url::link(['main/addroute'], '<i class="fa fa-plus"></i> '.__('New route'), ['class' => 'btn btn-primary']) ?> |
|
101 | 101 | \ No newline at end of file |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | $scan = File::listFiles(static::INDEX_PATH, ['.xml'], true); |
48 | 48 | if (Obj::isArray($scan)) { |
49 | 49 | foreach ($scan as $file) { |
50 | - if (!Str::contains('.' . $this->_lang, $file)) { |
|
50 | + if (!Str::contains('.'.$this->_lang, $file)) { |
|
51 | 51 | continue; |
52 | 52 | } |
53 | - $this->files[] = static::INDEX_PATH . '/' . $file; |
|
53 | + $this->files[] = static::INDEX_PATH.'/'.$file; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | // build file information data |
68 | 68 | foreach ($this->files as $file) { |
69 | 69 | $this->info[] = [ |
70 | - 'loc' => App::$Alias->scriptUrl . $file, |
|
70 | + 'loc' => App::$Alias->scriptUrl.$file, |
|
71 | 71 | 'lastmod' => Date::convertToDatetime(File::mTime($file), 'c') |
72 | 72 | ]; |
73 | 73 | } |
@@ -52,16 +52,16 @@ discard block |
||
52 | 52 | $this->data[$lang][] = [ |
53 | 53 | 'uri' => Url::standaloneUrl($uri, $lang), |
54 | 54 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
55 | - 'freq' => (string)$freq, |
|
56 | - 'priority' => (float)$priority |
|
55 | + 'freq' => (string) $freq, |
|
56 | + 'priority' => (float) $priority |
|
57 | 57 | ]; |
58 | 58 | } |
59 | 59 | } else { // only one language, multilanguage is disabled |
60 | 60 | $this->data[App::$Properties->get('singleLanguage')][] = [ |
61 | 61 | 'uri' => Url::standaloneUrl($uri), |
62 | 62 | 'lastmod' => Date::convertToDatetime($lastmod, 'c'), |
63 | - 'freq' => (string)$freq, |
|
64 | - 'priority' => (float)$priority |
|
63 | + 'freq' => (string) $freq, |
|
64 | + 'priority' => (float) $priority |
|
65 | 65 | ]; |
66 | 66 | } |
67 | 67 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'items' => $items |
87 | 87 | ]); |
88 | 88 | |
89 | - File::write(EntityIndexList::INDEX_PATH . '/' . $uniqueName . '.' . $lang . '.xml', $xml); |
|
89 | + File::write(EntityIndexList::INDEX_PATH.'/'.$uniqueName.'.'.$lang.'.xml', $xml); |
|
90 | 90 | } |
91 | 91 | return true; |
92 | 92 | } |
@@ -1,40 +1,40 @@ |
||
1 | 1 | <?php return [ |
2 | - 'baseProto' => 'http', |
|
3 | - 'baseDomain' => 'ffcms.app', |
|
4 | - 'basePath' => '/', |
|
5 | - 'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$', |
|
6 | - 'timezone' => 'Europe/Moscow', |
|
7 | - 'debug' => [ |
|
8 | - 'all' => false, |
|
9 | - 'cookie' => [ |
|
10 | - 'key' => 'fdebug_jepP2', |
|
11 | - 'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA' |
|
12 | - ] |
|
13 | - ], |
|
14 | - 'theme' => [ |
|
15 | - 'Front' => 'default', |
|
16 | - 'Admin' => 'default' |
|
17 | - ], |
|
18 | - 'database' => [ |
|
19 | - 'driver' => 'mysql', |
|
20 | - 'host' => '127.0.0.1', |
|
21 | - 'username' => 'mysql', |
|
22 | - 'password' => 'mysql', |
|
23 | - 'database' => 'ffcms', |
|
24 | - 'prefix' => 'ffcms_', |
|
25 | - 'charset' => 'utf8', |
|
26 | - 'collation' => 'utf8_unicode_ci' |
|
27 | - ], |
|
28 | - 'adminEmail' => '[email protected]', |
|
29 | - 'baseLanguage' => 'en', |
|
30 | - 'multiLanguage' => true, |
|
31 | - 'singleLanguage' => 'en', |
|
32 | - 'languages' => [ |
|
33 | - 'en', |
|
34 | - 'ru' |
|
35 | - ], |
|
36 | - 'languageDomainAlias' => false, |
|
37 | - 'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com', |
|
38 | - 'gaTrackId' => false, |
|
39 | - 'trustedProxy' => false |
|
2 | + 'baseProto' => 'http', |
|
3 | + 'baseDomain' => 'ffcms.app', |
|
4 | + 'basePath' => '/', |
|
5 | + 'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$', |
|
6 | + 'timezone' => 'Europe/Moscow', |
|
7 | + 'debug' => [ |
|
8 | + 'all' => false, |
|
9 | + 'cookie' => [ |
|
10 | + 'key' => 'fdebug_jepP2', |
|
11 | + 'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA' |
|
12 | + ] |
|
13 | + ], |
|
14 | + 'theme' => [ |
|
15 | + 'Front' => 'default', |
|
16 | + 'Admin' => 'default' |
|
17 | + ], |
|
18 | + 'database' => [ |
|
19 | + 'driver' => 'mysql', |
|
20 | + 'host' => '127.0.0.1', |
|
21 | + 'username' => 'mysql', |
|
22 | + 'password' => 'mysql', |
|
23 | + 'database' => 'ffcms', |
|
24 | + 'prefix' => 'ffcms_', |
|
25 | + 'charset' => 'utf8', |
|
26 | + 'collation' => 'utf8_unicode_ci' |
|
27 | + ], |
|
28 | + 'adminEmail' => '[email protected]', |
|
29 | + 'baseLanguage' => 'en', |
|
30 | + 'multiLanguage' => true, |
|
31 | + 'singleLanguage' => 'en', |
|
32 | + 'languages' => [ |
|
33 | + 'en', |
|
34 | + 'ru' |
|
35 | + ], |
|
36 | + 'languageDomainAlias' => false, |
|
37 | + 'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com', |
|
38 | + 'gaTrackId' => false, |
|
39 | + 'trustedProxy' => false |
|
40 | 40 | ]; |
41 | 41 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php return [ |
2 | - 'instances' => [ |
|
3 | - 'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800, |
|
4 | - 'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800 |
|
5 | - ] |
|
2 | + 'instances' => [ |
|
3 | + 'Apps\Controller\Front\Content::buildSitemapSchedule' => 10800, |
|
4 | + 'Apps\Controller\Front\Profile::buildSitemapSchedule' => 10800 |
|
5 | + ] |
|
6 | 6 | ]; |
7 | 7 | \ No newline at end of file |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $records = null; |
48 | 48 | |
49 | 49 | // set current page and offset |
50 | - $page = (int)App::$Request->query->get('page'); |
|
50 | + $page = (int) App::$Request->query->get('page'); |
|
51 | 51 | $cfgs = Serialize::decode($this->application->configs); |
52 | - $userPerPage = (int)$cfgs['usersOnPage']; |
|
52 | + $userPerPage = (int) $cfgs['usersOnPage']; |
|
53 | 53 | if ($userPerPage < 1) { |
54 | 54 | $userPerPage = 1; |
55 | 55 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | switch ($filter_name) { |
59 | 59 | case 'rating': // rating list, order by rating DESC |
60 | 60 | // check if rating is enabled |
61 | - if ((int)$cfgs['rating'] !== 1) { |
|
61 | + if ((int) $cfgs['rating'] !== 1) { |
|
62 | 62 | throw new NotFoundException(); |
63 | 63 | } |
64 | 64 | $records = (new ProfileRecords())->orderBy('rating', 'DESC'); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | if (Str::likeEmpty($filter_value)) { |
68 | 68 | throw new NotFoundException(); |
69 | 69 | } |
70 | - $records = (new ProfileRecords())->where('hobby', 'like', '%' . $filter_value . '%'); |
|
70 | + $records = (new ProfileRecords())->where('hobby', 'like', '%'.$filter_value.'%'); |
|
71 | 71 | break; |
72 | 72 | case 'city': |
73 | 73 | if (Str::likeEmpty($filter_value)) { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if ($filter_value === null || !Obj::isLikeInt($filter_value)) { |
80 | 80 | throw new NotFoundException(); |
81 | 81 | } |
82 | - $records = (new ProfileRecords())->where('birthday', 'like', $filter_value . '-%'); |
|
82 | + $records = (new ProfileRecords())->where('birthday', 'like', $filter_value.'-%'); |
|
83 | 83 | break; |
84 | 84 | case 'all': |
85 | 85 | $records = (new ProfileRecords())->orderBy('id', 'DESC'); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'pagination' => $pagination, |
103 | 103 | 'id' => $filter_name, |
104 | 104 | 'add' => $filter_value, |
105 | - 'ratingOn' => (int)$cfgs['rating'] |
|
105 | + 'ratingOn' => (int) $cfgs['rating'] |
|
106 | 106 | ]); |
107 | 107 | } |
108 | 108 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public function actionShow($userId) |
119 | 119 | { |
120 | 120 | $cfg = Serialize::decode($this->application->configs); |
121 | - if ((int)$cfg['guestView'] !== 1 && !App::$User->isAuth()) { |
|
121 | + if ((int) $cfg['guestView'] !== 1 && !App::$User->isAuth()) { |
|
122 | 122 | throw new ForbiddenException(__('You must login to view other profile')); |
123 | 123 | } |
124 | 124 | // check if target exists |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | App::$Session->getFlashBag()->add('error', __('This user are in your black list or you are in blacklist!')); |
141 | 141 | } else { |
142 | 142 | // check if message added |
143 | - if ($wallModel->makePost($targetPersone, $viewerPersone, (int)$cfg['delayBetweenPost'])) { |
|
143 | + if ($wallModel->makePost($targetPersone, $viewerPersone, (int) $cfg['delayBetweenPost'])) { |
|
144 | 144 | App::$Session->getFlashBag()->add('success', __('The message was successful posted!')); |
145 | 145 | } else { |
146 | 146 | App::$Session->getFlashBag()->add('warning', __('Posting message was failed! You need to wait some time...')); |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | |
152 | 152 | $query = $targetPersone->getWall(); // relation hasMany from users to walls |
153 | 153 | // pagination and query params |
154 | - $wallPage = (int)App::$Request->query->get('page'); |
|
155 | - $wallItems = (int)$cfg['wallPostOnPage']; |
|
154 | + $wallPage = (int) App::$Request->query->get('page'); |
|
155 | + $wallItems = (int) $cfg['wallPostOnPage']; |
|
156 | 156 | $wallOffset = $wallPage * $wallItems; |
157 | 157 | |
158 | 158 | // build pagination |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | 'notify' => App::$Session->getFlashBag()->all(), |
175 | 175 | 'wallRecords' => $wallRecords, |
176 | 176 | 'pagination' => $wallPagination, |
177 | - 'ratingOn' => (int)$cfg['rating'] === 1 |
|
177 | + 'ratingOn' => (int) $cfg['rating'] === 1 |
|
178 | 178 | ]); |
179 | 179 | } |
180 | 180 | |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $wallModel = new FormWallPostDelete($wallPost); |
247 | 247 | if ($wallModel->send() && $wallModel->validate()) { |
248 | 248 | $wallModel->make(); |
249 | - App::$Response->redirect('profile/show/' . $wallPost->target_id); |
|
249 | + App::$Response->redirect('profile/show/'.$wallPost->target_id); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | return App::$View->render('wall_delete', [ |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | // set user id from ?id= get param if form not sended |
353 | 353 | if (!$model->send()) { |
354 | - $uid = (int)App::$Request->query->get('id'); |
|
354 | + $uid = (int) App::$Request->query->get('id'); |
|
355 | 355 | if ($uid > 0) { |
356 | 356 | $model->id = $uid; |
357 | 357 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | // get blocked users |
370 | 370 | $records = Blacklist::where('user_id', '=', $user->getId()); |
371 | 371 | |
372 | - $page = (int)App::$Request->query->get('page'); |
|
372 | + $page = (int) App::$Request->query->get('page'); |
|
373 | 373 | $offset = $page * self::BLOCK_PER_PAGE; |
374 | 374 | |
375 | 375 | // build pagination |
@@ -474,9 +474,9 @@ discard block |
||
474 | 474 | // check if request is sended |
475 | 475 | if ($model->send() && $model->validate()) { |
476 | 476 | // get records from db |
477 | - $records = ProfileRecords::where('nick', 'like', '%' . $model->query . '%'); |
|
478 | - $page = (int)App::$Request->query->get('page'); |
|
479 | - $userPerPage = (int)$cfgs['usersOnPage']; |
|
477 | + $records = ProfileRecords::where('nick', 'like', '%'.$model->query.'%'); |
|
478 | + $page = (int) App::$Request->query->get('page'); |
|
479 | + $userPerPage = (int) $cfgs['usersOnPage']; |
|
480 | 480 | if ($userPerPage < 1) { |
481 | 481 | $userPerPage = 1; |
482 | 482 | } |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | 'model' => $model->filter(), |
499 | 499 | 'records' => $records, |
500 | 500 | 'pagination' => $pagination, |
501 | - 'ratingOn' => (int)$cfgs['rating'] |
|
501 | + 'ratingOn' => (int) $cfgs['rating'] |
|
502 | 502 | ]); |
503 | 503 | } |
504 | 504 | |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | // build sitemap from content items via business model |
523 | 523 | $sitemap = new EntityBuildMap($langs); |
524 | 524 | foreach ($profiles->get() as $user) { |
525 | - $sitemap->add('profile/show/' . $user->user_id, $user->updated_at, 'weekly', 0.2); |
|
525 | + $sitemap->add('profile/show/'.$user->user_id, $user->updated_at, 'weekly', 0.2); |
|
526 | 526 | } |
527 | 527 | |
528 | 528 | $sitemap->save('profile'); |