@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | $fieldNoteService = AppKernel::Container()->get(FieldNoteService::class); |
| 50 | 50 | |
| 51 | 51 | $fieldNote = $fieldNoteService->fetchOneBy([ |
| 52 | - 'id' => (int) $_GET['fieldnoteid'], |
|
| 53 | - 'user_id' => (int) $user->getUserId() |
|
| 52 | + 'id' => (int)$_GET['fieldnoteid'], |
|
| 53 | + 'user_id' => (int)$user->getUserId() |
|
| 54 | 54 | ]); |
| 55 | 55 | |
| 56 | 56 | if ($fieldNote !== null) { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | // get log text editor mode (from form or from userprofile) |
| 172 | 172 | // 1 = text; 2 = HTML; 3 = tinyMCE |
| 173 | 173 | if (isset($_POST['descMode'])) { |
| 174 | - $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
| 174 | + $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
| 175 | 175 | if (($descMode < 1) || ($descMode > 3)) { |
| 176 | 176 | $descMode = 3; |
| 177 | 177 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) { |
| 314 | 314 | sql( |
| 315 | 315 | 'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2', |
| 316 | - (int) $_REQUEST['fieldnoteid'], |
|
| 316 | + (int)$_REQUEST['fieldnoteid'], |
|
| 317 | 317 | $user->getUserId() |
| 318 | 318 | ); |
| 319 | 319 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | ); |
| 38 | 38 | if ($r) { |
| 39 | 39 | if ($r['object_type'] == 1) { |
| 40 | - $check = (int) $connection |
|
| 40 | + $check = (int)$connection |
|
| 41 | 41 | ->fetchColumn( |
| 42 | 42 | 'SELECT COUNT(*) |
| 43 | 43 | FROM `cache_logs` |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | } elseif ($r['object_type'] == 2) { |
| 65 | - $check = (int) $connection |
|
| 65 | + $check = (int)$connection |
|
| 66 | 66 | ->fetchColumn( |
| 67 | 67 | 'SELECT COUNT(*) |
| 68 | 68 | FROM `caches` |
@@ -142,22 +142,22 @@ |
||
| 142 | 142 | |
| 143 | 143 | $tpl->assign('showdetails', true); |
| 144 | 144 | |
| 145 | - $r['hidden'] = (int) $connection->fetchColumn( |
|
| 145 | + $r['hidden'] = (int)$connection->fetchColumn( |
|
| 146 | 146 | 'SELECT COUNT(*) FROM `caches` WHERE `user_id`=:userId', [':userId' => $r['user_id']] |
| 147 | 147 | ); |
| 148 | - $r['hidden_active'] = (int) $connection->fetchColumn( |
|
| 148 | + $r['hidden_active'] = (int)$connection->fetchColumn( |
|
| 149 | 149 | 'SELECT COUNT(*) FROM `caches` WHERE `user_id`= :userId AND `status`=1', |
| 150 | 150 | [':userId' => $r['user_id']] |
| 151 | 151 | ); |
| 152 | - $r['logentries'] = (int) $connection->fetchColumn( |
|
| 152 | + $r['logentries'] = (int)$connection->fetchColumn( |
|
| 153 | 153 | 'SELECT COUNT(*) FROM `cache_logs` WHERE `user_id`= :userId', |
| 154 | 154 | [':userId' => $r['user_id']] |
| 155 | 155 | ); |
| 156 | - $r['deleted_logentries'] = (int) $connection->fetchColumn( |
|
| 156 | + $r['deleted_logentries'] = (int)$connection->fetchColumn( |
|
| 157 | 157 | 'SELECT COUNT(*) FROM `cache_logs_archived` WHERE `user_id`= :userId', |
| 158 | 158 | [':userId' => $r['user_id']] |
| 159 | 159 | ); |
| 160 | - $r['reports'] = (int) $connection->fetchColumn( |
|
| 160 | + $r['reports'] = (int)$connection->fetchColumn( |
|
| 161 | 161 | 'SELECT COUNT(*) FROM `cache_reports` WHERE `userid`= :userId', |
| 162 | 162 | [':userId' => $r['user_id']] |
| 163 | 163 | ); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | // user.last_login gives the overall last login date, including OKAPI logins. |
| 122 | 122 | |
| 123 | 123 | if ($rUser = sql_fetch_assoc($rs)) { |
| 124 | - if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT / 2 < time())) || |
|
| 124 | + if ((($this->permanent == true) && (strtotime($rUser['last_login']) + LOGIN_TIME_PERMANENT / 2 < time())) || |
|
| 125 | 125 | (($this->permanent == false) && (strtotime($rUser['last_login']) + LOGIN_TIME / 2 < time())) |
| 126 | 126 | ) { |
| 127 | 127 | sql( |
@@ -218,10 +218,10 @@ |
||
| 218 | 218 | $entity->nativeName = $data['native_name']; |
| 219 | 219 | $entity->de = $data['de']; |
| 220 | 220 | $entity->en = $data['en']; |
| 221 | - $entity->translationId = (int) $data['trans_id']; |
|
| 222 | - $entity->listDefaultDe = (bool) $data['list_default_de']; |
|
| 223 | - $entity->listDefaultEn = (bool) $data['list_default_en']; |
|
| 224 | - $entity->isTranslated = (bool) $data['is_translated']; |
|
| 221 | + $entity->translationId = (int)$data['trans_id']; |
|
| 222 | + $entity->listDefaultDe = (bool)$data['list_default_de']; |
|
| 223 | + $entity->listDefaultEn = (bool)$data['list_default_en']; |
|
| 224 | + $entity->isTranslated = (bool)$data['is_translated']; |
|
| 225 | 225 | |
| 226 | 226 | return $entity; |
| 227 | 227 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | if (count($where) > 0) { |
| 58 | 58 | foreach ($where as $column => $value) { |
| 59 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 59 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $databaseArray |
| 94 | 94 | ); |
| 95 | 95 | |
| 96 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 96 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 97 | 97 | |
| 98 | 98 | return $entity; |
| 99 | 99 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | ['id' => $entity->id] |
| 122 | 122 | ); |
| 123 | 123 | |
| 124 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 124 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 125 | 125 | |
| 126 | 126 | return $entity; |
| 127 | 127 | } |
@@ -181,13 +181,13 @@ discard block |
||
| 181 | 181 | public function getEntityFromDatabaseArray(array $data) |
| 182 | 182 | { |
| 183 | 183 | $entity = new PageEntity(); |
| 184 | - $entity->id = (int) $data['id']; |
|
| 184 | + $entity->id = (int)$data['id']; |
|
| 185 | 185 | $entity->slug = $data['slug']; |
| 186 | 186 | $entity->metaKeywords = $data['meta_keywords']; |
| 187 | 187 | $entity->metaDescription = $data['meta_description']; |
| 188 | 188 | $entity->metaSocial = $data['meta_social']; |
| 189 | 189 | $entity->updatedAt = new DateTime($data['updated_at']); |
| 190 | - $entity->active = (bool) $data['active']; |
|
| 190 | + $entity->active = (bool)$data['active']; |
|
| 191 | 191 | |
| 192 | 192 | return $entity; |
| 193 | 193 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if (count($where) > 0) { |
| 56 | 56 | foreach ($where as $column => $value) { |
| 57 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 57 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $databaseArray |
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 100 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 101 | 101 | |
| 102 | 102 | return $entity; |
| 103 | 103 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | ['id' => $entity->id] |
| 126 | 126 | ); |
| 127 | 127 | |
| 128 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 128 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 129 | 129 | |
| 130 | 130 | return $entity; |
| 131 | 131 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | 'page_id' => $entity->pageId, |
| 170 | 170 | 'title' => $entity->title, |
| 171 | 171 | 'html' => $entity->html, |
| 172 | - 'position' => (int) $entity->position, |
|
| 172 | + 'position' => (int)$entity->position, |
|
| 173 | 173 | 'updated_at' => $entity->updatedAt->format(DateTime::ATOM), |
| 174 | 174 | 'active' => $entity->active |
| 175 | 175 | ]; |
@@ -185,13 +185,13 @@ discard block |
||
| 185 | 185 | public function getEntityFromDatabaseArray(array $data) |
| 186 | 186 | { |
| 187 | 187 | $entity = new BlockEntity(); |
| 188 | - $entity->id = (int) $data['id']; |
|
| 189 | - $entity->pageId = (int) $data['page_id']; |
|
| 188 | + $entity->id = (int)$data['id']; |
|
| 189 | + $entity->pageId = (int)$data['page_id']; |
|
| 190 | 190 | $entity->title = $data['title']; |
| 191 | 191 | $entity->html = $data['html']; |
| 192 | - $entity->position = (int) $data['position']; |
|
| 192 | + $entity->position = (int)$data['position']; |
|
| 193 | 193 | $entity->updatedAt = new DateTime($data['updated_at']); |
| 194 | - $entity->active = (bool) $data['active']; |
|
| 194 | + $entity->active = (bool)$data['active']; |
|
| 195 | 195 | |
| 196 | 196 | return $entity; |
| 197 | 197 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | if (count($where) > 0) { |
| 88 | 88 | foreach ($where as $column => $value) { |
| 89 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 89 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if (count($where) > 0) { |
| 120 | 120 | foreach ($where as $column => $value) { |
| 121 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 121 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
@@ -312,38 +312,38 @@ discard block |
||
| 312 | 312 | $entity = new GeoCacheEntity(); |
| 313 | 313 | $entity->cacheId = $data['cache_id']; |
| 314 | 314 | $entity->uuid = $data['uuid']; |
| 315 | - $entity->node = (int) $data['node']; |
|
| 315 | + $entity->node = (int)$data['node']; |
|
| 316 | 316 | $entity->dateCreated = new DateTime($data['date_created']); |
| 317 | - $entity->isPublishdate = (bool) $data['is_publishdate']; |
|
| 317 | + $entity->isPublishdate = (bool)$data['is_publishdate']; |
|
| 318 | 318 | $entity->lastModified = new DateTime($data['last_modified']); |
| 319 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
| 319 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
| 320 | 320 | $entity->listingLastModified = new DateTime($data['listing_last_modified']); |
| 321 | 321 | $entity->metaLastModified = new DateTime($data['meta_last_modified']); |
| 322 | - $entity->userId = (int) $data['user_id']; |
|
| 322 | + $entity->userId = (int)$data['user_id']; |
|
| 323 | 323 | $entity->name = $data['name']; |
| 324 | - $entity->longitude = (double) $data['longitude']; |
|
| 325 | - $entity->latitude = (double) $data['latitude']; |
|
| 326 | - $entity->type = (int) $data['type']; |
|
| 327 | - $entity->status = (int) $data['status']; |
|
| 324 | + $entity->longitude = (double)$data['longitude']; |
|
| 325 | + $entity->latitude = (double)$data['latitude']; |
|
| 326 | + $entity->type = (int)$data['type']; |
|
| 327 | + $entity->status = (int)$data['status']; |
|
| 328 | 328 | $entity->country = $data['country']; |
| 329 | 329 | $entity->dateHidden = new DateTime($data['date_hidden']); |
| 330 | - $entity->size = (int) $data['size']; |
|
| 331 | - $entity->difficulty = (int) $data['difficulty']; |
|
| 332 | - $entity->terrain = (int) $data['terrain']; |
|
| 330 | + $entity->size = (int)$data['size']; |
|
| 331 | + $entity->difficulty = (int)$data['difficulty']; |
|
| 332 | + $entity->terrain = (int)$data['terrain']; |
|
| 333 | 333 | $entity->logpw = $data['logpw']; |
| 334 | - $entity->searchTime = (float) $data['search_time']; |
|
| 335 | - $entity->wayLength = (float) $data['way_length']; |
|
| 334 | + $entity->searchTime = (float)$data['search_time']; |
|
| 335 | + $entity->wayLength = (float)$data['way_length']; |
|
| 336 | 336 | $entity->wpGc = $data['wp_gc']; |
| 337 | 337 | $entity->wpGcMaintained = $data['wp_gc_maintained']; |
| 338 | 338 | $entity->wpOc = $data['wp_oc']; |
| 339 | 339 | $entity->descLanguages = $data['desc_languages']; |
| 340 | 340 | $entity->defaultDesclang = $data['default_desclang']; |
| 341 | 341 | $entity->dateActivate = new DateTime($data['date_activate']); |
| 342 | - $entity->needNpaRecalc = (bool) $data['need_npa_recalc']; |
|
| 343 | - $entity->showCachelists = (bool) $data['show_cachelists']; |
|
| 344 | - $entity->protectOldCoords = (bool) $data['protect_old_coords']; |
|
| 345 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
| 346 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
| 342 | + $entity->needNpaRecalc = (bool)$data['need_npa_recalc']; |
|
| 343 | + $entity->showCachelists = (bool)$data['show_cachelists']; |
|
| 344 | + $entity->protectOldCoords = (bool)$data['protect_old_coords']; |
|
| 345 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
| 346 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
| 347 | 347 | $entity->flagsLastModified = new DateTime($data['flags_last_modified']); |
| 348 | 348 | |
| 349 | 349 | return $entity; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | if (count($where) > 0) { |
| 87 | 87 | foreach ($where as $column => $value) { |
| 88 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 88 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | if (count($where) > 0) { |
| 119 | 119 | foreach ($where as $column => $value) { |
| 120 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 120 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | |
@@ -292,27 +292,27 @@ discard block |
||
| 292 | 292 | public function getEntityFromDatabaseArray(array $data) |
| 293 | 293 | { |
| 294 | 294 | $entity = new GeoCacheLogEntity(); |
| 295 | - $entity->id = (int) $data['id']; |
|
| 295 | + $entity->id = (int)$data['id']; |
|
| 296 | 296 | $entity->uuid = $data['uuid']; |
| 297 | - $entity->node = (int) $data['node']; |
|
| 297 | + $entity->node = (int)$data['node']; |
|
| 298 | 298 | $entity->dateCreated = new DateTime($data['date_created']); |
| 299 | 299 | $entity->entryLastModified = new DateTime($data['entry_last_modified']); |
| 300 | 300 | $entity->lastModified = new DateTime($data['last_modified']); |
| 301 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
| 301 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
| 302 | 302 | $entity->logLastModified = new DateTime($data['log_last_modified']); |
| 303 | - $entity->cacheId = (int) $data['cache_id']; |
|
| 304 | - $entity->userId = (int) $data['user_id']; |
|
| 305 | - $entity->type = (int) $data['type']; |
|
| 306 | - $entity->ocTeamComment = (bool) $data['oc_team_comment']; |
|
| 303 | + $entity->cacheId = (int)$data['cache_id']; |
|
| 304 | + $entity->userId = (int)$data['user_id']; |
|
| 305 | + $entity->type = (int)$data['type']; |
|
| 306 | + $entity->ocTeamComment = (bool)$data['oc_team_comment']; |
|
| 307 | 307 | $entity->date = new DateTime($data['date']); |
| 308 | 308 | $entity->orderDate = new DateTime($data['order_date']); |
| 309 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
| 310 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
| 309 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
| 310 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
| 311 | 311 | $entity->text = $data['text']; |
| 312 | - $entity->textHtml = (bool) $data['text_html']; |
|
| 313 | - $entity->textHtmledit = (bool) $data['text_htmledit']; |
|
| 314 | - $entity->ownerNotified = (bool) $data['owner_notified']; |
|
| 315 | - $entity->picture = (int) $data['picture']; |
|
| 312 | + $entity->textHtml = (bool)$data['text_html']; |
|
| 313 | + $entity->textHtmledit = (bool)$data['text_htmledit']; |
|
| 314 | + $entity->ownerNotified = (bool)$data['owner_notified']; |
|
| 315 | + $entity->picture = (int)$data['picture']; |
|
| 316 | 316 | |
| 317 | 317 | return $entity; |
| 318 | 318 | } |