@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $syslogPort = $this->request->analyzeInt('remotesyslog_port', 0); |
79 | 79 | |
80 | 80 | $configData->setLogEnabled($logEnabled); |
81 | - $configData->setLogEvents($this->request->analyzeArray('log_events', function ($items) { |
|
81 | + $configData->setLogEvents($this->request->analyzeArray('log_events', function($items) { |
|
82 | 82 | return ConfigUtil::eventsAdapter($items); |
83 | 83 | }, [])); |
84 | 84 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $eventMessage->addDescription(__u('Auth Basic deshabiltada')); |
160 | 160 | } |
161 | 161 | |
162 | - return $this->saveConfig($configData, $this->config, function () use ($eventMessage) { |
|
162 | + return $this->saveConfig($configData, $this->config, function() use ($eventMessage) { |
|
163 | 163 | $this->eventDispatcher->notifyEvent('save.config.general', new Event($this, $eventMessage)); |
164 | 164 | }); |
165 | 165 | } |
@@ -104,7 +104,7 @@ |
||
104 | 104 | $eventMessage->addDescription(__u('DokuWiki deshabilitada')); |
105 | 105 | } |
106 | 106 | |
107 | - return $this->saveConfig($configData, $this->config, function () use ($eventMessage) { |
|
107 | + return $this->saveConfig($configData, $this->config, function() use ($eventMessage) { |
|
108 | 108 | $this->eventDispatcher->notifyEvent('save.config.wiki', new Event($this, $eventMessage)); |
109 | 109 | }); |
110 | 110 | } |
@@ -127,22 +127,22 @@ |
||
127 | 127 | $selectTags = SelectItemAdapter::factory(TagService::getItemsBasic()); |
128 | 128 | |
129 | 129 | $usersView = SelectItemAdapter::getIdFromArrayOfObjects( |
130 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
130 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
131 | 131 | return (int)$value->isEdit === 0; |
132 | 132 | })); |
133 | 133 | |
134 | 134 | $usersEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
135 | - array_filter($accountDetailsResponse->getUsers(), function ($value) { |
|
135 | + array_filter($accountDetailsResponse->getUsers(), function($value) { |
|
136 | 136 | return (int)$value->isEdit === 1; |
137 | 137 | })); |
138 | 138 | |
139 | 139 | $userGroupsView = SelectItemAdapter::getIdFromArrayOfObjects( |
140 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
140 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
141 | 141 | return (int)$value->isEdit === 0; |
142 | 142 | })); |
143 | 143 | |
144 | 144 | $userGroupsEdit = SelectItemAdapter::getIdFromArrayOfObjects( |
145 | - array_filter($accountDetailsResponse->getUserGroups(), function ($value) { |
|
145 | + array_filter($accountDetailsResponse->getUserGroups(), function($value) { |
|
146 | 146 | return (int)$value->isEdit === 1; |
147 | 147 | })); |
148 | 148 |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | $oops = "Oops, it looks like this content does not exist..."; |
136 | 136 | |
137 | - $this->router->onError(function ($router, $err_msg, $type, $err) { |
|
137 | + $this->router->onError(function($router, $err_msg, $type, $err) { |
|
138 | 138 | logger('Routing error: ' . $err_msg); |
139 | 139 | |
140 | 140 | /** @var Exception|\Throwable $err */ |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // Manage requests for api module |
148 | 148 | $this->router->respond(['POST'], |
149 | 149 | '@/api\.php', |
150 | - function ($request, $response, $service) use ($oops) { |
|
150 | + function($request, $response, $service) use ($oops) { |
|
151 | 151 | try { |
152 | 152 | $apiRequest = self::$container->get(ApiRequest::class); |
153 | 153 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | // Manage requests for web module |
187 | 187 | $this->router->respond(['GET', 'POST'], |
188 | 188 | '@/index\.php', |
189 | - function ($request, $response, $service) use ($oops) { |
|
189 | + function($request, $response, $service) use ($oops) { |
|
190 | 190 | try { |
191 | 191 | /** @var \Klein\Request $request */ |
192 | 192 | $route = Filter::getString($request->param('r', 'index/index')); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $gridData->addDataRowSource('dateTime'); |
122 | 122 | $gridData->addDataRowSource('dateTimeUnlock'); |
123 | 123 | $gridData->addDataRowSource('source', null, null, false); |
124 | - $gridData->addDataRowSource('ipv4', null, function ($value) use ($demo) { |
|
124 | + $gridData->addDataRowSource('ipv4', null, function($value) use ($demo) { |
|
125 | 125 | if ($value !== null) { |
126 | 126 | if ($demo) { |
127 | 127 | return '*.*.*.*'; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | return ' '; |
134 | 134 | }); |
135 | - $gridData->addDataRowSource('ipv6', null, function ($value) use ($demo) { |
|
135 | + $gridData->addDataRowSource('ipv6', null, function($value) use ($demo) { |
|
136 | 136 | if ($value !== null) { |
137 | 137 | if ($demo) { |
138 | 138 | return '*.*.*.*'; |
@@ -123,11 +123,11 @@ |
||
123 | 123 | $gridData->addDataRowSource('action', null, null, false); |
124 | 124 | $gridData->addDataRowSource('login'); |
125 | 125 | $gridData->addDataRowSource('ipAddress', false, |
126 | - function ($value) use ($isDemoMode) { |
|
126 | + function($value) use ($isDemoMode) { |
|
127 | 127 | return $isDemoMode ? preg_replace('#\d+#', '*', $value) : $value; |
128 | 128 | }); |
129 | 129 | $gridData->addDataRowSource('description', false, |
130 | - function ($value) use ($isDemoMode) { |
|
130 | + function($value) use ($isDemoMode) { |
|
131 | 131 | if ($isDemoMode) { |
132 | 132 | $value = preg_replace('/\\d+\\.\\d+\\.\\d+\\.\\d+/', "*.*.*.*", $value); |
133 | 133 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function create($itemData) |
128 | 128 | { |
129 | - return $this->transactionAware(function () use ($itemData) { |
|
129 | + return $this->transactionAware(function() use ($itemData) { |
|
130 | 130 | $id = $this->userGroupRepository->create($itemData); |
131 | 131 | |
132 | 132 | $users = $itemData->getUsers(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function update($itemData) |
148 | 148 | { |
149 | - $this->transactionAware(function () use ($itemData) { |
|
149 | + $this->transactionAware(function() use ($itemData) { |
|
150 | 150 | $this->userGroupRepository->update($itemData); |
151 | 151 | |
152 | 152 | $users = $itemData->getUsers(); |
@@ -138,7 +138,7 @@ |
||
138 | 138 | AccountSearchItem::$isDemoMode = $this->configData->isDemoEnabled(); |
139 | 139 | |
140 | 140 | if (AccountSearchItem::$wikiEnabled) { |
141 | - $wikiFilter = array_map(function ($value) { |
|
141 | + $wikiFilter = array_map(function($value) { |
|
142 | 142 | return preg_quote($value, '/'); |
143 | 143 | }, $this->configData->getWikiFilter()); |
144 | 144 |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $userToUserGroupService = $this->dic->get(UserToUserGroupService::class); |
269 | 269 | |
270 | 270 | // Groups in whinch the user is listed in |
271 | - $userGroups = array_map(function ($value) { |
|
271 | + $userGroups = array_map(function($value) { |
|
272 | 272 | return (int)$value->userGroupId; |
273 | 273 | }, $userToUserGroupService->getGroupsForUser($this->userData->getId())); |
274 | 274 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | */ |
302 | 302 | private function getUserInSecondaryUsers($userId) |
303 | 303 | { |
304 | - return array_values(array_filter($this->accountAclDto->getUsersId(), function ($value) use ($userId) { |
|
304 | + return array_values(array_filter($this->accountAclDto->getUsersId(), function($value) use ($userId) { |
|
305 | 305 | return (int)$value->id === $userId; |
306 | 306 | })); |
307 | 307 | } |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | |
335 | 335 | // Comprobar si el grupo del usuario está vinculado desde los grupos secundarios de la cuenta |
336 | 336 | return array_values(array_filter($this->accountAclDto->getUserGroupsId(), |
337 | - function ($value) use ($userGroupId, $isAccountFullGroupAccess, $userGroups) { |
|
337 | + function($value) use ($userGroupId, $isAccountFullGroupAccess, $userGroups) { |
|
338 | 338 | return (int)$value->id === $userGroupId |
339 | 339 | // o... permitir los grupos que no sean el principal del usuario? |
340 | 340 | || ($isAccountFullGroupAccess |