@@ -52,8 +52,8 @@ |
||
| 52 | 52 | throw new NativeException('Password is bad'); |
| 53 | 53 | } |
| 54 | 54 | echo "RoleId (1 = user, 3 = admin):"; |
| 55 | - $role = (int)App::$Input->read(); |
|
| 56 | - if (!Arr::in($role, [1,2,3])) { |
|
| 55 | + $role = (int) App::$Input->read(); |
|
| 56 | + if (!Arr::in($role, [1, 2, 3])) { |
|
| 57 | 57 | $role = 1; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Get target user for current record |
| 44 | - * @return bool|\Illuminate\Support\Collection|null|static |
|
| 44 | + * @return null|\Ffcms\Core\Interfaces\iUser |
|
| 45 | 45 | */ |
| 46 | 46 | public function getUser() |
| 47 | 47 | { |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** @var $body string */ |
| 3 | -use Ffcms\Core\Helper\HTML\Listing; |
|
| 4 | 3 | use Ffcms\Core\Helper\Type\Obj; |
| 5 | 4 | ?> |
| 6 | 5 | <!DOCTYPE html> |
@@ -20,9 +20,9 @@ discard block |
||
| 20 | 20 | // set header |
| 21 | 21 | $this->setJsonHeader(); |
| 22 | 22 | // offset can be only integer |
| 23 | - $offset = (int)$offset; |
|
| 23 | + $offset = (int) $offset; |
|
| 24 | 24 | // get comment target path and check |
| 25 | - $path = (string)App::$Request->query->get('path'); |
|
| 25 | + $path = (string) App::$Request->query->get('path'); |
|
| 26 | 26 | if (Str::likeEmpty($path)) { |
| 27 | 27 | throw new JsonException('Wrong path'); |
| 28 | 28 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function actionShowanswers($commentId) |
| 76 | 76 | { |
| 77 | 77 | // check input data |
| 78 | - if (!Obj::isLikeInt($commentId) || (int)$commentId < 1) { |
|
| 78 | + if (!Obj::isLikeInt($commentId) || (int) $commentId < 1) { |
|
| 79 | 79 | throw new JsonException('Input data is incorrect'); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | ]); |
| 55 | 55 | ?> |
| 56 | 56 | |
| 57 | -<?php if($model->checkAll()): ?> |
|
| 57 | +<?php if ($model->checkAll()): ?> |
|
| 58 | 58 | <?= \Ffcms\Core\Helper\Url::link('main/install', __('Start install'), ['class' => 'btn btn-success btn-block']) ?> |
| 59 | 59 | <?php else: ?> |
| 60 | 60 | <?= \Ffcms\Core\Helper\Url::link('main/index', __('Check again'), ['class' => 'btn btn-warning btn-block']) ?> |
@@ -56,7 +56,10 @@ |
||
| 56 | 56 | |
| 57 | 57 | <?php if($model->checkAll()): ?> |
| 58 | 58 | <?= \Ffcms\Core\Helper\Url::link('main/install', __('Start install'), ['class' => 'btn btn-success btn-block']) ?> |
| 59 | -<?php else: ?> |
|
| 59 | +<?php else { |
|
| 60 | + : ?> |
|
| 60 | 61 | <?= \Ffcms\Core\Helper\Url::link('main/index', __('Check again'), ['class' => 'btn btn-warning btn-block']) ?> |
| 61 | -<?php endif; ?> |
|
| 62 | +<?php endif; |
|
| 63 | +} |
|
| 64 | +?> |
|
| 62 | 65 | |
@@ -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 { |
@@ -45,17 +45,17 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | return new Session($storage); |
| 47 | 47 | }, |
| 48 | - 'User' => function () { |
|
| 48 | + 'User' => function() { |
|
| 49 | 49 | return new Apps\ActiveRecord\User(); |
| 50 | 50 | }, |
| 51 | - 'Mailer' => function () { |
|
| 51 | + 'Mailer' => function() { |
|
| 52 | 52 | $swiftTransport = Swift_MailTransport::newInstance(); |
| 53 | 53 | return Swift_Mailer::newInstance($swiftTransport); |
| 54 | 54 | }, |
| 55 | - 'Captcha' => function () { |
|
| 55 | + 'Captcha' => function() { |
|
| 56 | 56 | return new Extend\Core\Captcha\Gregwar(); |
| 57 | 57 | }, |
| 58 | - 'Cache' => function () { |
|
| 58 | + 'Cache' => function() { |
|
| 59 | 59 | phpFastCache::setup('path', root . '/Private/Cache'); |
| 60 | 60 | return \phpFastCache(); |
| 61 | 61 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | Illuminate\Database\Capsule\Manager::schema($connectName)->create('sessions', function($table) { |
| 4 | - $table->string('sess_id', 128)->index()->primary() ; |
|
| 4 | + $table->string('sess_id', 128)->index()->primary(); |
|
| 5 | 5 | $table->binary('sess_data'); |
| 6 | 6 | $table->string('sess_lifetime', 16); // shutout to laravel, if i make it like "integer" it automaticlly add "primary" key for it, hate this!!! |
| 7 | 7 | $table->string('sess_time', 16); |