@@ -91,28 +91,28 @@ discard block |
||
91 | 91 | |
92 | 92 | $allowed_logtypes = array(); |
93 | 93 | if ($owner || $admin_report || $admin_locked) { |
94 | - $allowed_logtypes[] = 3; // note |
|
94 | + $allowed_logtypes[] = 3; // note |
|
95 | 95 | } |
96 | 96 | if (($owner && $statuslogs) || $admin_report) { |
97 | 97 | if ($cache_status != 5 && (($cache_status != 4 && $cache_status != 7) || $admin_report)) { |
98 | - $allowed_logtypes[] = 10; // ready for search |
|
99 | - $allowed_logtypes[] = 11; // temporarily not available |
|
100 | - $allowed_logtypes[] = 9; // archived |
|
101 | - $allowed_logtypes[] = 13; // locked |
|
98 | + $allowed_logtypes[] = 10; // ready for search |
|
99 | + $allowed_logtypes[] = 11; // temporarily not available |
|
100 | + $allowed_logtypes[] = 9; // archived |
|
101 | + $allowed_logtypes[] = 13; // locked |
|
102 | 102 | } |
103 | 103 | if ($admin_report || $old_logtype == 14) { |
104 | 104 | $allowed_logtypes[] = 14; |
105 | 105 | } // locked, invisible |
106 | 106 | } |
107 | 107 | if ($cache_type == 6) { // event |
108 | - $allowed_logtypes[] = 8; // will attend |
|
109 | - $allowed_logtypes[] = 7; // attended |
|
108 | + $allowed_logtypes[] = 8; // will attend |
|
109 | + $allowed_logtypes[] = 7; // attended |
|
110 | 110 | } else { |
111 | - $allowed_logtypes[] = 1; // found |
|
112 | - $allowed_logtypes[] = 2; // not found |
|
111 | + $allowed_logtypes[] = 1; // found |
|
112 | + $allowed_logtypes[] = 2; // not found |
|
113 | 113 | } |
114 | 114 | if (!($owner || $admin_report || $admin_locked)) { |
115 | - $allowed_logtypes[] = 3; // note |
|
115 | + $allowed_logtypes[] = 3; // note |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | // always allow to keep the existing logtype when the log is edited by an admin |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } elseif (!$opt['logic']['admin']['team_comments_only_for_reports'] || admin_has_open_report($cache_id)) { |
152 | 152 | // allowed for report processing by admins |
153 | 153 | $allowed = true; |
154 | - } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6,7])) { |
|
154 | + } elseif ($login->hasAdminPriv(ADMIN_USER) && in_array($rCache['status'], [6, 7])) { |
|
155 | 155 | // allowed for admins && locked caches, see http://forum.opencaching.de/index.php?topic=3102.msg39517#msg39517 |
156 | 156 | $allowed = true; |
157 | 157 | } else { |
@@ -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; |
@@ -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 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function t($message, $style, $resource_name, $line, $plural = '', $count = 1, $lang = null) |
34 | 34 | { |
35 | - global $opt, $locale; // $locale is for lib1 compatibility |
|
35 | + global $opt, $locale; // $locale is for lib1 compatibility |
|
36 | 36 | |
37 | 37 | if ($message == '') { |
38 | 38 | return ''; |