@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | if ($this->form_personal->handle($controller_personal) || $this->form_password->handle($controller_password)) { |
47 | 47 | |
48 | - Request::redirect(INSTALL_PATH . '/profile/edit?submitted'); |
|
48 | + Request::redirect(INSTALL_PATH.'/profile/edit?submitted'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | # Display success message |
@@ -50,7 +50,9 @@ |
||
50 | 50 | |
51 | 51 | # Display success message |
52 | 52 | |
53 | - if (false !== Request::get('submitted')) Messages::set('success', Language::get('USER_SUCCESS_EDIT')); |
|
53 | + if (false !== Request::get('submitted')) { |
|
54 | + Messages::set('success', Language::get('USER_SUCCESS_EDIT')); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | # ------------------------ |
56 | 58 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | if ($this->form->handle(new Install\Controller\Database())) { |
37 | 37 | |
38 | - Request::redirect(INSTALL_PATH . '/admin/register'); |
|
38 | + Request::redirect(INSTALL_PATH.'/admin/register'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | # ------------------------ |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $class = ($value ? 'positive' : 'negative'); $icon = ($value ? 'check circle' : 'warning circle'); |
20 | 20 | |
21 | - $text = Language::get('INSTALL_REQUIREMENT_' . strtoupper($name) . '_' . ($value ? 'SUCCESS' : 'FAIL')); |
|
21 | + $text = Language::get('INSTALL_REQUIREMENT_'.strtoupper($name).'_'.($value ? 'SUCCESS' : 'FAIL')); |
|
22 | 22 | |
23 | 23 | $requirements[] = ['class' => $class, 'icon' => $icon, 'text' => $text]; |
24 | 24 | } |
@@ -2,7 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Install\Handler { |
4 | 4 | |
5 | - use Frames, Modules\Extend, Modules\Install, Utils\View, Language; |
|
5 | + use Frames; |
|
6 | + use Modules\Extend; |
|
7 | + use Modules\Install; |
|
8 | + use Utils\View; |
|
9 | + use Language; |
|
6 | 10 | |
7 | 11 | class Check extends Frames\Admin\Area\Install { |
8 | 12 |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Controller { |
4 | 4 | |
5 | - use Modules\Entitizer, Utils\Validate, Str; |
|
5 | + use Modules\Entitizer; |
|
6 | + use Utils\Validate; |
|
7 | + use Str; |
|
6 | 8 | |
7 | 9 | class User { |
8 | 10 |
@@ -31,30 +31,46 @@ discard block |
||
31 | 31 | |
32 | 32 | # Validate name & email |
33 | 33 | |
34 | - if (false === ($name = Validate::userName($name))) return ['name', 'USER_ERROR_NAME_INVALID']; |
|
34 | + if (false === ($name = Validate::userName($name))) { |
|
35 | + return ['name', 'USER_ERROR_NAME_INVALID']; |
|
36 | + } |
|
35 | 37 | |
36 | - if (false === ($email = Validate::userEmail($email))) return ['email', 'USER_ERROR_EMAIL_INVALID']; |
|
38 | + if (false === ($email = Validate::userEmail($email))) { |
|
39 | + return ['email', 'USER_ERROR_EMAIL_INVALID']; |
|
40 | + } |
|
37 | 41 | |
38 | 42 | # Validate password |
39 | 43 | |
40 | 44 | if ((0 === $this->user->id) || ('' !== $password)) { |
41 | 45 | |
42 | - if (false === ($password = Validate::userPassword($password))) return ['password', 'USER_ERROR_PASSWORD_INVALID']; |
|
46 | + if (false === ($password = Validate::userPassword($password))) { |
|
47 | + return ['password', 'USER_ERROR_PASSWORD_INVALID']; |
|
48 | + } |
|
43 | 49 | |
44 | - if (0 !== strcmp($password, $password_retype)) return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH']; |
|
50 | + if (0 !== strcmp($password, $password_retype)) { |
|
51 | + return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH']; |
|
52 | + } |
|
45 | 53 | } |
46 | 54 | |
47 | 55 | # Check name exists |
48 | 56 | |
49 | - if (false === ($check_name = $this->user->check($name, 'name'))) return 'USER_ERROR_MODIFY'; |
|
57 | + if (false === ($check_name = $this->user->check($name, 'name'))) { |
|
58 | + return 'USER_ERROR_MODIFY'; |
|
59 | + } |
|
50 | 60 | |
51 | - if ($check_name === 1) return ['name', 'USER_ERROR_NAME_DUPLICATE']; |
|
61 | + if ($check_name === 1) { |
|
62 | + return ['name', 'USER_ERROR_NAME_DUPLICATE']; |
|
63 | + } |
|
52 | 64 | |
53 | 65 | # Check email exists |
54 | 66 | |
55 | - if (false === ($check_email = $this->user->check($email, 'email'))) return 'USER_ERROR_MODIFY'; |
|
67 | + if (false === ($check_email = $this->user->check($email, 'email'))) { |
|
68 | + return 'USER_ERROR_MODIFY'; |
|
69 | + } |
|
56 | 70 | |
57 | - if ($check_email === 1) return ['email', 'USER_ERROR_EMAIL_DUPLICATE']; |
|
71 | + if ($check_email === 1) { |
|
72 | + return ['email', 'USER_ERROR_EMAIL_DUPLICATE']; |
|
73 | + } |
|
58 | 74 | |
59 | 75 | # Modify user |
60 | 76 | |
@@ -84,7 +100,9 @@ discard block |
||
84 | 100 | |
85 | 101 | $modifier = ((0 === $this->user->id) ? 'create' : 'edit'); |
86 | 102 | |
87 | - if (!$this->user->$modifier($data)) return 'USER_ERROR_MODIFY'; |
|
103 | + if (!$this->user->$modifier($data)) { |
|
104 | + return 'USER_ERROR_MODIFY'; |
|
105 | + } |
|
88 | 106 | |
89 | 107 | # ------------------------ |
90 | 108 |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Form { |
4 | 4 | |
5 | - use Modules\Entitizer, Utils\Form, Utils\Range; |
|
5 | + use Modules\Entitizer; |
|
6 | + use Utils\Form; |
|
7 | + use Utils\Range; |
|
6 | 8 | |
7 | 9 | class Page extends Form { |
8 | 10 |
@@ -2,7 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Form { |
4 | 4 | |
5 | - use Modules\Auth, Modules\Entitizer, Utils\Form, Utils\Range, Geo\Country, Geo\Timezone, Language; |
|
5 | + use Modules\Auth; |
|
6 | + use Modules\Entitizer; |
|
7 | + use Utils\Form; |
|
8 | + use Utils\Range; |
|
9 | + use Geo\Country; |
|
10 | + use Geo\Timezone; |
|
11 | + use Language; |
|
6 | 12 | |
7 | 13 | class User extends Form { |
8 | 14 |
@@ -2,7 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Listview { |
4 | 4 | |
5 | - use Modules\Entitizer, Template; |
|
5 | + use Modules\Entitizer; |
|
6 | + use Template; |
|
6 | 7 | |
7 | 8 | class Variables extends Entitizer\Utils\Listview { |
8 | 9 |
@@ -30,9 +30,9 @@ |
||
30 | 30 | |
31 | 31 | protected function processEntityParent(Template\Block $parent) { |
32 | 32 | |
33 | - if (0 !== $this->parent->id) $parent->getBlock('browse')->link = $this->parent->link; |
|
34 | - |
|
35 | - else { $parent->getBlock('browse')->disable(); $parent->getBlock('browse_disabled')->enable(); } |
|
33 | + if (0 !== $this->parent->id) { |
|
34 | + $parent->getBlock('browse')->link = $this->parent->link; |
|
35 | + } else { $parent->getBlock('browse')->disable(); $parent->getBlock('browse_disabled')->enable(); } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | # Add item additional data |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Lister { |
4 | 4 | |
5 | - use Modules\Entitizer, Utils\Range, Template; |
|
5 | + use Modules\Entitizer; |
|
6 | + use Utils\Range; |
|
7 | + use Template; |
|
6 | 8 | |
7 | 9 | class Pages extends Entitizer\Utils\Lister { |
8 | 10 |
@@ -30,9 +30,9 @@ |
||
30 | 30 | |
31 | 31 | protected function processEntityParent(Template\Block $parent) { |
32 | 32 | |
33 | - if ((0 !== $this->parent->id) && $this->parent->active) $parent->getBlock('browse')->link = $this->parent->link; |
|
34 | - |
|
35 | - else { $parent->getBlock('browse')->disable(); $parent->getBlock('browse_disabled')->enable(); } |
|
33 | + if ((0 !== $this->parent->id) && $this->parent->active) { |
|
34 | + $parent->getBlock('browse')->link = $this->parent->link; |
|
35 | + } else { $parent->getBlock('browse')->disable(); $parent->getBlock('browse_disabled')->enable(); } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | # Add item additional data |
@@ -2,7 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Modules\Entitizer\Lister { |
4 | 4 | |
5 | - use Modules\Auth, Modules\Entitizer, Utils\Range, Template; |
|
5 | + use Modules\Auth; |
|
6 | + use Modules\Entitizer; |
|
7 | + use Utils\Range; |
|
8 | + use Template; |
|
6 | 9 | |
7 | 10 | class Users extends Entitizer\Utils\Lister { |
8 | 11 |
@@ -40,7 +40,9 @@ |
||
40 | 40 | |
41 | 41 | # Set remove button |
42 | 42 | |
43 | - if ($user->id === Auth::user()->id) $view->getBlock('remove')->class = 'disabled'; |
|
43 | + if ($user->id === Auth::user()->id) { |
|
44 | + $view->getBlock('remove')->class = 'disabled'; |
|
45 | + } |
|
44 | 46 | } |
45 | 47 | } |
46 | 48 | } |