@@ -33,7 +33,7 @@ |
||
33 | 33 | ]; |
34 | 34 | |
35 | 35 | // do nothing for allowed routes |
36 | - if (in_array($routeName, $allowedRoutes)) |
|
36 | + if (in_array($routeName, $allowedRoutes)) |
|
37 | 37 | { |
38 | 38 | return; |
39 | 39 | } |
@@ -84,9 +84,9 @@ |
||
84 | 84 | $imageStrategy = $infoContainer->getForm('info.image') |
85 | 85 | ->getHydrator() |
86 | 86 | ->getStrategy('image'); |
87 | - $fileEntity = $imageStrategy->getFileEntity(); |
|
88 | - $fileEntity->setUser($user); |
|
89 | - $imageStrategy->setFileEntity($fileEntity); |
|
87 | + $fileEntity = $imageStrategy->getFileEntity(); |
|
88 | + $fileEntity->setUser($user); |
|
89 | + $imageStrategy->setFileEntity($fileEntity); |
|
90 | 90 | |
91 | 91 | if ($this->request->isPost()) { |
92 | 92 | $formName = $params->fromQuery('form'); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | if ($exception instanceof UnauthorizedImageAccessException) { |
58 | 58 | $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png'; |
59 | 59 | $response->setStatusCode(Response::STATUS_CODE_403) |
60 | - ->setContent(file_get_contents($image)) |
|
61 | - ->getHeaders() |
|
62 | - ->addHeaderLine('Content-Type', 'image/png'); |
|
60 | + ->setContent(file_get_contents($image)) |
|
61 | + ->getHeaders() |
|
62 | + ->addHeaderLine('Content-Type', 'image/png'); |
|
63 | 63 | $e->stopPropagation(); |
64 | 64 | $response->sendHeaders(); |
65 | 65 | //echo file_get_contents($image); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | $application = $e->getApplication(); |
73 | - $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
73 | + $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
74 | 74 | |
75 | 75 | if (!$auth->hasIdentity()) { |
76 | 76 | $routeMatch = $e->getRouteMatch(); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | $model->setTemplate($this->getExceptionTemplate()); |
103 | 103 | $e->setResult($model); |
104 | 104 | |
105 | - // $statusCode = $response->getStatusCode(); |
|
106 | - // if ($statusCode === 200) { |
|
105 | + // $statusCode = $response->getStatusCode(); |
|
106 | + // if ($statusCode === 200) { |
|
107 | 107 | $response->setStatusCode(Response::STATUS_CODE_403); |
108 | - // } |
|
108 | + // } |
|
109 | 109 | } |
110 | 110 | } |
@@ -98,9 +98,9 @@ |
||
98 | 98 | ); |
99 | 99 | |
100 | 100 | $this->setCount(0) |
101 | - ->setAllowRemove(true) |
|
102 | - ->setAllowAdd(true) |
|
103 | - ->setShouldCreateTemplate(true); |
|
101 | + ->setAllowRemove(true) |
|
102 | + ->setAllowAdd(true) |
|
103 | + ->setShouldCreateTemplate(true); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -26,57 +26,57 @@ discard block |
||
26 | 26 | |
27 | 27 | public function init() |
28 | 28 | { |
29 | - $this->setName('installation'); |
|
29 | + $this->setName('installation'); |
|
30 | 30 | |
31 | - $this->setAttributes( |
|
32 | - array( |
|
33 | - 'method' => 'post', |
|
34 | - ) |
|
35 | - ); |
|
31 | + $this->setAttributes( |
|
32 | + array( |
|
33 | + 'method' => 'post', |
|
34 | + ) |
|
35 | + ); |
|
36 | 36 | |
37 | - $this->add( |
|
38 | - array( |
|
39 | - 'type' => 'Text', |
|
40 | - 'name' => 'db_conn', |
|
41 | - 'options' => array( |
|
42 | - 'label' => /* @translate */ 'Database connection string', |
|
43 | - ), |
|
44 | - 'attributes' => array( |
|
45 | - 'placeholder' => 'mongodb://localhost:27017/YAWIK', |
|
46 | - ), |
|
37 | + $this->add( |
|
38 | + array( |
|
39 | + 'type' => 'Text', |
|
40 | + 'name' => 'db_conn', |
|
41 | + 'options' => array( |
|
42 | + 'label' => /* @translate */ 'Database connection string', |
|
43 | + ), |
|
44 | + 'attributes' => array( |
|
45 | + 'placeholder' => 'mongodb://localhost:27017/YAWIK', |
|
46 | + ), |
|
47 | 47 | |
48 | - ) |
|
49 | - ); |
|
48 | + ) |
|
49 | + ); |
|
50 | 50 | |
51 | - $this->add( |
|
52 | - array( |
|
53 | - 'type' => 'Text', |
|
54 | - 'name' => 'username', |
|
55 | - 'options' => array( |
|
56 | - 'label' => /* @translate */ 'Initial user name', |
|
57 | - ), |
|
58 | - ) |
|
59 | - ); |
|
51 | + $this->add( |
|
52 | + array( |
|
53 | + 'type' => 'Text', |
|
54 | + 'name' => 'username', |
|
55 | + 'options' => array( |
|
56 | + 'label' => /* @translate */ 'Initial user name', |
|
57 | + ), |
|
58 | + ) |
|
59 | + ); |
|
60 | 60 | |
61 | - $this->add( |
|
62 | - array( |
|
63 | - 'type' => 'Password', |
|
64 | - 'name' => 'password', |
|
65 | - 'options' => array( |
|
66 | - 'label' => /* @translate */ 'Password', |
|
67 | - ), |
|
68 | - ) |
|
69 | - ); |
|
61 | + $this->add( |
|
62 | + array( |
|
63 | + 'type' => 'Password', |
|
64 | + 'name' => 'password', |
|
65 | + 'options' => array( |
|
66 | + 'label' => /* @translate */ 'Password', |
|
67 | + ), |
|
68 | + ) |
|
69 | + ); |
|
70 | 70 | |
71 | - $this->add( |
|
72 | - array( |
|
73 | - 'type' => 'Text', |
|
74 | - 'name' => 'email', |
|
75 | - 'options' => array( |
|
76 | - 'label' => /* @translate */ 'Email address for system messages', |
|
77 | - ), |
|
78 | - ) |
|
79 | - ); |
|
71 | + $this->add( |
|
72 | + array( |
|
73 | + 'type' => 'Text', |
|
74 | + 'name' => 'email', |
|
75 | + 'options' => array( |
|
76 | + 'label' => /* @translate */ 'Email address for system messages', |
|
77 | + ), |
|
78 | + ) |
|
79 | + ); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | public function getInputFilterSpecification() |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ), |
91 | 91 | 'validators' => array( |
92 | 92 | array('name' => MongoDbConnectionString::class, |
93 | - 'break_chain_on_failure' => true), |
|
93 | + 'break_chain_on_failure' => true), |
|
94 | 94 | array('name' => MongoDbConnection::class), |
95 | 95 | ), |
96 | 96 | ), |
@@ -14,133 +14,133 @@ |
||
14 | 14 | |
15 | 15 | return [ |
16 | 16 | |
17 | - 'doctrine' => [ |
|
18 | - 'driver' => [ |
|
19 | - 'odm_default' => [ |
|
20 | - 'drivers' => [ |
|
21 | - 'Settings\Entity' => 'annotation', |
|
22 | - ], |
|
23 | - ], |
|
24 | - ], |
|
25 | - 'eventmanager' => [ |
|
26 | - 'odm_default' => [ |
|
27 | - 'subscribers' => [ |
|
28 | - 'Settings/InjectEntityResolverListener', |
|
29 | - ], |
|
30 | - ], |
|
31 | - ], |
|
32 | - ], |
|
17 | + 'doctrine' => [ |
|
18 | + 'driver' => [ |
|
19 | + 'odm_default' => [ |
|
20 | + 'drivers' => [ |
|
21 | + 'Settings\Entity' => 'annotation', |
|
22 | + ], |
|
23 | + ], |
|
24 | + ], |
|
25 | + 'eventmanager' => [ |
|
26 | + 'odm_default' => [ |
|
27 | + 'subscribers' => [ |
|
28 | + 'Settings/InjectEntityResolverListener', |
|
29 | + ], |
|
30 | + ], |
|
31 | + ], |
|
32 | + ], |
|
33 | 33 | |
34 | 34 | |
35 | - // Translations |
|
36 | - 'translator' => [ |
|
37 | - 'translation_file_patterns' => [ |
|
38 | - [ |
|
39 | - 'type' => 'gettext', |
|
40 | - 'base_dir' => __DIR__ . '/../language', |
|
41 | - 'pattern' => '%s.mo', |
|
42 | - ], |
|
43 | - ], |
|
44 | - ], |
|
45 | - // Routes |
|
46 | - 'router' => [ |
|
47 | - 'routes' => [ |
|
48 | - 'lang' => [ |
|
49 | - 'child_routes' => [ |
|
50 | - 'settings' => [ |
|
51 | - 'type' => 'Segment', |
|
52 | - 'options' => [ |
|
53 | - 'route' => '/settings[/:module]', |
|
54 | - 'defaults' => [ |
|
55 | - 'controller' => 'Settings\Controller\Index', |
|
56 | - 'action' => 'index', |
|
57 | - 'module' => 'Core', |
|
58 | - ], |
|
59 | - ], |
|
60 | - 'may_terminate' => true, |
|
61 | - ], |
|
62 | - ], |
|
63 | - ], |
|
64 | - ], |
|
65 | - ], |
|
35 | + // Translations |
|
36 | + 'translator' => [ |
|
37 | + 'translation_file_patterns' => [ |
|
38 | + [ |
|
39 | + 'type' => 'gettext', |
|
40 | + 'base_dir' => __DIR__ . '/../language', |
|
41 | + 'pattern' => '%s.mo', |
|
42 | + ], |
|
43 | + ], |
|
44 | + ], |
|
45 | + // Routes |
|
46 | + 'router' => [ |
|
47 | + 'routes' => [ |
|
48 | + 'lang' => [ |
|
49 | + 'child_routes' => [ |
|
50 | + 'settings' => [ |
|
51 | + 'type' => 'Segment', |
|
52 | + 'options' => [ |
|
53 | + 'route' => '/settings[/:module]', |
|
54 | + 'defaults' => [ |
|
55 | + 'controller' => 'Settings\Controller\Index', |
|
56 | + 'action' => 'index', |
|
57 | + 'module' => 'Core', |
|
58 | + ], |
|
59 | + ], |
|
60 | + 'may_terminate' => true, |
|
61 | + ], |
|
62 | + ], |
|
63 | + ], |
|
64 | + ], |
|
65 | + ], |
|
66 | 66 | |
67 | - 'acl' => ['rules' => [ |
|
68 | - 'user' => [ |
|
69 | - 'allow' => [ |
|
70 | - 'route/lang/settings', |
|
71 | - 'Settings\Controller\Index', |
|
72 | - ], |
|
73 | - ], |
|
74 | - ]], |
|
75 | - 'navigation' => [ |
|
76 | - 'default' => [ |
|
77 | - 'settings' => [ |
|
78 | - 'label' => /*@translate*/ 'Settings', |
|
79 | - 'route' => 'lang/settings', |
|
80 | - 'resource' => 'route/lang/settings', |
|
81 | - 'order' => 100, |
|
82 | - 'params' => ['module' => null], |
|
83 | - ], |
|
84 | - ], |
|
85 | - ], |
|
67 | + 'acl' => ['rules' => [ |
|
68 | + 'user' => [ |
|
69 | + 'allow' => [ |
|
70 | + 'route/lang/settings', |
|
71 | + 'Settings\Controller\Index', |
|
72 | + ], |
|
73 | + ], |
|
74 | + ]], |
|
75 | + 'navigation' => [ |
|
76 | + 'default' => [ |
|
77 | + 'settings' => [ |
|
78 | + 'label' => /*@translate*/ 'Settings', |
|
79 | + 'route' => 'lang/settings', |
|
80 | + 'resource' => 'route/lang/settings', |
|
81 | + 'order' => 100, |
|
82 | + 'params' => ['module' => null], |
|
83 | + ], |
|
84 | + ], |
|
85 | + ], |
|
86 | 86 | |
87 | - // Configuration of the controller service manager (Which loads controllers) |
|
88 | - 'controllers' => [ |
|
89 | - 'factories' => [ |
|
90 | - 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class,'factory'] |
|
91 | - ], |
|
92 | - ], |
|
87 | + // Configuration of the controller service manager (Which loads controllers) |
|
88 | + 'controllers' => [ |
|
89 | + 'factories' => [ |
|
90 | + 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class,'factory'] |
|
91 | + ], |
|
92 | + ], |
|
93 | 93 | |
94 | - // Configure the view service manager |
|
95 | - 'view_manager' => [ |
|
96 | - // Map template to files. Speeds up the lookup through the template stack. |
|
97 | - 'template_map' => [ |
|
98 | - ], |
|
94 | + // Configure the view service manager |
|
95 | + 'view_manager' => [ |
|
96 | + // Map template to files. Speeds up the lookup through the template stack. |
|
97 | + 'template_map' => [ |
|
98 | + ], |
|
99 | 99 | |
100 | - // Where to look for view templates not mapped above |
|
101 | - 'template_path_stack' => [ |
|
102 | - __DIR__ . '/../view', |
|
103 | - ], |
|
104 | - ], |
|
100 | + // Where to look for view templates not mapped above |
|
101 | + 'template_path_stack' => [ |
|
102 | + __DIR__ . '/../view', |
|
103 | + ], |
|
104 | + ], |
|
105 | 105 | |
106 | - 'view_helpers' => [ |
|
107 | - 'invokables' => [ |
|
108 | - 'Settings/FormDisableElementsCapableFormSettings' => 'Settings\Form\View\Helper\FormDisableElementsCapableFormSettings', |
|
109 | - ], |
|
110 | - 'factories' => [ |
|
111 | - ], |
|
112 | - ], |
|
106 | + 'view_helpers' => [ |
|
107 | + 'invokables' => [ |
|
108 | + 'Settings/FormDisableElementsCapableFormSettings' => 'Settings\Form\View\Helper\FormDisableElementsCapableFormSettings', |
|
109 | + ], |
|
110 | + 'factories' => [ |
|
111 | + ], |
|
112 | + ], |
|
113 | 113 | |
114 | - 'service_manager' => [ |
|
115 | - 'factories' => [ |
|
116 | - 'Settings' => '\Settings\Settings\SettingsFactory', |
|
117 | - 'Settings/EntityResolver' => '\Settings\Repository\SettingsEntityResolverFactory', |
|
118 | - 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class,'factory'], |
|
119 | - ], |
|
120 | - 'initializers' => [], |
|
121 | - 'shared' => [], |
|
122 | - 'aliases' => [], |
|
123 | - ], |
|
114 | + 'service_manager' => [ |
|
115 | + 'factories' => [ |
|
116 | + 'Settings' => '\Settings\Settings\SettingsFactory', |
|
117 | + 'Settings/EntityResolver' => '\Settings\Repository\SettingsEntityResolverFactory', |
|
118 | + 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class,'factory'], |
|
119 | + ], |
|
120 | + 'initializers' => [], |
|
121 | + 'shared' => [], |
|
122 | + 'aliases' => [], |
|
123 | + ], |
|
124 | 124 | |
125 | - 'controller_plugins' => [ |
|
126 | - 'factories' => ['settings' => '\Settings\Controller\Plugin\SettingsFactory'], |
|
127 | - ], |
|
125 | + 'controller_plugins' => [ |
|
126 | + 'factories' => ['settings' => '\Settings\Controller\Plugin\SettingsFactory'], |
|
127 | + ], |
|
128 | 128 | |
129 | - 'form_elements' => [ |
|
130 | - 'factories' => [ |
|
131 | - 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class,'factory'], |
|
132 | - 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class,'factory'], |
|
133 | - 'Settings/Fieldset' => \Settings\Form\Factory\SettingsFieldsetFactory::class, |
|
134 | - ], |
|
135 | - 'aliases' => [ |
|
136 | - ], |
|
137 | - ], |
|
129 | + 'form_elements' => [ |
|
130 | + 'factories' => [ |
|
131 | + 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class,'factory'], |
|
132 | + 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class,'factory'], |
|
133 | + 'Settings/Fieldset' => \Settings\Form\Factory\SettingsFieldsetFactory::class, |
|
134 | + ], |
|
135 | + 'aliases' => [ |
|
136 | + ], |
|
137 | + ], |
|
138 | 138 | |
139 | - 'filters' => [ |
|
140 | - 'invokables' => [ |
|
141 | - 'Settings/Filter/DisableElementsCapableFormSettings' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class, |
|
142 | - ] |
|
143 | - ] |
|
139 | + 'filters' => [ |
|
140 | + 'invokables' => [ |
|
141 | + 'Settings/Filter/DisableElementsCapableFormSettings' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class, |
|
142 | + ] |
|
143 | + ] |
|
144 | 144 | |
145 | 145 | |
146 | 146 | ]; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'aliases' => [ |
81 | 81 | 'assertions' => 'Acl\AssertionManager', |
82 | 82 | 'Auth/UserTokenGenerator' => 'Auth\Service\UserUniqueTokenGenerator', |
83 | - 'acl' => 'Acl' |
|
83 | + 'acl' => 'Acl' |
|
84 | 84 | ] |
85 | 85 | ], |
86 | 86 | |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | 'Auth/SocialProfiles' => 'Auth\Controller\SocialProfilesController', |
92 | 92 | ], |
93 | 93 | 'factories' => [ |
94 | - 'Auth\Controller\Manage' => [ManageController::class,'factory'], |
|
95 | - 'Auth/ManageGroups' => [ManageGroupsController::class,'factory'], |
|
94 | + 'Auth\Controller\Manage' => [ManageController::class,'factory'], |
|
95 | + 'Auth/ManageGroups' => [ManageGroupsController::class,'factory'], |
|
96 | 96 | 'Auth\Controller\ForgotPassword' => 'Auth\Factory\Controller\ForgotPasswordControllerFactory', |
97 | 97 | 'Auth\Controller\GotoResetPassword' => 'Auth\Factory\Controller\GotoResetPasswordControllerFactory', |
98 | 98 | 'Auth\Controller\Register' => 'Auth\Factory\Controller\RegisterControllerFactory', |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | 'shared' => [ |
117 | 117 | 'OAuth' => false, |
118 | 118 | ], |
119 | - 'aliases' => [ |
|
120 | - 'acl' => 'Acl', |
|
121 | - 'auth' => 'Auth' |
|
122 | - ] |
|
119 | + 'aliases' => [ |
|
120 | + 'acl' => 'Acl', |
|
121 | + 'auth' => 'Auth' |
|
122 | + ] |
|
123 | 123 | ], |
124 | 124 | 'hybridauth' => [ |
125 | 125 | "Facebook" => [ |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | 'Auth/Users' => 'switch', |
225 | 225 | ], |
226 | 226 | 'deny' => [ |
227 | - // 'route/lang/auth', |
|
227 | + // 'route/lang/auth', |
|
228 | 228 | 'route/auth-provider', |
229 | 229 | 'route/auth-extern', |
230 | 230 | 'route/lang/forgot-password', |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | 'factories' => [ |
312 | 312 | 'auth' => '\Auth\Factory\View\Helper\AuthFactory', |
313 | 313 | 'acl' => '\Acl\Factory\View\Helper\AclFactory', |
314 | - ], |
|
314 | + ], |
|
315 | 315 | ], |
316 | 316 | |
317 | 317 | 'form_elements' => [ |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @param EventManagerInterface $events |
60 | 60 | * @param integer $priority |
61 | - */ |
|
61 | + */ |
|
62 | 62 | public function attach(EventManagerInterface $events, $priority=1) |
63 | 63 | { |
64 | 64 | $this->listeners[] = $events->attach(MvcEvent::EVENT_ROUTE, array($this, 'onRoute'), -10); |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | - /** |
|
84 | - * @param MvcEvent $event |
|
85 | - * |
|
86 | - * @return array|\ArrayAccess|mixed|object |
|
87 | - */ |
|
83 | + /** |
|
84 | + * @param MvcEvent $event |
|
85 | + * |
|
86 | + * @return array|\ArrayAccess|mixed|object |
|
87 | + */ |
|
88 | 88 | public function onRoute(MvcEvent $event) |
89 | 89 | { |
90 | 90 | if ($event->isError()) { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | |
117 | 117 | if ($resourceId && !$acl->isAllowed($role, $resourceId, $privilege)) { |
118 | - /* |
|
118 | + /* |
|
119 | 119 | * Exceptions are only catched within the dispatch listener, so |
120 | 120 | * we have to set the exception manually in the event |
121 | 121 | * and trigger the DISPATCH_ERROR event. |
@@ -96,18 +96,18 @@ |
||
96 | 96 | |
97 | 97 | $event = new AssertionEvent(null, $this); |
98 | 98 | $event->setAcl($acl) |
99 | - ->setRole($role) |
|
100 | - ->setResource($resource) |
|
101 | - ->setPrivilege($privilege); |
|
99 | + ->setRole($role) |
|
100 | + ->setResource($resource) |
|
101 | + ->setPrivilege($privilege); |
|
102 | 102 | |
103 | 103 | $events = $this->getEventManager(); |
104 | 104 | |
105 | 105 | $callback = function ($r) { |
106 | - return false === $r; |
|
106 | + return false === $r; |
|
107 | 107 | }; |
108 | 108 | |
109 | 109 | $results = $events->triggerUntil( |
110 | - $callback, |
|
110 | + $callback, |
|
111 | 111 | $event->getName(), |
112 | 112 | $event |
113 | 113 | ); |