Completed
Pull Request — development (#897)
by
unknown
48s
created
htdocs/search.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 $load_query = false;
89 89
 $show_lastsearchbutton = true;
90 90
 
91
-$list_caches = isset($_REQUEST['addCache']) &&  $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : '';
91
+$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : '';
92 92
 $added_waypoints = 0;
93 93
 
94 94
 if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) {  // Ocprop: showresult, queryid
@@ -255,20 +255,20 @@  discard block
 block discarded – undo
255 255
     }
256 256
 
257 257
     // get the search options parameters and store them in the queries table (to view "the next page")
258
-    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? (int) $_REQUEST['f_userowner'] : 0; // Ocprop
259
-    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? (int) $_REQUEST['f_userfound'] : 0; // Ocprop
260
-    $options['f_unpublished'] = isset($_REQUEST['f_unpublished']) ? (int) $_REQUEST['f_unpublished'] : 0;
261
-    $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? (int) $_REQUEST['f_disabled'] : 0;
262
-    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? (int) $_REQUEST['f_inactive'] : 1; // Ocprop
258
+    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? (int)$_REQUEST['f_userowner'] : 0; // Ocprop
259
+    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? (int)$_REQUEST['f_userfound'] : 0; // Ocprop
260
+    $options['f_unpublished'] = isset($_REQUEST['f_unpublished']) ? (int)$_REQUEST['f_unpublished'] : 0;
261
+    $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? (int)$_REQUEST['f_disabled'] : 0;
262
+    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? (int)$_REQUEST['f_inactive'] : 1; // Ocprop
263 263
     // f_inactive formerly was used for both, archived and disabled caches.
264 264
     // After adding the separate f_disabled option, it is used only for archived
265 265
     // caches, but keeps its name for compatibility with existing stored or
266 266
     // external searches.
267
-    $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? (int) $_REQUEST['f_ignored'] : 1;
268
-    $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? (int) $_REQUEST['f_otherPlatforms'] : 0;
269
-    $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? (int) $_REQUEST['f_geokrets'] : 0;
270
-    $options['expert'] = isset($_REQUEST['expert']) ? (int) $_REQUEST['expert'] : 0; // Ocprop: 0
271
-    $options['showresult'] = isset($_REQUEST['showresult']) ? (int) $_REQUEST['showresult'] : 0;
267
+    $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? (int)$_REQUEST['f_ignored'] : 1;
268
+    $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? (int)$_REQUEST['f_otherPlatforms'] : 0;
269
+    $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? (int)$_REQUEST['f_geokrets'] : 0;
270
+    $options['expert'] = isset($_REQUEST['expert']) ? (int)$_REQUEST['expert'] : 0; // Ocprop: 0
271
+    $options['showresult'] = isset($_REQUEST['showresult']) ? (int)$_REQUEST['showresult'] : 0;
272 272
     $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
273 273
     $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
274 274
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     } elseif (isset($_REQUEST['searchbyowner'])) { // Ocprop
323 323
         $options['searchtype'] = 'byowner';
324 324
 
325
-        $options['ownerid'] = isset($_REQUEST['ownerid']) ? (int) $_REQUEST['ownerid'] : 0;
325
+        $options['ownerid'] = isset($_REQUEST['ownerid']) ? (int)$_REQUEST['ownerid'] : 0;
326 326
         $options['owner'] = isset($_REQUEST['owner']) ? stripslashes($_REQUEST['owner']) : '';
327 327
 
328 328
         if (isset($options['owner'])) {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     } elseif (isset($_REQUEST['searchbyfinder'])) { // Ocprop
339 339
         $options['searchtype'] = 'byfinder';
340 340
 
341
-        $options['finderid'] = isset($_REQUEST['finderid']) ? (int) $_REQUEST['finderid'] : 0;
341
+        $options['finderid'] = isset($_REQUEST['finderid']) ? (int)$_REQUEST['finderid'] : 0;
342 342
         $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
343 343
         $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
344 344
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             $options['lon_min'] = isset($_REQUEST['lon_min']) ? $_REQUEST['lon_min'] : 0;
394 394
         }
395 395
 
396
-        $options['distance'] = isset($_REQUEST['distance']) ? (int) $_REQUEST['distance'] : 0;
396
+        $options['distance'] = isset($_REQUEST['distance']) ? (int)$_REQUEST['distance'] : 0;
397 397
     } elseif (isset($_REQUEST['searchbyfulltext'])) {
398 398
         $options['searchtype'] = 'byfulltext';
399 399
 
@@ -460,11 +460,11 @@  discard block
 block discarded – undo
460 460
     $options['cachetype'] = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] : '';
461 461
 
462 462
     $options['cachesize'] = isset($_REQUEST['cachesize']) ? $_REQUEST['cachesize'] : '';
463
-    $options['difficultymin'] = isset($_REQUEST['difficultymin']) ? (int) $_REQUEST['difficultymin'] : 0;
464
-    $options['difficultymax'] = isset($_REQUEST['difficultymax']) ? (int) $_REQUEST['difficultymax'] : 0;
465
-    $options['terrainmin'] = isset($_REQUEST['terrainmin']) ? (int) $_REQUEST['terrainmin'] : 0;
466
-    $options['terrainmax'] = isset($_REQUEST['terrainmax']) ? (int) $_REQUEST['terrainmax'] : 0;
467
-    $options['recommendationmin'] = isset($_REQUEST['recommendationmin']) ? (int) $_REQUEST['recommendationmin'] : 0;
463
+    $options['difficultymin'] = isset($_REQUEST['difficultymin']) ? (int)$_REQUEST['difficultymin'] : 0;
464
+    $options['difficultymax'] = isset($_REQUEST['difficultymax']) ? (int)$_REQUEST['difficultymax'] : 0;
465
+    $options['terrainmin'] = isset($_REQUEST['terrainmin']) ? (int)$_REQUEST['terrainmin'] : 0;
466
+    $options['terrainmax'] = isset($_REQUEST['terrainmax']) ? (int)$_REQUEST['terrainmax'] : 0;
467
+    $options['recommendationmin'] = isset($_REQUEST['recommendationmin']) ? (int)$_REQUEST['recommendationmin'] : 0;
468 468
 
469 469
     if (in_array($options['searchtype'], ['byort', 'byplz', 'bydistance', 'bywaypoint'])) {
470 470
         // For distance-based searches, sort by distance instead of name.
@@ -1297,11 +1297,11 @@  discard block
 block discarded – undo
1297 1297
 
1298 1298
         //add selected caches to selected cachelist
1299 1299
         if (isset($_REQUEST['addToList']) && isset($_REQUEST['addCache']) && isset($_REQUEST['selectCachelist'])) {
1300
-            $list_caches_= $_REQUEST['addToList'];
1300
+            $list_caches_ = $_REQUEST['addToList'];
1301 1301
             $added_waypoints = addToList($list_caches);
1302
-            $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID
1302
+            $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID
1303 1303
         } elseif (isset($_REQUEST['addToList'])) {
1304
-            $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID
1304
+            $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID
1305 1305
             $error_addCaches = true;
1306 1306
         }
1307 1307
 
@@ -1773,7 +1773,7 @@  discard block
 block discarded – undo
1773 1773
     $tpl->assign('searchtype_byname', $options['searchtype'] == 'byname');
1774 1774
 
1775 1775
     // distance
1776
-    $tpl->assign('distance', isset($options['distance']) ? (int) $options['distance'] : DEFAULT_SEARCH_DISTANCE);
1776
+    $tpl->assign('distance', isset($options['distance']) ? (int)$options['distance'] : DEFAULT_SEARCH_DISTANCE);
1777 1777
 
1778 1778
     if (!isset($options['unit'])) {
1779 1779
         $options['unit'] = DEFAULT_DISTANCE_UNIT;
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CacheCoordinatesRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $databaseArray
161 161
         );
162 162
 
163
-        $entity->id = (int) $this->connection->lastInsertId();
163
+        $entity->id = (int)$this->connection->lastInsertId();
164 164
 
165 165
         return $entity;
166 166
     }
@@ -241,12 +241,12 @@  discard block
 block discarded – undo
241 241
     public function getEntityFromDatabaseArray(array $data)
242 242
     : GeoCacheCoordinatesEntity {
243 243
         $entity = new GeoCacheCoordinatesEntity();
244
-        $entity->id = (int) $data['id'];
244
+        $entity->id = (int)$data['id'];
245 245
         $entity->dateCreated = new DateTime($data['date_created']);
246
-        $entity->cacheId = (int) $data['cache_id'];
246
+        $entity->cacheId = (int)$data['cache_id'];
247 247
         $entity->longitude = $data['longitude'];
248 248
         $entity->latitude = $data['latitude'];
249
-        $entity->restoredBy = (int) $data['restored_by'];
249
+        $entity->restoredBy = (int)$data['restored_by'];
250 250
         if ($entity->restoredBy != 0) {
251 251
             $entity->user = $this->userRepository->fetchOneById($entity->restoredBy);
252 252
         }
Please login to merge, or discard this patch.
htdocs_symfony/public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     Request::setTrustedHosts([$trustedHosts]);
30 30
 }
31 31
 
32
-$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
32
+$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
33 33
 $request = Request::createFromGlobals();
34 34
 $response = $kernel->handle($request);
35 35
 $response->send();
Please login to merge, or discard this patch.
htdocs_symfony/src/Controller/Backend/RolesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
             $inputData = $form->getData();
152 152
             $userId = $inputData['content_user_searchfield'];
153 153
 
154
-            $fetchedUser = $this->userRepository->fetchOneById((int) $userId);
154
+            $fetchedUser = $this->userRepository->fetchOneById((int)$userId);
155 155
         }
156 156
 
157 157
         return $this->render(
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/UserRolesRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $databaseArray
157 157
         );
158 158
 
159
-        $entity->id = (int) $this->connection->lastInsertId();
159
+        $entity->id = (int)$this->connection->lastInsertId();
160 160
 
161 161
         return $entity;
162 162
     }
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
     public function getEntityFromDatabaseArray(array $data)
273 273
     : UserRolesEntity {
274 274
         $entity = new UserRolesEntity();
275
-        $entity->id = (int) $data['id'];
276
-        $entity->userId = (string) $data['user_id'];
277
-        $entity->roleId = (string) $data['role_id'];
275
+        $entity->id = (int)$data['id'];
276
+        $entity->userId = (string)$data['user_id'];
277
+        $entity->roleId = (string)$data['role_id'];
278 278
 
279 279
         return $entity;
280 280
     }
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CacheStatusModifiedRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             $databaseArray
168 168
         );
169 169
 
170
-        $entity->cacheId = (int) $this->connection->lastInsertId();
170
+        $entity->cacheId = (int)$this->connection->lastInsertId();
171 171
 
172 172
         return $entity;
173 173
     }
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
     public function getEntityFromDatabaseArray(array $data)
247 247
     : GeoCacheStatusModifiedEntity {
248 248
         $entity = new GeoCacheStatusModifiedEntity();
249
-        $entity->cacheId = (int) $data['cache_id'];
249
+        $entity->cacheId = (int)$data['cache_id'];
250 250
         $entity->dateModified = new DateTime($data['date_modified']);
251
-        $entity->oldState = (int) $data['old_state'];
252
-        $entity->newState = (int) $data['new_state'];
253
-        $entity->userId = (int) $data['user_id'];
251
+        $entity->oldState = (int)$data['old_state'];
252
+        $entity->newState = (int)$data['new_state'];
253
+        $entity->userId = (int)$data['user_id'];
254 254
         $entity->user = $this->userRepository->fetchOneById($entity->userId);
255 255
         $entity->cacheStatusOld = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->oldState]);
256 256
         $entity->cacheStatusNew = $this->cacheStatusRepository->fetchOneBy(['id' => $entity->newState]);
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CacheStatusRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $databaseArray
147 147
         );
148 148
 
149
-        $entity->id = (int) $this->connection->lastInsertId();
149
+        $entity->id = (int)$this->connection->lastInsertId();
150 150
 
151 151
         return $entity;
152 152
     }
@@ -226,14 +226,14 @@  discard block
 block discarded – undo
226 226
     public function getEntityFromDatabaseArray(array $data)
227 227
     : GeoCacheStatusEntity {
228 228
         $entity = new GeoCacheStatusEntity();
229
-        $entity->id = (int) $data['id'];
230
-        $entity->name = (string) $data['name'];
231
-        $entity->transId = (int) $data['trans_id'];
232
-        $entity->de = (string) $data['de'];
233
-        $entity->en = (string) $data['en'];
234
-        $entity->allowUserView = (int) $data['allow_user_view'];
235
-        $entity->allowOwnerEditStatus = (int) $data['allow_owner_edit_status'];
236
-        $entity->allowUserLog = (int) $data['allow_user_log'];
229
+        $entity->id = (int)$data['id'];
230
+        $entity->name = (string)$data['name'];
231
+        $entity->transId = (int)$data['trans_id'];
232
+        $entity->de = (string)$data['de'];
233
+        $entity->en = (string)$data['en'];
234
+        $entity->allowUserView = (int)$data['allow_user_view'];
235
+        $entity->allowOwnerEditStatus = (int)$data['allow_owner_edit_status'];
236
+        $entity->allowUserLog = (int)$data['allow_user_log'];
237 237
 
238 238
         return $entity;
239 239
     }
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CacheLogsArchivedRepository.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $databaseArray
156 156
         );
157 157
 
158
-        $entity->id = (int) $this->connection->lastInsertId();
158
+        $entity->id = (int)$this->connection->lastInsertId();
159 159
 
160 160
         return $entity;
161 161
     }
@@ -252,30 +252,30 @@  discard block
 block discarded – undo
252 252
     public function getEntityFromDatabaseArray(array $data)
253 253
     : GeoCacheLogsArchivedEntity {
254 254
         $entity = new GeoCacheLogsArchivedEntity();
255
-        $entity->id = (int) $data['id'];
256
-        $entity->uuid = (string) $data['uuid'];
257
-        $entity->node = (int) $data['node'];
255
+        $entity->id = (int)$data['id'];
256
+        $entity->uuid = (string)$data['uuid'];
257
+        $entity->node = (int)$data['node'];
258 258
         $entity->dateCreated = new DateTime($data['date_created']);
259 259
         $entity->entryLastModified = new DateTime($data['entry_last_modified']);
260 260
         $entity->lastModified = date('Y-m-d H:i:s');
261
-        $entity->okapiSyncbase = (string) $data['okapi_syncbase'];
261
+        $entity->okapiSyncbase = (string)$data['okapi_syncbase'];
262 262
         $entity->logLastModified = new DateTime($data['log_last_modified']);
263
-        $entity->cacheId = (int) $data['cache_id'];
264
-        $entity->userId = (int) $data['user_id'];
265
-        $entity->type = (int) $data['type'];
266
-        $entity->ocTeamComment = (int) $data['oc_team_comment'];
263
+        $entity->cacheId = (int)$data['cache_id'];
264
+        $entity->userId = (int)$data['user_id'];
265
+        $entity->type = (int)$data['type'];
266
+        $entity->ocTeamComment = (int)$data['oc_team_comment'];
267 267
         $entity->date = new DateTime($data['date']);
268 268
         $entity->orderDate = new DateTime($data['order_date']);
269
-        $entity->needsMaintenance = (int) $data['needs_maintenance'];
270
-        $entity->listingOutdated = (int) $data['listing_outdated'];
271
-        $entity->text = (string) $data['text'];
272
-        $entity->textHtml = (int) $data['text_html'];
273
-        $entity->textHtmledit = (int) $data['text_htmledit'];
274
-        $entity->ownerNotified = (int) $data['owner_notified'];
269
+        $entity->needsMaintenance = (int)$data['needs_maintenance'];
270
+        $entity->listingOutdated = (int)$data['listing_outdated'];
271
+        $entity->text = (string)$data['text'];
272
+        $entity->textHtml = (int)$data['text_html'];
273
+        $entity->textHtmledit = (int)$data['text_htmledit'];
274
+        $entity->ownerNotified = (int)$data['owner_notified'];
275 275
         $entity->picture = $data['picture'];
276 276
         $entity->deletionDate = new DateTime($data['deletion_date']);
277
-        $entity->deletedBy = (int) $data['deleted_by'];
278
-        $entity->restoredBy = (int) $data['restored_by'];
277
+        $entity->deletedBy = (int)$data['deleted_by'];
278
+        $entity->restoredBy = (int)$data['restored_by'];
279 279
 
280 280
         return $entity;
281 281
     }
Please login to merge, or discard this patch.
htdocs_symfony/src/Repository/CacheSizeRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $databaseArray
147 147
         );
148 148
 
149
-        $entity->id = (int) $this->connection->lastInsertId();
149
+        $entity->id = (int)$this->connection->lastInsertId();
150 150
 
151 151
         return $entity;
152 152
     }
@@ -224,12 +224,12 @@  discard block
 block discarded – undo
224 224
     public function getEntityFromDatabaseArray(array $data)
225 225
     : GeoCacheSizeEntity {
226 226
         $entity = new GeoCacheSizeEntity();
227
-        $entity->id = (int) $data['id'];
228
-        $entity->name = (string) $data['name'];
229
-        $entity->transId = (int) $data['trans_id'];
230
-        $entity->ordinal = (int) $data['ordinal'];
231
-        $entity->de = (string) $data['de'];
232
-        $entity->en = (string) $data['en'];
227
+        $entity->id = (int)$data['id'];
228
+        $entity->name = (string)$data['name'];
229
+        $entity->transId = (int)$data['trans_id'];
230
+        $entity->ordinal = (int)$data['ordinal'];
231
+        $entity->de = (string)$data['de'];
232
+        $entity->en = (string)$data['en'];
233 233
 
234 234
         return $entity;
235 235
     }
Please login to merge, or discard this patch.