@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public static function get($user_id, $cache_id, $cache_status, $cache_userid, $iconname) |
| 12 | 12 | { |
| 13 | - $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents |
|
| 13 | + $iconname = mb_eregi_replace("cache/", "", $iconname); // for old cache_type table contents |
|
| 14 | 14 | $iconext = "." . mb_eregi_replace("^.*\.", "", $iconname); |
| 15 | 15 | $iconname = mb_eregi_replace("\..*", "", $iconname); |
| 16 | 16 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | break; |
| 31 | 31 | case 5: |
| 32 | 32 | $iconname .= "-s"; |
| 33 | - break; // fix for RT ticket #3403 |
|
| 33 | + break; // fix for RT ticket #3403 |
|
| 34 | 34 | case 6: |
| 35 | 35 | $iconname .= "-a"; |
| 36 | 36 | break; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public $sDefaultChangeFreq = 'monthly'; |
| 14 | 14 | public $nMaxFileSize = 9961472; // max file size, 10MB by specification |
| 15 | - public $nMaxUrlCount = 50000; // max number of URLs per file, 50000 by specification |
|
| 15 | + public $nMaxUrlCount = 50000; // max number of URLs per file, 50000 by specification |
|
| 16 | 16 | |
| 17 | 17 | public $sPath = ''; |
| 18 | 18 | public $sDomain = ''; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | // open new XML file? |
| 77 | 77 | if ($this->oSitemapFile === false) { |
| 78 | - $this->nSitemapIndex ++; |
|
| 78 | + $this->nSitemapIndex++; |
|
| 79 | 79 | $sFilename = 'sitemap-' . $this->nSitemapIndex . '.xml.gz'; |
| 80 | 80 | $this->oSitemapFile = gzopen($this->sPath . $sFilename, 'wb'); |
| 81 | 81 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | // write string to XML |
| 92 | 92 | gzwrite($this->oSitemapFile, $str); |
| 93 | 93 | $this->nWrittenSize += strlen($str); |
| 94 | - $this->nWrittenCount ++; |
|
| 94 | + $this->nWrittenCount++; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | public function close() |
@@ -175,8 +175,8 @@ discard block |
||
| 175 | 175 | 0 |
| 176 | 176 | ]; |
| 177 | 177 | } |
| 178 | - $lw = (float) $this->nLon; |
|
| 179 | - $bw = (float) $this->nLat; |
|
| 178 | + $lw = (float)$this->nLon; |
|
| 179 | + $bw = (float)$this->nLat; |
|
| 180 | 180 | |
| 181 | 181 | //WGS84 Datum |
| 182 | 182 | //Große Halbachse a und Abplattung f |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | //Koeffizienten zur Berechnung der Meridianbogenlänge |
| 197 | 197 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
| 198 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
| 198 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
| 199 | 199 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
| 200 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
| 200 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
| 201 | 201 | |
| 202 | 202 | //Längenzone lz und Breitenzone (Band) bz |
| 203 | 203 | $lzn = intval(($lw + 180) / 6) + 1; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | if ($lzn < 10) { |
| 224 | 224 | $lz = "0" . $lzn; |
| 225 | 225 | } |
| 226 | - $bd = (int) (1 + ($bw + 80) / 8); |
|
| 226 | + $bd = (int)(1 + ($bw + 80) / 8); |
|
| 227 | 227 | $bz = substr($b_sel, $bd - 1, 1); |
| 228 | 228 | |
| 229 | 229 | //Geographische Breite in Radianten br |
@@ -268,20 +268,20 @@ discard block |
||
| 268 | 268 | $ew = 0.9996 * ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
| 269 | 269 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120) + 500000; |
| 270 | 270 | |
| 271 | - $nk = $nw - (int) $nw; |
|
| 271 | + $nk = $nw - (int)$nw; |
|
| 272 | 272 | if ($nk < 0.5) { |
| 273 | - $nw = '' . (int) $nw; |
|
| 273 | + $nw = '' . (int)$nw; |
|
| 274 | 274 | } else { |
| 275 | - $nw = '' . ((int) $nw + 1); |
|
| 275 | + $nw = '' . ((int)$nw + 1); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | while (strlen($nw) < 7) { |
| 279 | 279 | $nw = '0' . $nw; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - $nk = $ew - (int) $ew; |
|
| 282 | + $nk = $ew - (int)$ew; |
|
| 283 | 283 | if ($nk < 0.5) { |
| 284 | - $ew = '0' . (int) $ew; |
|
| 284 | + $ew = '0' . (int)$ew; |
|
| 285 | 285 | } else { |
| 286 | 286 | $ew = '0' . intval($ew + 1); |
| 287 | 287 | } |
@@ -331,8 +331,8 @@ discard block |
||
| 331 | 331 | 0 |
| 332 | 332 | ]; |
| 333 | 333 | } |
| 334 | - $lw = (float) $lw; |
|
| 335 | - $bw = (float) $bw; |
|
| 334 | + $lw = (float)$lw; |
|
| 335 | + $bw = (float)$bw; |
|
| 336 | 336 | |
| 337 | 337 | // Quellsystem WGS 84 Datum |
| 338 | 338 | // Große Halbachse a und Abplattung fq |
@@ -410,8 +410,8 @@ discard block |
||
| 410 | 410 | 0 |
| 411 | 411 | ]; |
| 412 | 412 | } |
| 413 | - $lp = (float) $lp; |
|
| 414 | - $bp = (float) $bp; |
|
| 413 | + $lp = (float)$lp; |
|
| 414 | + $bp = (float)$bp; |
|
| 415 | 415 | |
| 416 | 416 | // Potsdam Datum |
| 417 | 417 | // Große Halbachse a und Abplattung f |
@@ -429,9 +429,9 @@ discard block |
||
| 429 | 429 | |
| 430 | 430 | // Koeffizienten zur Berechnung der Meridianbogenlänge |
| 431 | 431 | $e0 = $c * (pi() / 180) * (1 - 3 * $ex2 / 4 + 45 * $ex4 / 64 - 175 * $ex6 / 256 + 11025 * $ex8 / 16384); |
| 432 | - $e2 = $c * (- 3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
| 432 | + $e2 = $c * (-3 * $ex2 / 8 + 15 * $ex4 / 32 - 525 * $ex6 / 1024 + 2205 * $ex8 / 4096); |
|
| 433 | 433 | $e4 = $c * (15 * $ex4 / 256 - 105 * $ex6 / 1024 + 2205 * $ex8 / 16384); |
| 434 | - $e6 = $c * (- 35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
| 434 | + $e6 = $c * (-35 * $ex6 / 3072 + 315 * $ex8 / 12288); |
|
| 435 | 435 | |
| 436 | 436 | // Breite in Radianten |
| 437 | 437 | $br = $bp * pi() / 180; |
@@ -469,18 +469,18 @@ discard block |
||
| 469 | 469 | $rw = ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 + |
| 470 | 470 | $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120 + $kz * 1e6 + 500000); |
| 471 | 471 | |
| 472 | - $nk = $hw - (int) $hw; |
|
| 472 | + $nk = $hw - (int)$hw; |
|
| 473 | 473 | if ($nk < 0.5) { |
| 474 | - $hw = (int) $hw; |
|
| 474 | + $hw = (int)$hw; |
|
| 475 | 475 | } else { |
| 476 | - $hw = ((int) $hw) + 1; |
|
| 476 | + $hw = ((int)$hw) + 1; |
|
| 477 | 477 | } |
| 478 | 478 | |
| 479 | - $nk = $rw - (int) $rw; |
|
| 479 | + $nk = $rw - (int)$rw; |
|
| 480 | 480 | if ($nk < 0.5) { |
| 481 | - $rw = (int) $rw; |
|
| 481 | + $rw = (int)$rw; |
|
| 482 | 482 | } else { |
| 483 | - $rw = (int) ($rw + 1); |
|
| 483 | + $rw = (int)($rw + 1); |
|
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | return [ |
@@ -499,8 +499,8 @@ discard block |
||
| 499 | 499 | $lat_base = 52.15517440; |
| 500 | 500 | $lon_base = 5.38720621; |
| 501 | 501 | |
| 502 | - for ($i = 0; $i <= 6; $i ++) { |
|
| 503 | - for ($j = 0; $j <= 5; $j ++) { |
|
| 502 | + for ($i = 0; $i <= 6; $i++) { |
|
| 503 | + for ($j = 0; $j <= 5; $j++) { |
|
| 504 | 504 | $rpq[$i][$j] = 0; |
| 505 | 505 | $spq[$i][$j] = 0; |
| 506 | 506 | } |
@@ -535,8 +535,8 @@ discard block |
||
| 535 | 535 | $xOrigin = 0; |
| 536 | 536 | $yOrigin = 0; |
| 537 | 537 | |
| 538 | - for ($q = 0; $q <= 5; $q ++) { |
|
| 539 | - for ($p = 0; $p <= 6; $p ++) { |
|
| 538 | + for ($q = 0; $q <= 5; $q++) { |
|
| 539 | + for ($p = 0; $p <= 6; $p++) { |
|
| 540 | 540 | $xOrigin = $xOrigin + ($rpq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
| 541 | 541 | $yOrigin = $yOrigin + ($spq[$p][$q] * ((pow($dlat, $p)) * (pow($dlon, $q)))); |
| 542 | 542 | } |
@@ -435,9 +435,9 @@ |
||
| 435 | 435 | return false; |
| 436 | 436 | } else { |
| 437 | 437 | // restore picture file |
| 438 | - $this->setUrl($original_url); // set the url, so that we can |
|
| 439 | - $filename = $this->getFilename(); // .. retreive the file path+name |
|
| 440 | - $this->setFilenames($filename); // now set url(s) from the new uuid |
|
| 438 | + $this->setUrl($original_url); // set the url, so that we can |
|
| 439 | + $filename = $this->getFilename(); // .. retreive the file path+name |
|
| 440 | + $this->setFilenames($filename); // now set url(s) from the new uuid |
|
| 441 | 441 | @rename($this->deleted_filename($filename), $this->getFilename()); |
| 442 | 442 | } |
| 443 | 443 | } |
@@ -355,7 +355,7 @@ |
||
| 355 | 355 | // return array(); |
| 356 | 356 | // Logic Error - log types are still valid when no NEW logs are allowed for the cache. |
| 357 | 357 | // (Would e.g. block admin logs and log-type restoring for locked caches.) |
| 358 | - return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid |
|
| 358 | + return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | public static function isDuplicate($cacheId, $userId, $logType, $logDate, $logText) |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // number of points in the polygon |
| 30 | 30 | $n = count($polygon); |
| 31 | 31 | $poly1 = $polygon[0]; |
| 32 | - for ($i = 1; $i <= $n; $i ++) { |
|
| 32 | + for ($i = 1; $i <= $n; $i++) { |
|
| 33 | 33 | $poly1XY = explode(' ', $poly1); |
| 34 | 34 | $poly1x = $poly1XY[0]; |
| 35 | 35 | $poly1y = $poly1XY[1]; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($poly1y != $poly2y) { |
| 45 | 45 | $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x; |
| 46 | 46 | if ($poly1x == $poly2x || $px <= $xinters) { |
| 47 | - $counter ++; |
|
| 47 | + $counter++; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | if (!$newcoord) { |
| 522 | 522 | $newcoord = $coords[$coordpos]; |
| 523 | 523 | } |
| 524 | - ++ $coordpos; |
|
| 524 | + ++$coordpos; |
|
| 525 | 525 | } |
| 526 | 526 | if ($newcoord) { |
| 527 | 527 | $distance = geomath::calcDistance( |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | $original = count($coords) - 1; |
| 555 | 555 | $lastlogdate = $logs[count($logs) - 1]['order_date']; |
| 556 | 556 | while ($original > 0 && $coords[$original - 1]['date'] < $lastlogdate) { |
| 557 | - -- $original; |
|
| 557 | + --$original; |
|
| 558 | 558 | } |
| 559 | 559 | $coord = new coordinate($coords[$original]['latitude'], $coords[$original]['longitude']); |
| 560 | 560 | $logs[] = [ |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | $logTypes[$i]['selected'] = ($logtype == $defaultLogType) ? true : false; |
| 956 | 956 | $logTypes[$i]['name'] = $logtypeNames[$logtype]; |
| 957 | 957 | $logTypes[$i]['id'] = $logtype; |
| 958 | - $i ++; |
|
| 958 | + $i++; |
|
| 959 | 959 | } |
| 960 | 960 | |
| 961 | 961 | // return |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | // min. 4 different chars |
| 36 | 36 | $chars = array(); |
| 37 | - for ($i = 0; $i < mb_strlen($pw); $i ++) { |
|
| 37 | + for ($i = 0; $i < mb_strlen($pw); $i++) { |
|
| 38 | 38 | $chars[mb_substr($pw, $i, 1)] = true; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | 'description' => $item->description |
| 67 | 67 | ); |
| 68 | 68 | // increment counter |
| 69 | - $i ++; |
|
| 69 | + $i++; |
|
| 70 | 70 | // htmlspecialchars_decode() works around inconsistent HTML encoding |
| 71 | 71 | // e.g. in SMF Forum Threads |
| 72 | 72 | } elseif (!in_array(htmlspecialchars_decode($item->title), $headlines) && |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ); |
| 81 | 81 | $headlines[] = "" . htmlspecialchars_decode($item->title); |
| 82 | 82 | // increment counter |
| 83 | - $i ++; |
|
| 83 | + $i++; |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | } |