@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | $allCfg['adminEmail'] = $email; |
125 | 125 | $allCfg['baseDomain'] = $domain; |
126 | 126 | $output->writeln('Generate password salt for BLOWFISH crypt'); |
127 | - $allCfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$'; |
|
127 | + $allCfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$'; |
|
128 | 128 | $output->writeln('Generate security cookies for debug panel'); |
129 | - $allCfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(8, 32)); |
|
129 | + $allCfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(8, 32)); |
|
130 | 130 | $allCfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128)); |
131 | 131 | // write config data |
132 | 132 | $writeCfg = Console::$Properties->writeConfig('default', $allCfg); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | return; |
136 | 136 | } |
137 | 137 | File::write('/Private/Install/install.lock', 'Install is locked'); |
138 | - $output->writeln('Congratulations! FFCMS are successful installed. Used version: ' . Version::VERSION . ' since ' . Version::DATE); |
|
138 | + $output->writeln('Congratulations! FFCMS are successful installed. Used version: '.Version::VERSION.' since '.Version::DATE); |
|
139 | 139 | $output->writeln(''); |
140 | 140 | $output->writeln('> Please, use "php console.php main:adduser" to add admin account(set role=4) or you are unavailable to manage cms.'); |
141 | 141 | } |
@@ -28,14 +28,14 @@ |
||
28 | 28 | public function actionIndex() |
29 | 29 | { |
30 | 30 | // get search query value from GET headers |
31 | - $query = (string)$this->request->query->get('query', null); |
|
31 | + $query = (string) $this->request->query->get('query', null); |
|
32 | 32 | // strip html tags |
33 | 33 | $query = App::$Security->strip_tags(trim($query)); |
34 | 34 | // get configs |
35 | 35 | $configs = $this->getConfigs(); |
36 | 36 | |
37 | 37 | // check search query length |
38 | - if (Str::likeEmpty($query) || Str::length($query) < (int)$configs['minLength']) { |
|
38 | + if (Str::likeEmpty($query) || Str::length($query) < (int) $configs['minLength']) { |
|
39 | 39 | throw new NotFoundException(__('Search query is too short!')); |
40 | 40 | } |
41 | 41 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $rootSize = App::$Cache->getItem('root.size'); |
48 | 48 | $loadAvg = App::$Cache->getItem('load.avarage'); |
49 | 49 | if (!$rootSize->isHit()) { |
50 | - $calcSize = round(Directory::size('/') / (1024*1000), 2) . ' mb'; |
|
50 | + $calcSize = round(Directory::size('/') / (1024 * 1000), 2).' mb'; |
|
51 | 51 | $rootSize->set($calcSize); |
52 | 52 | $rootSize->expiresAfter(86400); |
53 | 53 | App::$Cache->save($rootSize); |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | |
61 | 61 | // prepare system statistic |
62 | 62 | $stats = [ |
63 | - 'ff_version' => Version::VERSION . ' (' . Version::DATE . ')', |
|
64 | - 'php_version' => Environment::phpVersion() . ' (' . Environment::phpSAPI() . ')', |
|
63 | + 'ff_version' => Version::VERSION.' ('.Version::DATE.')', |
|
64 | + 'php_version' => Environment::phpVersion().' ('.Environment::phpSAPI().')', |
|
65 | 65 | 'os_name' => Environment::osName(), |
66 | - 'database_name' => App::$Database->connection()->getDatabaseName() . ' (' . App::$Database->connection()->getDriverName() . ')', |
|
66 | + 'database_name' => App::$Database->connection()->getDatabaseName().' ('.App::$Database->connection()->getDriverName().')', |
|
67 | 67 | 'file_size' => $rootSize->get(), |
68 | 68 | 'load_avg' => $loadAvg->get() |
69 | 69 | ]; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | public function actionFiles() |
114 | 114 | { |
115 | 115 | return $this->view->render('files', [ |
116 | - 'connector' => App::$Alias->scriptUrl . '/api/main/files?lang=' . $this->request->getLanguage() |
|
116 | + 'connector' => App::$Alias->scriptUrl.'/api/main/files?lang='.$this->request->getLanguage() |
|
117 | 117 | ]); |
118 | 118 | } |
119 | 119 | |
@@ -182,9 +182,9 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function actionDeleteroute() |
184 | 184 | { |
185 | - $type = (string)$this->request->query->get('type'); |
|
186 | - $loader = (string)$this->request->query->get('loader'); |
|
187 | - $source = Str::lowerCase((string)$this->request->query->get('path')); |
|
185 | + $type = (string) $this->request->query->get('type'); |
|
186 | + $loader = (string) $this->request->query->get('loader'); |
|
187 | + $source = Str::lowerCase((string) $this->request->query->get('path')); |
|
188 | 188 | |
189 | 189 | $model = new EntityDeleteRoute($type, $loader, $source); |
190 | 190 | if ($model->send() && $model->validate()) { |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | { |
207 | 207 | $stats = App::$Cache->stats(); |
208 | 208 | // get size in mb from cache stats |
209 | - $size = round((int)$stats['size'] / (1024*1024), 2); |
|
209 | + $size = round((int) $stats['size'] / (1024 * 1024), 2); |
|
210 | 210 | |
211 | 211 | // check if submited |
212 | 212 | if ($this->request->request->get('clearcache', false)) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $query = ProfileRecords::with(['user']); |
39 | 39 | |
40 | 40 | // set current page and offset |
41 | - $page = (int)$this->request->query->get('page'); |
|
41 | + $page = (int) $this->request->query->get('page'); |
|
42 | 42 | $offset = $page * self::ITEM_PER_PAGE; |
43 | 43 | |
44 | 44 | // build pagination |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function actionDelete($id) |
70 | 70 | { |
71 | - $this->response->redirect('user/delete/' . $id); |
|
71 | + $this->response->redirect('user/delete/'.$id); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $search = \Apps\ActiveRecord\App::getItem('app', $controller); |
88 | 88 | |
89 | 89 | // check what we got |
90 | - if ($search === null || (int)$search->id < 1) { |
|
90 | + if ($search === null || (int) $search->id < 1) { |
|
91 | 91 | throw new NotFoundException('App is not founded'); |
92 | 92 | } |
93 | 93 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'app')->first(); |
121 | 121 | |
122 | - if ($search === null || (int)$search->id < 1) { |
|
122 | + if ($search === null || (int) $search->id < 1) { |
|
123 | 123 | throw new ForbiddenException('App is not founded'); |
124 | 124 | } |
125 | 125 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | // render view output |
37 | 37 | return $this->view->render('index', [ |
38 | - 'model' => $model |
|
38 | + 'model' => $model |
|
39 | 39 | ]); |
40 | 40 | } |
41 | 41 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $query = new UserRecords(); |
41 | 41 | |
42 | 42 | // set current page and offset |
43 | - $page = (int)$this->request->query->get('page', 0); |
|
43 | + $page = (int) $this->request->query->get('page', 0); |
|
44 | 44 | $offset = $page * self::ITEM_PER_PAGE; |
45 | 45 | |
46 | 46 | // build pagination |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function actionDelete($id = null) |
102 | 102 | { |
103 | 103 | // check if id is passed or get data from GET as array ids |
104 | - if ((int)$id < 1) { |
|
104 | + if ((int) $id < 1) { |
|
105 | 105 | $ids = $this->request->query->get('selected'); |
106 | 106 | if (!Any::isArray($ids) || !Arr::onlyNumericValues($ids)) { |
107 | 107 | throw new NotFoundException('Bad conditions'); |
@@ -55,6 +55,6 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // if widget is disabled - lets return nothing |
58 | - return !(bool)$wData->disabled; |
|
58 | + return !(bool) $wData->disabled; |
|
59 | 59 | } |
60 | 60 | } |
@@ -1,42 +1,42 @@ |
||
1 | 1 | <?php return [ |
2 | - 'baseProto' => 'http', |
|
3 | - 'baseDomain' => 'ffcms.app', |
|
4 | - 'basePath' => '/', |
|
5 | - 'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$', |
|
6 | - 'timezone' => 'Europe/Moscow', |
|
7 | - 'adminEmail' => '[email protected]', |
|
8 | - 'debug' => [ |
|
9 | - 'all' => false, |
|
10 | - 'cookie' => [ |
|
11 | - 'key' => 'fdebug_jepP2', |
|
12 | - 'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA' |
|
13 | - ] |
|
14 | - ], |
|
15 | - 'userCron' => false, |
|
16 | - 'theme' => [ |
|
17 | - 'Front' => 'default', |
|
18 | - 'Admin' => 'default' |
|
19 | - ], |
|
20 | - 'database' => [ |
|
21 | - 'driver' => 'mysql', |
|
22 | - 'host' => '127.0.0.1', |
|
23 | - 'username' => 'mysql', |
|
24 | - 'password' => 'mysql', |
|
25 | - 'database' => 'ffcms', |
|
26 | - 'prefix' => 'ffcms_', |
|
27 | - 'charset' => 'utf8', |
|
28 | - 'collation' => 'utf8_unicode_ci' |
|
29 | - ], |
|
2 | + 'baseProto' => 'http', |
|
3 | + 'baseDomain' => 'ffcms.app', |
|
4 | + 'basePath' => '/', |
|
5 | + 'passwordSalt' => '$2a$07$2NJgci5A7NI9m2J9Ii92a1I3DiH6$', |
|
6 | + 'timezone' => 'Europe/Moscow', |
|
7 | + 'adminEmail' => '[email protected]', |
|
8 | + 'debug' => [ |
|
9 | + 'all' => false, |
|
10 | + 'cookie' => [ |
|
11 | + 'key' => 'fdebug_jepP2', |
|
12 | + 'value' => 'pOH1Kj18fHN7mk9a81F32eJbl9d3AeDjLC1g7poPGE22Ii6pI68P5B6O5hKMofnLPB0lFdpo2a2o78NhedjGA' |
|
13 | + ] |
|
14 | + ], |
|
15 | + 'userCron' => false, |
|
16 | + 'theme' => [ |
|
17 | + 'Front' => 'default', |
|
18 | + 'Admin' => 'default' |
|
19 | + ], |
|
20 | + 'database' => [ |
|
21 | + 'driver' => 'mysql', |
|
22 | + 'host' => '127.0.0.1', |
|
23 | + 'username' => 'mysql', |
|
24 | + 'password' => 'mysql', |
|
25 | + 'database' => 'ffcms', |
|
26 | + 'prefix' => 'ffcms_', |
|
27 | + 'charset' => 'utf8', |
|
28 | + 'collation' => 'utf8_unicode_ci' |
|
29 | + ], |
|
30 | 30 | 'testSuite' => false, |
31 | - 'baseLanguage' => 'en', |
|
32 | - 'multiLanguage' => true, |
|
33 | - 'singleLanguage' => 'en', |
|
34 | - 'languages' => [ |
|
35 | - 'en', |
|
36 | - 'ru' |
|
37 | - ], |
|
38 | - 'languageDomainAlias' => false, |
|
39 | - 'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com', |
|
40 | - 'gaTrackId' => false, |
|
41 | - 'trustedProxy' => false |
|
31 | + 'baseLanguage' => 'en', |
|
32 | + 'multiLanguage' => true, |
|
33 | + 'singleLanguage' => 'en', |
|
34 | + 'languages' => [ |
|
35 | + 'en', |
|
36 | + 'ru' |
|
37 | + ], |
|
38 | + 'languageDomainAlias' => false, |
|
39 | + 'gaClientId' => '570934480862-son8fr180fr6u6tlt9iqpjpoesngro0o.apps.googleusercontent.com', |
|
40 | + 'gaTrackId' => false, |
|
41 | + 'trustedProxy' => false |
|
42 | 42 | ]; |
43 | 43 | \ No newline at end of file |