@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | // check for old-style parameters |
22 | 22 | if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) // Ocprop |
23 | 23 | { |
24 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
25 | - $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
24 | + $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
25 | + $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
26 | 26 | |
27 | 27 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
28 | 28 | if (mysql_num_rows($rs) == 1) { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | if (isset($_POST['post'])) // Ocprop |
91 | 91 | { |
92 | 92 | //here we read all used information from the form if submitted |
93 | - $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
93 | + $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
94 | 94 | |
95 | 95 | // fuer alte Versionen von OCProp |
96 | 96 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $oldDescMode = $descMode; |
124 | 124 | } |
125 | 125 | |
126 | - $short_desc = $_POST['short_desc']; // Ocprop |
|
126 | + $short_desc = $_POST['short_desc']; // Ocprop |
|
127 | 127 | $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8'); |
128 | 128 | $desclang = $_POST['desclang']; |
129 | 129 | $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | // Text from textarea |
141 | - $desc = $_POST['desc']; // Ocprop |
|
141 | + $desc = $_POST['desc']; // Ocprop |
|
142 | 142 | |
143 | 143 | // fuer alte Versionen von OCProp |
144 | 144 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8')); |
298 | 298 | tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8')); |
299 | 299 | tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8')); |
300 | - tpl_set_var('reset', $reset); // obsolete |
|
300 | + tpl_set_var('reset', $reset); // obsolete |
|
301 | 301 | tpl_set_var('submit', $submit); |
302 | 302 | |
303 | 303 | // Text / normal HTML / HTML editor |
@@ -12,8 +12,7 @@ |
||
12 | 12 | $tpl->change_country_inpage = true; |
13 | 13 | |
14 | 14 | $startat = isset($_REQUEST['startat']) ? floor($_REQUEST['startat'] + 0) : 0; |
15 | -$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : |
|
16 | - (isset($_REQUEST['country']) ? $_REQUEST['country'] : ''); |
|
15 | +$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : ''); |
|
17 | 16 | $cachetype = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] + 0 : 0; |
18 | 17 | $bEvents = ($cachetype == 6); |
19 | 18 |
@@ -17,12 +17,12 @@ |
||
17 | 17 | const FOR_STARTPAGE_GALLERY = 1; |
18 | 18 | const FOR_NEWPICS_GALLERY = 2; |
19 | 19 | const FOR_USER_STAT = 3; |
20 | - const FOR_USER_GALLERY = 4; // params: userid |
|
20 | + const FOR_USER_GALLERY = 4; // params: userid |
|
21 | 21 | const FOR_MYHOME_GALLERY = 5; |
22 | - const FOR_CACHE_STAT = 6; // params: cacheid |
|
23 | - const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
22 | + const FOR_CACHE_STAT = 6; // params: cacheid |
|
23 | + const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
24 | 24 | |
25 | - const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
25 | + const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
26 | 26 | |
27 | 27 | |
28 | 28 | public static function get($purpose, $userid = 0, $cacheid = 0) |
@@ -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; |
@@ -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() |
@@ -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 |