@@ -46,7 +46,7 @@ |
||
46 | 46 | ]); |
47 | 47 | |
48 | 48 | $configs->newcontent = serialize([ |
49 | - 'categories' => serialize(['2','3']), |
|
49 | + 'categories' => serialize(['2', '3']), |
|
50 | 50 | 'count' => '5', |
51 | 51 | 'cache' => '60' |
52 | 52 | ]); |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | date_default_timezone_set('Europe/Moscow'); |
12 | 12 | |
13 | 13 | return [ |
14 | - 'Database' => function () { |
|
14 | + 'Database' => function() { |
|
15 | 15 | $capsule = new Capsule; |
16 | 16 | if (env_name !== 'Install') { |
17 | 17 | try { |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | try { |
35 | 35 | $pdo = \App::$Database->connection()->getPdo(); |
36 | 36 | $handler = new PdoSessionHandler($pdo, [ |
37 | - 'db_table' => App::$Properties->get('database')['prefix'] . 'sessions' |
|
37 | + 'db_table' => App::$Properties->get('database')['prefix'].'sessions' |
|
38 | 38 | ]); |
39 | 39 | } catch (Exception $e) { |
40 | - $handler = new NativeFileSessionHandler(root . '/Private/Sessions'); |
|
40 | + $handler = new NativeFileSessionHandler(root.'/Private/Sessions'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $storage = new NativeSessionStorage([ |
@@ -48,18 +48,18 @@ discard block |
||
48 | 48 | |
49 | 49 | return new Session($storage); |
50 | 50 | }, |
51 | - 'User' => function () { |
|
51 | + 'User' => function() { |
|
52 | 52 | return new Apps\ActiveRecord\User(); |
53 | 53 | }, |
54 | - 'Mailer' => function () { |
|
54 | + 'Mailer' => function() { |
|
55 | 55 | $swiftTransport = Swift_MailTransport::newInstance(); |
56 | 56 | return Swift_Mailer::newInstance($swiftTransport); |
57 | 57 | }, |
58 | - 'Captcha' => function () { |
|
58 | + 'Captcha' => function() { |
|
59 | 59 | return new Extend\Core\Captcha\Gregwar(); |
60 | 60 | }, |
61 | - 'Cache' => function () { |
|
62 | - phpFastCache::setup('path', root . '/Private/Cache'); |
|
61 | + 'Cache' => function() { |
|
62 | + phpFastCache::setup('path', root.'/Private/Cache'); |
|
63 | 63 | return \phpFastCache(); |
64 | 64 | } |
65 | 65 | ]; |
66 | 66 | \ No newline at end of file |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | <?php |
26 | 26 | $items = []; |
27 | -foreach($records as $role) { |
|
27 | +foreach ($records as $role) { |
|
28 | 28 | $permissions = explode(';', $role->permissions); |
29 | 29 | $permissionsLabel = null; |
30 | 30 | foreach ($permissions as $perm) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } else { |
37 | 37 | $labelMark = 'label-default'; |
38 | 38 | } |
39 | - $permissionsLabel .= '<span class="label ' . $labelMark . '">' . $perm . '</span> '; |
|
39 | + $permissionsLabel .= '<span class="label '.$labelMark.'">'.$perm.'</span> '; |
|
40 | 40 | } |
41 | 41 | $items[] = [ |
42 | 42 | ['text' => $role->id], |
@@ -25,12 +25,12 @@ |
||
25 | 25 | $items = []; |
26 | 26 | foreach ($records as $user) { |
27 | 27 | $items[] = [ |
28 | - ['text' => $user->id . ($user->approve_token != '0' ? ' <strong class="text-danger">*</strong>' : null), 'html' => true], |
|
28 | + ['text' => $user->id.($user->approve_token != '0' ? ' <strong class="text-danger">*</strong>' : null), 'html' => true], |
|
29 | 29 | ['text' => $user->email], |
30 | 30 | ['text' => $user->login], |
31 | 31 | ['text' => $user->getRole()->name], |
32 | 32 | ['text' => Date::convertToDatetime($user->created_at, Date::FORMAT_TO_DAY)], |
33 | - ['text' => Url::link(['user/update', $user->id], '<i class="fa fa-pencil fa-lg"></i>') . |
|
33 | + ['text' => Url::link(['user/update', $user->id], '<i class="fa fa-pencil fa-lg"></i>'). |
|
34 | 34 | Url::link(['user/delete', $user->id], ' <i class="fa fa-trash-o fa-lg"></i>'), |
35 | 35 | 'html' => true, 'property' => ['class' => 'text-center']] |
36 | 36 | ]; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | <?php |
27 | 27 | if ($records === null || $records->count() < 1) { |
28 | - echo '<p class="alert alert-warning">' . __('Answers is not founded') . '</p>'; |
|
28 | + echo '<p class="alert alert-warning">'.__('Answers is not founded').'</p>'; |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | $items = []; |
@@ -33,19 +33,19 @@ discard block |
||
33 | 33 | $commentObject = $item->getCommentPost(); |
34 | 34 | $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75); |
35 | 35 | $userArr = []; |
36 | - if ((int)$item->user_id > 0 && \App::$User->isExist($item->user_id)) { |
|
36 | + if ((int) $item->user_id > 0 && \App::$User->isExist($item->user_id)) { |
|
37 | 37 | $userName = \App::$User->identity($item->user_id)->getProfile()->getNickname(); |
38 | 38 | $userArr = ['text' => Url::link(['user/update', $item->user_id], $userName), 'html' => true]; |
39 | 39 | } |
40 | 40 | |
41 | 41 | $items[] = [ |
42 | 42 | 1 => ['text' => $item->id], |
43 | - 2 => ['text' => Url::link(['comments/read', $commentObject->id, null, ['#' => '#answer-' . $item->id]], $message), 'html' => true], |
|
43 | + 2 => ['text' => Url::link(['comments/read', $commentObject->id, null, ['#' => '#answer-'.$item->id]], $message), 'html' => true], |
|
44 | 44 | 3 => $userArr, |
45 | - 4 => ['text' => '<a href="' . App::$Alias->scriptUrl . $commentObject->pathway . '" target="_blank">' . Str::sub($commentObject->pathway, 0, 20) . '...</a>', 'html' => true], |
|
45 | + 4 => ['text' => '<a href="'.App::$Alias->scriptUrl.$commentObject->pathway.'" target="_blank">'.Str::sub($commentObject->pathway, 0, 20).'...</a>', 'html' => true], |
|
46 | 46 | 5 => ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)], |
47 | - 6 => ['text' => Url::link(['comments/read', $commentObject->id], '<i class="fa fa-list fa-lg"></i>') . |
|
48 | - ' ' . Url::link(['comments/delete', 'answer', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
|
47 | + 6 => ['text' => Url::link(['comments/read', $commentObject->id], '<i class="fa fa-list fa-lg"></i>'). |
|
48 | + ' '.Url::link(['comments/delete', 'answer', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
|
49 | 49 | 'html' => true, 'property' => ['class' => 'text-center']], |
50 | 50 | 'property' => ['class' => 'checkbox-row'] |
51 | 51 | ]; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $author = Url::link(['user/update', $record->user_id], $author); |
29 | 29 | } |
30 | 30 | ?> |
31 | - <?= $author . ', ' . Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?> |
|
31 | + <?= $author.', '.Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?> |
|
32 | 32 | <div class="pull-right"> |
33 | 33 | <?= Url::link(['comments/edit', 'comment', $record->id], __('Edit'), ['class' => 'label label-primary']) ?> |
34 | 34 | <?= Url::link(['comments/delete', 'comment', $record->id], __('Delete'), ['class' => 'label label-danger']) ?> |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | <div class="panel-heading"> |
55 | 55 | <?php |
56 | 56 | $answerAuthor = Simplify::parseUserNick($answer->user_id, $answer->guest_name); |
57 | - if ((int)$answer->user_id > 0) { |
|
57 | + if ((int) $answer->user_id > 0) { |
|
58 | 58 | $answerAuthor = Url::link(['user/update', $answer->user_id], $answerAuthor); |
59 | 59 | } |
60 | 60 | ?> |
61 | - <?= $answerAuthor . ', ' . Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
|
61 | + <?= $answerAuthor.', '.Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
|
62 | 62 | <div class="pull-right"> |
63 | 63 | <?= Url::link(['comments/edit', 'answer', $answer->id], __('Edit'), ['class' => 'label label-primary']) ?> |
64 | 64 | <?= Url::link(['comments/delete', 'answer', $answer->id], __('Delete'), ['class' => 'label label-danger']) ?> |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | |
25 | 25 | <?php |
26 | 26 | if ($records === null || $records->count() < 1) { |
27 | - echo '<p class="alert alert-warning">' . __('Comments is not founded') . '</p>'; |
|
27 | + echo '<p class="alert alert-warning">'.__('Comments is not founded').'</p>'; |
|
28 | 28 | return; |
29 | 29 | } |
30 | 30 | $items = []; |
31 | 31 | foreach ($records as $item) { |
32 | 32 | $message = Text::cut(\App::$Security->strip_tags($item->message), 0, 75); |
33 | 33 | $userArr = []; |
34 | - if ((int)$item->user_id > 0 && \App::$User->isExist($item->user_id)) { |
|
34 | + if ((int) $item->user_id > 0 && \App::$User->isExist($item->user_id)) { |
|
35 | 35 | $userName = \App::$User->identity($item->user_id)->getProfile()->getNickname(); |
36 | 36 | $userArr = ['text' => Url::link(['user/update', $item->user_id], $userName), 'html' => true]; |
37 | 37 | } |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | 2 => ['text' => Url::link(['comments/read', $item->id], $message), 'html' => true], |
42 | 42 | 3 => ['text' => $item->getAnswerCount()], |
43 | 43 | 4 => $userArr, |
44 | - 5 => ['text' => '<a href="' . App::$Alias->scriptUrl . $item->pathway . '" target="_blank">' . Str::sub($item->pathway, 0, 20) . '...</a>', 'html' => true], |
|
44 | + 5 => ['text' => '<a href="'.App::$Alias->scriptUrl.$item->pathway.'" target="_blank">'.Str::sub($item->pathway, 0, 20).'...</a>', 'html' => true], |
|
45 | 45 | 6 => ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)], |
46 | - 7 => ['text' => Url::link(['comments/read', $item->id], '<i class="fa fa-list fa-lg"></i>') . |
|
47 | - ' ' . Url::link(['comments/delete', 'comment', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
|
46 | + 7 => ['text' => Url::link(['comments/read', $item->id], '<i class="fa fa-list fa-lg"></i>'). |
|
47 | + ' '.Url::link(['comments/delete', 'comment', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
|
48 | 48 | 'html' => true, 'property' => ['class' => 'text-center']], |
49 | 49 | 'property' => ['class' => 'checkbox-row'] |
50 | 50 | ]; |
@@ -30,9 +30,9 @@ |
||
30 | 30 | if (Obj::isArray($notify) && count($notify) > 0) { |
31 | 31 | foreach ($notify as $type => $messages) { |
32 | 32 | foreach ($messages as $message) { |
33 | - echo '<p class="alert ' . type2html($type) . '"> |
|
33 | + echo '<p class="alert '.type2html($type).'"> |
|
34 | 34 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' |
35 | - . \Ffcms\Core\App::$Security->strip_tags($message) . '</p>'; |
|
35 | + . \Ffcms\Core\App::$Security->strip_tags($message).'</p>'; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php use Ffcms\Core\Helper\Url; |
2 | 2 | |
3 | 3 | if ($controller !== null): ?> |
4 | -<a href="<?= Url::to($controller . '/index') ?>"><i class="fa fa-cogs"></i></a> |
|
4 | +<a href="<?= Url::to($controller.'/index') ?>"><i class="fa fa-cogs"></i></a> |
|
5 | 5 | <a href="<?= Url::to('application/turn', $controller) ?>"><i class="fa fa-power-off"></i></a> |
6 | 6 | <?php endif; ?> |
7 | 7 | \ No newline at end of file |