@@ -587,9 +587,9 @@ |
||
| 587 | 587 | return false; |
| 588 | 588 | } |
| 589 | 589 | // restore picture file |
| 590 | - $this->setUrl($original_url); // set the url, so that we can |
|
| 590 | + $this->setUrl($original_url); // set the url, so that we can |
|
| 591 | 591 | $filename = $this->getFilename(); // .. retrieve the file path+name |
| 592 | - $this->setFilenames($filename); // now set url(s) from the new uuid |
|
| 592 | + $this->setFilenames($filename); // now set url(s) from the new uuid |
|
| 593 | 593 | try { |
| 594 | 594 | rename($this->deletedFilename($filename), $this->getFilename()); |
| 595 | 595 | } catch (Exception $e) { |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | $fnl = strlen($filename); |
| 144 | - $fh = "\x14\x00"; // ver needed to extract |
|
| 145 | - $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 146 | - $fh .= "\x08\x00"; // compression method |
|
| 144 | + $fh = "\x14\x00"; // ver needed to extract |
|
| 145 | + $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 146 | + $fh .= "\x08\x00"; // compression method |
|
| 147 | 147 | $fh .= "\x00\x00\x00\x00"; // last mod time and date |
| 148 | 148 | $fh .= |
| 149 | 149 | pack( |
@@ -170,16 +170,16 @@ discard block |
||
| 170 | 170 | 'va*v3V2', |
| 171 | 171 | 0, |
| 172 | 172 | $fh, |
| 173 | - 0, // file comment length |
|
| 174 | - 0, // disk number start |
|
| 175 | - 0, // internal file attributes |
|
| 176 | - $attr, // external file attributes - 'archive/directory' bit set |
|
| 173 | + 0, // file comment length |
|
| 174 | + 0, // disk number start |
|
| 175 | + 0, // internal file attributes |
|
| 176 | + $attr, // external file attributes - 'archive/directory' bit set |
|
| 177 | 177 | $this->offset |
| 178 | 178 | ) . $filename; |
| 179 | 179 | |
| 180 | 180 | $this->offset += 42 + $fnl + $gzsize; |
| 181 | 181 | $this->cdir[] = $cdir; |
| 182 | - $this->cnt ++; |
|
| 182 | + $this->cnt++; |
|
| 183 | 183 | $this->idx = $this->cnt - 1; |
| 184 | 184 | } |
| 185 | 185 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $cdsl, // size of central dir |
| 228 | 228 | $zdsl, // offset to start of central dir |
| 229 | 229 | 0 |
| 230 | - ); // .zip file comment length |
|
| 230 | + ); // .zip file comment length |
|
| 231 | 231 | return $this->zipfile; |
| 232 | 232 | } |
| 233 | 233 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // database placeholder |
| 108 | 108 | |
| 109 | 109 | // productive database with opencaching-tables |
| 110 | -$opt['db']['placeholder']['db'] = ''; // selected by default |
|
| 110 | +$opt['db']['placeholder']['db'] = ''; // selected by default |
|
| 111 | 111 | |
| 112 | 112 | // empty database for temporary table creation |
| 113 | 113 | $opt['db']['placeholder']['tmpdb'] = ''; |
@@ -121,14 +121,14 @@ discard block |
||
| 121 | 121 | $opt['system']['maillog']['syslog_db_user'] = ''; |
| 122 | 122 | $opt['system']['maillog']['syslog_db_password'] = ''; |
| 123 | 123 | $opt['system']['maillog']['syslog_db_table'] = ''; |
| 124 | -$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
| 125 | -$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
| 126 | -$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
| 127 | -$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
| 124 | +$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
| 125 | +$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
| 126 | +$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
| 127 | +$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
| 128 | 128 | $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost' |
| 129 | -$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
| 130 | -$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
| 131 | -$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
| 129 | +$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
| 130 | +$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
| 131 | +$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
| 132 | 132 | |
| 133 | 133 | /* cookie or session |
| 134 | 134 | * |
@@ -150,15 +150,15 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * other parameters may be customized |
| 152 | 152 | */ |
| 153 | -$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
| 153 | +$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
| 154 | 154 | $opt['session']['cookiename'] = 'ocvagrant'; // only with SAVE_COOKIE |
| 155 | 155 | $opt['session']['path'] = '/'; |
| 156 | -$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
| 156 | +$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
| 157 | 157 | |
| 158 | 158 | /* maximum session lifetime |
| 159 | 159 | */ |
| 160 | 160 | $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year) |
| 161 | -$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
| 161 | +$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
| 162 | 162 | |
| 163 | 163 | /* If the Referer was sent by the client and the substring was not found, |
| 164 | 164 | * the embedded session id will be marked as invalid. |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | /* other template options |
| 185 | 185 | * |
| 186 | 186 | */ |
| 187 | -$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
| 187 | +$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
| 188 | 188 | $opt['page']['develsystem'] = false; |
| 189 | 189 | $opt['page']['teampic_url'] = 'https://www.opencaching.de/images/team/'; |
| 190 | 190 | $opt['page']['teammember_url'] = 'https://www.opencaching.de/'; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | 'newcaches' => [ |
| 219 | 219 | 'show' => true, |
| 220 | 220 | 'url' => 'https://www.opencaching.de', |
| 221 | - 'urlname' => '', // optional: show other name than the url-domain |
|
| 221 | + 'urlname' => '', // optional: show other name than the url-domain |
|
| 222 | 222 | ], |
| 223 | 223 | ]; |
| 224 | 224 | |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | /* license-related functions |
| 380 | 380 | */ |
| 381 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
| 381 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
| 382 | 382 | $opt['logic']['license']['admin'] = true; |
| 383 | 383 | $opt['logic']['license']['disclaimer'] = false; |
| 384 | 384 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -386,18 +386,18 @@ discard block |
||
| 386 | 386 | |
| 387 | 387 | /* optional APIs |
| 388 | 388 | */ |
| 389 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
| 390 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
| 389 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
| 390 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
| 391 | 391 | |
| 392 | 392 | /* cache report info settings |
| 393 | 393 | */ |
| 394 | 394 | $opt['logic']['cache_reports']['delaydays'] = 2; |
| 395 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
| 396 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
| 395 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
| 396 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
| 397 | 397 | |
| 398 | 398 | /* cronjob |
| 399 | 399 | */ |
| 400 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
| 400 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
| 401 | 401 | |
| 402 | 402 | /* generate sitemap.xml and upload to search engines |
| 403 | 403 | * |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $nFileNr = 0; |
| 65 | 65 | $rs = sql('SELECT `id`, `url` FROM `pictures` WHERE `local`=0'); |
| 66 | 66 | while ($r = sql_fetch_array($rs)) { |
| 67 | - $nFileNr ++; |
|
| 67 | + $nFileNr++; |
|
| 68 | 68 | $fileparts = mb_split('/', $r['url']); |
| 69 | 69 | $filename = $fileparts[count($fileparts) - 1]; |
| 70 | 70 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | exit; |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | - for ($i = 1; $i <= $filescount; $i ++) { |
|
| 236 | + for ($i = 1; $i <= $filescount; $i++) { |
|
| 237 | 237 | echo 'Download Paket: ' . $i . ' von ' . $filescount . "\n"; |
| 238 | 238 | |
| 239 | 239 | $fileurl = $opt['url_getsession']; |
@@ -407,11 +407,11 @@ discard block |
||
| 407 | 407 | if ($sSubElement != '') { |
| 408 | 408 | // vorheriges element zuerst schlißen |
| 409 | 409 | $sSubElement = ''; |
| 410 | - $nRecursionLevel --; |
|
| 410 | + $nRecursionLevel--; |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | $sSubElement = mb_strtoupper($xmlReader->name); |
| 414 | - $nRecursionLevel ++; |
|
| 414 | + $nRecursionLevel++; |
|
| 415 | 415 | |
| 416 | 416 | // attribute auslesen |
| 417 | 417 | if ($xmlReader->moveToFirstAttribute()) { |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | } else { |
| 429 | 429 | if ($xmlReader->nodeType == XMLReader::END_ELEMENT) { |
| 430 | 430 | $sSubElement = ''; |
| 431 | - $nRecursionLevel --; |
|
| 431 | + $nRecursionLevel--; |
|
| 432 | 432 | } |
| 433 | 433 | } |
| 434 | 434 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function isDefault($id) |
| 27 | 27 | { |
| 28 | - $isDefault = (int) sql_value( |
|
| 28 | + $isDefault = (int)sql_value( |
|
| 29 | 29 | "SELECT COUNT(*) FROM `countries_list_default` WHERE `lang`='&1' AND `show`='&2'", |
| 30 | 30 | 0, |
| 31 | 31 | $this->locale, |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | $sameLocale = $preferredLocale === $defaultLocale; |
| 77 | 77 | |
| 78 | - if(!$sameLocale && count($pageBlocks) === 0) { |
|
| 78 | + if (!$sameLocale && count($pageBlocks) === 0) { |
|
| 79 | 79 | //Fetch fallback if blocks are empty |
| 80 | 80 | $pageBlocks = $this->getPageBlocks( |
| 81 | 81 | $page, |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $databaseArray |
| 90 | 90 | ); |
| 91 | 91 | |
| 92 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 92 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 93 | 93 | |
| 94 | 94 | return $entity; |
| 95 | 95 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | ['id' => $entity->id] |
| 117 | 117 | ); |
| 118 | 118 | |
| 119 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 119 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 120 | 120 | |
| 121 | 121 | return $entity; |
| 122 | 122 | } |
@@ -175,13 +175,13 @@ discard block |
||
| 175 | 175 | public function getEntityFromDatabaseArray(array $data) |
| 176 | 176 | { |
| 177 | 177 | $entity = new PageEntity(); |
| 178 | - $entity->id = (int) $data['id']; |
|
| 178 | + $entity->id = (int)$data['id']; |
|
| 179 | 179 | $entity->slug = $data['slug']; |
| 180 | 180 | $entity->metaKeywords = $data['meta_keywords']; |
| 181 | 181 | $entity->metaDescription = $data['meta_description']; |
| 182 | 182 | $entity->metaSocial = $data['meta_social']; |
| 183 | 183 | $entity->updatedAt = new DateTime($data['updated_at']); |
| 184 | - $entity->active = (bool) $data['active']; |
|
| 184 | + $entity->active = (bool)$data['active']; |
|
| 185 | 185 | |
| 186 | 186 | return $entity; |
| 187 | 187 | } |
@@ -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 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | ['id' => $entity->id] |
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
| 123 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
| 124 | 124 | |
| 125 | 125 | return $entity; |
| 126 | 126 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | 'page_id' => $entity->pageId, |
| 164 | 164 | 'title' => $entity->title, |
| 165 | 165 | 'html' => $entity->html, |
| 166 | - 'position' => (int) $entity->position, |
|
| 166 | + 'position' => (int)$entity->position, |
|
| 167 | 167 | 'updated_at' => $entity->updatedAt->format(DateTime::ATOM), |
| 168 | 168 | 'active' => $entity->active, |
| 169 | 169 | ]; |
@@ -179,13 +179,13 @@ discard block |
||
| 179 | 179 | public function getEntityFromDatabaseArray(array $data) |
| 180 | 180 | { |
| 181 | 181 | $entity = new BlockEntity(); |
| 182 | - $entity->id = (int) $data['id']; |
|
| 183 | - $entity->pageId = (int) $data['page_id']; |
|
| 182 | + $entity->id = (int)$data['id']; |
|
| 183 | + $entity->pageId = (int)$data['page_id']; |
|
| 184 | 184 | $entity->title = $data['title']; |
| 185 | 185 | $entity->html = $data['html']; |
| 186 | - $entity->position = (int) $data['position']; |
|
| 186 | + $entity->position = (int)$data['position']; |
|
| 187 | 187 | $entity->updatedAt = new DateTime($data['updated_at']); |
| 188 | - $entity->active = (bool) $data['active']; |
|
| 188 | + $entity->active = (bool)$data['active']; |
|
| 189 | 189 | |
| 190 | 190 | return $entity; |
| 191 | 191 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $databaseArray |
| 185 | 185 | ); |
| 186 | 186 | |
| 187 | - $entity->cacheId = (int) $this->connection->lastInsertId(); |
|
| 187 | + $entity->cacheId = (int)$this->connection->lastInsertId(); |
|
| 188 | 188 | |
| 189 | 189 | return $entity; |
| 190 | 190 | } |
@@ -298,38 +298,38 @@ discard block |
||
| 298 | 298 | $entity = new GeoCacheEntity(); |
| 299 | 299 | $entity->cacheId = $data['cache_id']; |
| 300 | 300 | $entity->uuid = $data['uuid']; |
| 301 | - $entity->node = (int) $data['node']; |
|
| 301 | + $entity->node = (int)$data['node']; |
|
| 302 | 302 | $entity->dateCreated = new DateTime($data['date_created']); |
| 303 | - $entity->isPublishdate = (bool) $data['is_publishdate']; |
|
| 303 | + $entity->isPublishdate = (bool)$data['is_publishdate']; |
|
| 304 | 304 | $entity->lastModified = new DateTime($data['last_modified']); |
| 305 | - $entity->okapiSyncbase = (int) $data['okapi_syncbase']; |
|
| 305 | + $entity->okapiSyncbase = (int)$data['okapi_syncbase']; |
|
| 306 | 306 | $entity->listingLastModified = new DateTime($data['listing_last_modified']); |
| 307 | 307 | $entity->metaLastModified = new DateTime($data['meta_last_modified']); |
| 308 | - $entity->userId = (int) $data['user_id']; |
|
| 308 | + $entity->userId = (int)$data['user_id']; |
|
| 309 | 309 | $entity->name = $data['name']; |
| 310 | - $entity->longitude = (double) $data['longitude']; |
|
| 311 | - $entity->latitude = (double) $data['latitude']; |
|
| 312 | - $entity->type = (int) $data['type']; |
|
| 313 | - $entity->status = (int) $data['status']; |
|
| 310 | + $entity->longitude = (double)$data['longitude']; |
|
| 311 | + $entity->latitude = (double)$data['latitude']; |
|
| 312 | + $entity->type = (int)$data['type']; |
|
| 313 | + $entity->status = (int)$data['status']; |
|
| 314 | 314 | $entity->country = $data['country']; |
| 315 | 315 | $entity->dateHidden = new DateTime($data['date_hidden']); |
| 316 | - $entity->size = (int) $data['size']; |
|
| 317 | - $entity->difficulty = (int) $data['difficulty']; |
|
| 318 | - $entity->terrain = (int) $data['terrain']; |
|
| 316 | + $entity->size = (int)$data['size']; |
|
| 317 | + $entity->difficulty = (int)$data['difficulty']; |
|
| 318 | + $entity->terrain = (int)$data['terrain']; |
|
| 319 | 319 | $entity->logpw = $data['logpw']; |
| 320 | - $entity->searchTime = (float) $data['search_time']; |
|
| 321 | - $entity->wayLength = (float) $data['way_length']; |
|
| 320 | + $entity->searchTime = (float)$data['search_time']; |
|
| 321 | + $entity->wayLength = (float)$data['way_length']; |
|
| 322 | 322 | $entity->wpGc = $data['wp_gc']; |
| 323 | 323 | $entity->wpGcMaintained = $data['wp_gc_maintained']; |
| 324 | 324 | $entity->wpOc = $data['wp_oc']; |
| 325 | 325 | $entity->descLanguages = $data['desc_languages']; |
| 326 | 326 | $entity->defaultDesclang = $data['default_desclang']; |
| 327 | 327 | $entity->dateActivate = new DateTime($data['date_activate']); |
| 328 | - $entity->needNpaRecalc = (bool) $data['need_npa_recalc']; |
|
| 329 | - $entity->showCachelists = (bool) $data['show_cachelists']; |
|
| 330 | - $entity->protectOldCoords = (bool) $data['protect_old_coords']; |
|
| 331 | - $entity->needsMaintenance = (bool) $data['needs_maintenance']; |
|
| 332 | - $entity->listingOutdated = (bool) $data['listing_outdated']; |
|
| 328 | + $entity->needNpaRecalc = (bool)$data['need_npa_recalc']; |
|
| 329 | + $entity->showCachelists = (bool)$data['show_cachelists']; |
|
| 330 | + $entity->protectOldCoords = (bool)$data['protect_old_coords']; |
|
| 331 | + $entity->needsMaintenance = (bool)$data['needs_maintenance']; |
|
| 332 | + $entity->listingOutdated = (bool)$data['listing_outdated']; |
|
| 333 | 333 | $entity->flagsLastModified = new DateTime($data['flags_last_modified']); |
| 334 | 334 | |
| 335 | 335 | return $entity; |