@@ -13,11 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | <?php if (App::$Captcha->isFull()): ?> |
| 15 | 15 | <div class="col-md-9 offset-md-3"><?= $html ?></div> |
| 16 | -<?php else: ?> |
|
| 16 | +<?php else { |
|
| 17 | + : ?> |
|
| 17 | 18 | <div class="row"> |
| 18 | 19 | <div class="col-md-9 offset-md-3"> |
| 19 | 20 | <img src="<?= $html ?>" alt="captcha" onClick="this.src='<?=$html?>&rnd='+Math.random()" /> |
| 20 | 21 | </div> |
| 21 | 22 | </div> |
| 22 | 23 | <?= $form->fieldset()->text($name, null, __('Enter data from security image to prove that you are human. If you can\'t read symbols - click on image to reload')) ?> |
| 23 | -<?php endif; ?> |
|
| 24 | 24 | \ No newline at end of file |
| 25 | +<?php endif; |
|
| 26 | +} |
|
| 27 | +?> |
|
| 25 | 28 | \ No newline at end of file |
@@ -13,11 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | <?php if (App::$Captcha->isFull()): ?> |
| 15 | 15 | <div class="col-md-9 offset-md-3"><?= $html ?></div> |
| 16 | -<?php else: ?> |
|
| 16 | +<?php else { |
|
| 17 | + : ?> |
|
| 17 | 18 | <div class="row"> |
| 18 | 19 | <div class="col-md-9 offset-md-3"> |
| 19 | 20 | <img src="<?= $html ?>" alt="captcha" onClick="this.src='<?=$html?>&rnd='+Math.random()" /> |
| 20 | 21 | </div> |
| 21 | 22 | </div> |
| 22 | 23 | <?= $form->fieldset()->text($name, null, __('Enter data from security image to prove that you are human. If you can\'t read symbols - click on image to reload')) ?> |
| 23 | -<?php endif; ?> |
|
| 24 | 24 | \ No newline at end of file |
| 25 | +<?php endif; |
|
| 26 | +} |
|
| 27 | +?> |
|
| 25 | 28 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $record = new Invite(); |
| 24 | 24 | |
| 25 | 25 | // set current page num and offset |
| 26 | - $page = (int)$this->request->query->get('page', 0); |
|
| 26 | + $page = (int) $this->request->query->get('page', 0); |
|
| 27 | 27 | $offset = $page * self::ITEM_PER_PAGE; |
| 28 | 28 | |
| 29 | 29 | // prepare pagination data |
@@ -91,18 +91,18 @@ discard block |
||
| 91 | 91 | $user = App::$User->identity(); |
| 92 | 92 | // user is not authed ? |
| 93 | 93 | if ($user === null || !App::$User->isAuth()) { |
| 94 | - $redirectUrl = App::$Alias->scriptUrl . '/user/login'; |
|
| 94 | + $redirectUrl = App::$Alias->scriptUrl.'/user/login'; |
|
| 95 | 95 | App::$Response->redirect($redirectUrl, true); |
| 96 | 96 | exit(); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - $permission = env_name . '/' . App::$Request->getController() . '/' . App::$Request->getAction(); |
|
| 99 | + $permission = env_name.'/'.App::$Request->getController().'/'.App::$Request->getAction(); |
|
| 100 | 100 | |
| 101 | 101 | // doesn't have permission? get the f*ck out |
| 102 | 102 | if (!$user->role->can($permission)) { |
| 103 | 103 | App::$Session->invalidate(); |
| 104 | 104 | |
| 105 | - $redirectUrl = App::$Alias->scriptUrl . '/user/login'; |
|
| 105 | + $redirectUrl = App::$Alias->scriptUrl.'/user/login'; |
|
| 106 | 106 | App::$Response->redirect($redirectUrl, true); |
| 107 | 107 | exit(); |
| 108 | 108 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function getConfigs(): ?array |
| 153 | 153 | { |
| 154 | - $configs = $this->type === 'widget' ? (array)$this->widget->configs : (array)$this->application->configs; |
|
| 154 | + $configs = $this->type === 'widget' ? (array) $this->widget->configs : (array) $this->application->configs; |
|
| 155 | 155 | foreach ($configs as $cfg => $value) { |
| 156 | 156 | if (Any::isInt($value)) { |
| 157 | 157 | $configs[$cfg] = $value; |
@@ -13,11 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | <?php if (App::$Captcha->isFull()): ?> |
| 15 | 15 | <div class="col-md-9 offset-md-3"><?= $html ?></div> |
| 16 | -<?php else: ?> |
|
| 16 | +<?php else { |
|
| 17 | + : ?> |
|
| 17 | 18 | <div class="row"> |
| 18 | 19 | <div class="col-md-9 offset-md-3"> |
| 19 | 20 | <img src="<?= $html ?>" alt="captcha" onClick="this.src='<?=$html?>&rnd='+Math.random()" /> |
| 20 | 21 | </div> |
| 21 | 22 | </div> |
| 22 | 23 | <?= $form->fieldset()->text($name, null, __('Enter data from security image to prove that you are human. If you can\'t read symbols - click on image to reload')) ?> |
| 23 | -<?php endif; ?> |
|
| 24 | 24 | \ No newline at end of file |
| 25 | +<?php endif; |
|
| 26 | +} |
|
| 27 | +?> |
|
| 25 | 28 | \ No newline at end of file |
@@ -97,9 +97,12 @@ |
||
| 97 | 97 | <a href="#license" class="btn btn-success btn-block disabled" id="install-link"><?= __('Start install') ?></a> |
| 98 | 98 | </div> |
| 99 | 99 | </div> |
| 100 | -<?php else: ?> |
|
| 100 | +<?php else { |
|
| 101 | + : ?> |
|
| 101 | 102 | <?= \Ffcms\Templex\Url\Url::a(['main/index'], __('Check again'), ['class' => 'btn btn-warning btn-block']) ?> |
| 102 | -<?php endif; ?> |
|
| 103 | +<?php endif; |
|
| 104 | +} |
|
| 105 | +?> |
|
| 103 | 106 | <script> |
| 104 | 107 | $(document).ready(function () { |
| 105 | 108 | $('#agree-license').change(function () { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $allCfg['adminEmail'] = $email; |
| 125 | 125 | $allCfg['baseDomain'] = $domain; |
| 126 | 126 | $output->writeln('Generate security cookies for debug panel'); |
| 127 | - $allCfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(8, 32)); |
|
| 127 | + $allCfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(8, 32)); |
|
| 128 | 128 | $allCfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
| 129 | 129 | // write config data |
| 130 | 130 | $writeCfg = Console::$Properties->writeConfig('default', $allCfg); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | return; |
| 134 | 134 | } |
| 135 | 135 | File::write('/Private/Install/install.lock', 'Install is locked'); |
| 136 | - $output->writeln('Congratulations! FFCMS are successful installed. Used version: ' . Version::VERSION . ' since ' . Version::DATE); |
|
| 136 | + $output->writeln('Congratulations! FFCMS are successful installed. Used version: '.Version::VERSION.' since '.Version::DATE); |
|
| 137 | 137 | $output->writeln(''); |
| 138 | 138 | $output->writeln('> Please, use "php console.php main:adduser" to add admin account(set role=4) or you are unavailable to manage cms.'); |
| 139 | 139 | } |
@@ -105,14 +105,14 @@ |
||
| 105 | 105 | $cfg['baseDomain'] = $this->baseDomain; |
| 106 | 106 | $cfg['database'] = $this->db; |
| 107 | 107 | $cfg['singleLanguage'] = $this->singleLanguage; |
| 108 | - $cfg['multiLanguage'] = (bool)$this->multiLanguage; |
|
| 109 | - $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$'; |
|
| 110 | - $cfg['debug']['cookie']['key'] = 'fdebug_' . Crypt::randomString(mt_rand(4, 16)); |
|
| 108 | + $cfg['multiLanguage'] = (bool) $this->multiLanguage; |
|
| 109 | + $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$'; |
|
| 110 | + $cfg['debug']['cookie']['key'] = 'fdebug_'.Crypt::randomString(mt_rand(4, 16)); |
|
| 111 | 111 | $cfg['debug']['cookie']['value'] = Crypt::randomString(mt_rand(32, 128)); |
| 112 | 112 | $cfg['mail'] = $this->mail; |
| 113 | 113 | |
| 114 | 114 | // initialize migrations table |
| 115 | - App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function ($table) { |
|
| 115 | + App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function($table) { |
|
| 116 | 116 | $table->increments('id'); |
| 117 | 117 | $table->string('migration', 128)->unique(); |
| 118 | 118 | $table->timestamps(); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | <?php |
| 8 | 8 | $menu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs nav-fill']) |
| 9 | 9 | ->menu(['text' => __('User list'), 'link' => ['user/index']]); |
| 10 | -if ((int)$configs['registrationType'] === 0) { |
|
| 10 | +if ((int) $configs['registrationType'] === 0) { |
|
| 11 | 11 | $menu->menu(['text' => __('Invitation list'), 'link' => ['user/invitelist']]); |
| 12 | 12 | } |
| 13 | 13 | $menu->menu(['text' => __('Role management'), 'link' => ['user/rolelist']]) |