@@ -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 |
@@ -1011,7 +1011,7 @@ |
||
1011 | 1011 | } |
1012 | 1012 | $logs_restored = true; |
1013 | 1013 | } |
1014 | - // if it was not already restored by a later restore operation ... |
|
1014 | + // if it was not already restored by a later restore operation ... |
|
1015 | 1015 | } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) { |
1016 | 1016 | // id, uuid, date_created and last_modified are set automatically; |
1017 | 1017 | // picture will be updated automatically on picture-restore |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN " . $cachelist); |
368 | 368 | while ($r = sql_fetch_assoc($rs)) { |
369 | 369 | $nextcd[$r['wp_oc']] = $r; |
370 | - $user_id = $r['user_id']; // is used later for logs |
|
370 | + $user_id = $r['user_id']; // is used later for logs |
|
371 | 371 | } |
372 | 372 | sql_free_result($rs); |
373 | 373 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | "SELECT * FROM `caches_attributes_modified` |
468 | 468 | WHERE `cache_id` IN " . $cachelist . " /* OConly attrib is shown, but not restorable */ |
469 | 469 | ORDER BY `date_modified` ASC" |
470 | - ); // order doesn't matter as long it is date only |
|
470 | + ); // order doesn't matter as long it is date only |
|
471 | 471 | while ($r = sql_fetch_assoc($rs)) { |
472 | 472 | append_data( |
473 | 473 | $data, |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | "SELECT *, " . $piccacheid . "AS `cache_id` FROM `pictures_modified` |
624 | 624 | WHERE " . $piccacheid . " IN " . $cachelist . " |
625 | 625 | ORDER BY `date_modified` ASC" |
626 | - ); // order is relevant for the case of restore-reverts |
|
626 | + ); // order is relevant for the case of restore-reverts |
|
627 | 627 | while ($r = sql_fetch_assoc($rs)) { |
628 | 628 | $r['date_modified'] = substr($r['date_modified'], 0, 10); |
629 | 629 | switch ($r['operation']) { |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | { |
728 | 728 | global $opt, $login; |
729 | 729 | |
730 | - sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions |
|
730 | + sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions |
|
731 | 731 | sql_slave("SET @restoredby='&1'", $login->userid); |
732 | 732 | |
733 | 733 | $restored = array(); |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | // id, uuid, date_created and last_modified are set automatically; |
1020 | 1020 | // picture will be updated automatically on picture-restore |
1021 | 1021 | $log = new cachelog(); |
1022 | - $log->setNode($r['node']); // cachelog class currently does not initialize node field |
|
1022 | + $log->setNode($r['node']); // cachelog class currently does not initialize node field |
|
1023 | 1023 | $log->setCacheId($r['cache_id']); |
1024 | 1024 | $log->setUserId($r['user_id']); |
1025 | 1025 | $log->setType($r['type'], true); |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | } // not already processed |
1072 | 1072 | |
1073 | 1073 | if ($error != "") { |
1074 | - $restored[$wp]['internal error - could not $error log ' + $r['id'] + "/" + $logid]; |
|
1074 | + $restored[$wp]['internal error - could not $error log ' +$r['id'] + "/" +$logid]; |
|
1075 | 1075 | } |
1076 | 1076 | if ($logs_restored) { |
1077 | 1077 | $restored[$wp]['logs'] = true; |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | } // not already processed |
1204 | 1204 | |
1205 | 1205 | if ($error != "") { |
1206 | - $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" + $picid] = true; |
|
1206 | + $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" +$picid] = true; |
|
1207 | 1207 | } |
1208 | 1208 | if ($pics_restored) { |
1209 | 1209 | $restored[$wp]['pictures'] = true; |
@@ -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 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | global $login; |
31 | 31 | |
32 | 32 | $fields = |
33 | - "`pics`.`uuid` AS `pic_uuid`, |
|
33 | + "`pics`.`uuid` AS `pic_uuid`, |
|
34 | 34 | `pics`.`url` AS `pic_url`, |
35 | 35 | `pics`.`title`, |
36 | 36 | `pics`.`date_created`, |
@@ -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 | } |