@@ -13,10 +13,10 @@ |
||
| 13 | 13 | $tpl->name = 'usertops'; |
| 14 | 14 | $tpl->menuitem = MNU_CACHES_USERTOPS; |
| 15 | 15 | |
| 16 | -$userId = (int) isset($_REQUEST['userid']) ? $_REQUEST['userid']: 0; |
|
| 16 | +$userId = (int)isset($_REQUEST['userid']) ? $_REQUEST['userid'] : 0; |
|
| 17 | 17 | $ocOnly = isset($_REQUEST['oconly']) && $_REQUEST['oconly']; |
| 18 | 18 | |
| 19 | -$sUsername = $connection->fetchOne('SELECT `username` FROM `user` WHERE `user_id` = :userId',['userId' => $userId]); |
|
| 19 | +$sUsername = $connection->fetchOne('SELECT `username` FROM `user` WHERE `user_id` = :userId', ['userId' => $userId]); |
|
| 20 | 20 | if ($sUsername == null) { |
| 21 | 21 | $tpl->error(ERROR_USER_NOT_EXISTS); |
| 22 | 22 | } |
@@ -75,16 +75,16 @@ discard block |
||
| 75 | 75 | // current cache and log-counters |
| 76 | 76 | $tpl->assign( |
| 77 | 77 | 'count_hiddens', |
| 78 | - number1000((int) $connection->fetchOne('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
| 78 | + number1000((int)$connection->fetchOne('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
| 79 | 79 | ); |
| 80 | 80 | $tpl->assign( |
| 81 | 81 | 'count_founds', |
| 82 | - number1000((int) $connection->fetchOne('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
| 82 | + number1000((int)$connection->fetchOne('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
| 83 | 83 | ); |
| 84 | 84 | $tpl->assign( |
| 85 | 85 | 'count_users', |
| 86 | 86 | number1000( |
| 87 | - (int) $connection->fetchOne( |
|
| 87 | + (int)$connection->fetchOne( |
|
| 88 | 88 | 'SELECT COUNT(*) AS `users` |
| 89 | 89 | FROM ( |
| 90 | 90 | SELECT DISTINCT `user_id` |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | // get total event count for all countries |
| 103 | 103 | $tpl->assign( |
| 104 | 104 | 'total_events', |
| 105 | - (int) $connection->fetchOne( |
|
| 105 | + (int)$connection->fetchOne( |
|
| 106 | 106 | 'SELECT COUNT(*) |
| 107 | 107 | FROM `caches` |
| 108 | 108 | WHERE `type` = 6 |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | WHERE cache_id = :cacheId; |
| 228 | 228 | SQL |
| 229 | 229 | , [ |
| 230 | - 'cacheId' => (int) $cache['cache_id'], |
|
| 230 | + 'cacheId' => (int)$cache['cache_id'], |
|
| 231 | 231 | ]); |
| 232 | 232 | |
| 233 | 233 | $this->connection->executeQuery(<<<'SQL' |
@@ -239,19 +239,19 @@ discard block |
||
| 239 | 239 | WHERE cache_id = :cacheId |
| 240 | 240 | SQL |
| 241 | 241 | , [ |
| 242 | - 'cacheId' => (int) $cache['cache_id'], |
|
| 242 | + 'cacheId' => (int)$cache['cache_id'], |
|
| 243 | 243 | ]); |
| 244 | 244 | |
| 245 | 245 | $this->connection->executeQuery('DELETE FROM cache_desc_modified WHERE cache_id = :cacheId', [ |
| 246 | - 'cacheId' => (int) $cache['cache_id'], |
|
| 246 | + 'cacheId' => (int)$cache['cache_id'], |
|
| 247 | 247 | ]); |
| 248 | 248 | |
| 249 | 249 | $this->connection->executeQuery('DELETE FROM cache_ignore WHERE cache_id = :cacheId', [ |
| 250 | - 'cacheId' => (int) $cache['cache_id'], |
|
| 250 | + 'cacheId' => (int)$cache['cache_id'], |
|
| 251 | 251 | ]); |
| 252 | 252 | |
| 253 | 253 | $this->connection->executeQuery('DELETE FROM caches_modified WHERE cache_id = :cacheId', [ |
| 254 | - 'cacheId' => (int) $cache['cache_id'], |
|
| 254 | + 'cacheId' => (int)$cache['cache_id'], |
|
| 255 | 255 | ]); |
| 256 | 256 | } |
| 257 | 257 | } |
@@ -265,8 +265,8 @@ discard block |
||
| 265 | 265 | return []; |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
| 269 | - return (int) $cache[$idField]; |
|
| 268 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
| 269 | + return (int)$cache[$idField]; |
|
| 270 | 270 | }, $data); |
| 271 | 271 | |
| 272 | 272 | $pictures = $this->connection->fetchAllAssociative('SELECT * FROM pictures WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |
@@ -286,8 +286,8 @@ discard block |
||
| 286 | 286 | return []; |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | - $ids = array_map(static function (array $cache) use ($idField) { |
|
| 290 | - return (int) $cache[$idField]; |
|
| 289 | + $ids = array_map(static function(array $cache) use ($idField) { |
|
| 290 | + return (int)$cache[$idField]; |
|
| 291 | 291 | }, $data); |
| 292 | 292 | |
| 293 | 293 | return $this->connection->fetchAllAssociative('SELECT * FROM pictures_modified WHERE object_id IN (' . implode(',', $ids) . ') AND object_type = :objectType', [ |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | private function ocOnly81_get_matrixData() |
| 62 | 62 | : array |
| 63 | 63 | { |
| 64 | - for ($i = 0; $i <= 8; $i ++) { |
|
| 65 | - for ($j = 0; $j <= 8; $j ++) { |
|
| 64 | + for ($i = 0; $i <= 8; $i++) { |
|
| 65 | + for ($j = 0; $j <= 8; $j++) { |
|
| 66 | 66 | $matrix[$i][$j] = 0; |
| 67 | 67 | $dsum[$i] = 0; |
| 68 | 68 | $tsum[$i] = 0; |
@@ -79,10 +79,10 @@ discard block |
||
| 79 | 79 | $data = $qb->executeQuery()->fetchAllAssociative(); |
| 80 | 80 | |
| 81 | 81 | foreach ($data as $item) { |
| 82 | - $matrix[$item['difficulty'] - 2][$item['terrain'] - 2] ++; |
|
| 82 | + $matrix[$item['difficulty'] - 2][$item['terrain'] - 2]++; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - for ($i = 0; $i <= 8; $i ++) { |
|
| 85 | + for ($i = 0; $i <= 8; $i++) { |
|
| 86 | 86 | $dsum[$i] = $dsum[$i] + array_sum($matrix[$i]); |
| 87 | 87 | $tsum[$i] = $tsum[$i] + array_sum(array_column($matrix, $i)); |
| 88 | 88 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | 'count' => 1 |
| 124 | 124 | ]; |
| 125 | 125 | } else { |
| 126 | - $result[$item['user_id']]['count'] ++; |
|
| 126 | + $result[$item['user_id']]['count']++; |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | return $this->render( |
| 189 | 189 | 'backend/support/searchedCaches.html.twig', [ |
| 190 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 191 | - 'foundCaches' => $fetchedCaches |
|
| 192 | - ] |
|
| 190 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 191 | + 'foundCaches' => $fetchedCaches |
|
| 192 | + ] |
|
| 193 | 193 | ); |
| 194 | 194 | } |
| 195 | 195 | |
@@ -211,9 +211,9 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | return $this->render( |
| 213 | 213 | 'backend/support/reportedCaches.html.twig', [ |
| 214 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 215 | - 'reportedCaches_by_id' => $fetchedReports |
|
| 216 | - ] |
|
| 214 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 215 | + 'reportedCaches_by_id' => $fetchedReports |
|
| 216 | + ] |
|
| 217 | 217 | ); |
| 218 | 218 | } |
| 219 | 219 | |
@@ -233,10 +233,10 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | return $this->render( |
| 235 | 235 | 'backend/support/bonusCaches.html.twig', [ |
| 236 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 237 | - 'supportAssignBonusCacheForm' => $formAssignBonusCache->createView(), |
|
| 238 | - 'bonusCaches_by_id' => $fetchedBonuscaches |
|
| 239 | - ] |
|
| 236 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 237 | + 'supportAssignBonusCacheForm' => $formAssignBonusCache->createView(), |
|
| 238 | + 'bonusCaches_by_id' => $fetchedBonuscaches |
|
| 239 | + ] |
|
| 240 | 240 | ); |
| 241 | 241 | } |
| 242 | 242 | |
@@ -259,10 +259,10 @@ discard block |
||
| 259 | 259 | |
| 260 | 260 | return $this->render( |
| 261 | 261 | 'backend/support/bonusCachesAssignment.html.twig', [ |
| 262 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 263 | - 'bonus_Cache' => $wpID, |
|
| 264 | - 'caches_by_owner' => $fetchedOwnerCaches |
|
| 265 | - ] |
|
| 262 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 263 | + 'bonus_Cache' => $wpID, |
|
| 264 | + 'caches_by_owner' => $fetchedOwnerCaches |
|
| 265 | + ] |
|
| 266 | 266 | ); |
| 267 | 267 | } |
| 268 | 268 | |
@@ -290,10 +290,10 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | return $this->render( |
| 292 | 292 | 'backend/support/bonusCachesAssignment.html.twig', [ |
| 293 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 294 | - 'bonus_Cache' => $toBonusCache, |
|
| 295 | - 'caches_by_owner' => $fetchedOwnerCaches |
|
| 296 | - ] |
|
| 293 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 294 | + 'bonus_Cache' => $toBonusCache, |
|
| 295 | + 'caches_by_owner' => $fetchedOwnerCaches |
|
| 296 | + ] |
|
| 297 | 297 | ); |
| 298 | 298 | } |
| 299 | 299 | |
@@ -401,10 +401,10 @@ discard block |
||
| 401 | 401 | |
| 402 | 402 | return $this->render( |
| 403 | 403 | 'backend/support/databaseQueries.html.twig', [ |
| 404 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 405 | - 'SQLFlexForm' => $formSQLFlex->createView(), |
|
| 406 | - 'suppSQLqueryFlex' => $fetchedInformation |
|
| 407 | - ] |
|
| 404 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 405 | + 'SQLFlexForm' => $formSQLFlex->createView(), |
|
| 406 | + 'suppSQLqueryFlex' => $fetchedInformation |
|
| 407 | + ] |
|
| 408 | 408 | ); |
| 409 | 409 | } |
| 410 | 410 | |
@@ -541,16 +541,16 @@ discard block |
||
| 541 | 541 | |
| 542 | 542 | return $this->render( |
| 543 | 543 | 'backend/support/occ.html.twig', [ |
| 544 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 545 | - 'supportCommentFormUser' => $formCommentUser->createView(), |
|
| 546 | - 'supportCommentFormCache' => $formCommentCache->createView(), |
|
| 547 | - 'occ_cache_data' => $fetchedCacheData, |
|
| 548 | - 'occ_cache_comments' => $fetchedCacheComments, |
|
| 549 | - 'occ_cache_infos' => $fetchedCacheInfos, |
|
| 550 | - 'occ_user_data' => $fetchedUserData, |
|
| 551 | - 'occ_user_comments' => $fetchedUserComments, |
|
| 552 | - 'occ_user_relations' => $fetchedUserRelations |
|
| 553 | - ] |
|
| 544 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 545 | + 'supportCommentFormUser' => $formCommentUser->createView(), |
|
| 546 | + 'supportCommentFormCache' => $formCommentCache->createView(), |
|
| 547 | + 'occ_cache_data' => $fetchedCacheData, |
|
| 548 | + 'occ_cache_comments' => $fetchedCacheComments, |
|
| 549 | + 'occ_cache_infos' => $fetchedCacheInfos, |
|
| 550 | + 'occ_user_data' => $fetchedUserData, |
|
| 551 | + 'occ_user_comments' => $fetchedUserComments, |
|
| 552 | + 'occ_user_relations' => $fetchedUserRelations |
|
| 553 | + ] |
|
| 554 | 554 | ); |
| 555 | 555 | } |
| 556 | 556 | |
@@ -682,10 +682,10 @@ discard block |
||
| 682 | 682 | |
| 683 | 683 | return $this->render( |
| 684 | 684 | 'backend/support/userDetails.html.twig', [ |
| 685 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 686 | - 'supportUserAccountActions' => $formActions->createView(), |
|
| 687 | - 'user_account_details' => $fetchedUserDetails |
|
| 688 | - ] |
|
| 685 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 686 | + 'supportUserAccountActions' => $formActions->createView(), |
|
| 687 | + 'user_account_details' => $fetchedUserDetails |
|
| 688 | + ] |
|
| 689 | 689 | ); |
| 690 | 690 | } |
| 691 | 691 | |
@@ -781,9 +781,9 @@ discard block |
||
| 781 | 781 | |
| 782 | 782 | return $this->render( |
| 783 | 783 | 'backend/support/databaseQueries.html.twig', [ |
| 784 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 785 | - 'suppSQLquery1' => $qb->executeQuery()->fetchAllAssociative() |
|
| 786 | - ] |
|
| 784 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 785 | + 'suppSQLquery1' => $qb->executeQuery()->fetchAllAssociative() |
|
| 786 | + ] |
|
| 787 | 787 | ); |
| 788 | 788 | } |
| 789 | 789 | |
@@ -809,9 +809,9 @@ discard block |
||
| 809 | 809 | |
| 810 | 810 | return $this->render( |
| 811 | 811 | 'backend/support/databaseQueries.html.twig', [ |
| 812 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 813 | - 'suppSQLquery2' => $qb->executeQuery()->fetchAllAssociative() |
|
| 814 | - ] |
|
| 812 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 813 | + 'suppSQLquery2' => $qb->executeQuery()->fetchAllAssociative() |
|
| 814 | + ] |
|
| 815 | 815 | ); |
| 816 | 816 | } |
| 817 | 817 | |
@@ -844,9 +844,9 @@ discard block |
||
| 844 | 844 | |
| 845 | 845 | return $this->render( |
| 846 | 846 | 'backend/support/databaseQueries.html.twig', [ |
| 847 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 848 | - 'suppSQLquery4' => $qb->executeQuery()->fetchAllAssociative() |
|
| 849 | - ] |
|
| 847 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 848 | + 'suppSQLquery4' => $qb->executeQuery()->fetchAllAssociative() |
|
| 849 | + ] |
|
| 850 | 850 | ); |
| 851 | 851 | } |
| 852 | 852 | |
@@ -863,9 +863,9 @@ discard block |
||
| 863 | 863 | |
| 864 | 864 | return $this->render( |
| 865 | 865 | 'backend/support/databaseQueries.html.twig', [ |
| 866 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 867 | - 'suppSQLquery5' => $this->supportUserCommentsRepository->fetchAll() |
|
| 868 | - ] |
|
| 866 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 867 | + 'suppSQLquery5' => $this->supportUserCommentsRepository->fetchAll() |
|
| 868 | + ] |
|
| 869 | 869 | ); |
| 870 | 870 | } |
| 871 | 871 | |
@@ -909,9 +909,9 @@ discard block |
||
| 909 | 909 | |
| 910 | 910 | return $this->render( |
| 911 | 911 | 'backend/support/databaseQueries.html.twig', [ |
| 912 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 913 | - 'suppSQLquery6' => $qb_caches_list |
|
| 914 | - ] |
|
| 912 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 913 | + 'suppSQLquery6' => $qb_caches_list |
|
| 914 | + ] |
|
| 915 | 915 | ); |
| 916 | 916 | } |
| 917 | 917 | |
@@ -1030,15 +1030,15 @@ discard block |
||
| 1030 | 1030 | |
| 1031 | 1031 | return $this->render( |
| 1032 | 1032 | 'backend/support/occ_gpx_import.html.twig', [ |
| 1033 | - 'supportCachesForm' => $formSearch->createView(), |
|
| 1034 | - 'supportUploadGPXForm' => $formUpload->createView(), |
|
| 1035 | - 'amountProcessedCaches' => $amountProcessedCaches, |
|
| 1036 | - 'amountAssignedCaches' => $amountAssignedCaches, |
|
| 1037 | - 'amountUpdatedCaches' => $amountUpdatedCaches, |
|
| 1038 | - 'listOfAmbiguousCaches' => $listOfAmbiguousCaches, |
|
| 1039 | - 'fetchedListingInfos' => $fetchedListingInfos, |
|
| 1040 | - 'differencesDetected' => $differencesDetected |
|
| 1041 | - ] |
|
| 1033 | + 'supportCachesForm' => $formSearch->createView(), |
|
| 1034 | + 'supportUploadGPXForm' => $formUpload->createView(), |
|
| 1035 | + 'amountProcessedCaches' => $amountProcessedCaches, |
|
| 1036 | + 'amountAssignedCaches' => $amountAssignedCaches, |
|
| 1037 | + 'amountUpdatedCaches' => $amountUpdatedCaches, |
|
| 1038 | + 'listOfAmbiguousCaches' => $listOfAmbiguousCaches, |
|
| 1039 | + 'fetchedListingInfos' => $fetchedListingInfos, |
|
| 1040 | + 'differencesDetected' => $differencesDetected |
|
| 1041 | + ] |
|
| 1042 | 1042 | ); |
| 1043 | 1043 | } |
| 1044 | 1044 | |
@@ -1205,11 +1205,11 @@ discard block |
||
| 1205 | 1205 | ] as $checkItem) { |
| 1206 | 1206 | if ($wpt[$checkItem] != $fetchedExistingSupportListingInfoArray[$checkItem]) { |
| 1207 | 1207 | $newComment .= $checkItem |
| 1208 | - . ' changed from ' |
|
| 1209 | - . $fetchedExistingSupportListingInfoArray[$checkItem] |
|
| 1210 | - . ' to ' |
|
| 1211 | - . $wpt[$checkItem] |
|
| 1212 | - . PHP_EOL; |
|
| 1208 | + . ' changed from ' |
|
| 1209 | + . $fetchedExistingSupportListingInfoArray[$checkItem] |
|
| 1210 | + . ' to ' |
|
| 1211 | + . $wpt[$checkItem] |
|
| 1212 | + . PHP_EOL; |
|
| 1213 | 1213 | } |
| 1214 | 1214 | } |
| 1215 | 1215 | |