@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $year = substr($cache['date_created'], 0, 4); |
25 | 25 | if ($year >= 2005 && $year <= date('Y') && ($lat != 0 || $long != 0)) { |
26 | 26 | $years[$year] = true; |
27 | - $liste[$lat][$long]['caches'][$year] ++; |
|
27 | + $liste[$lat][$long]['caches'][$year]++; |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | mysqli_free_result($rs); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $year = substr($cache['date'], 0, 4); |
49 | 49 | if ($year >= 2005 && $year <= date('Y') && ($lat != 0 || $long != 0)) { |
50 | 50 | $years[$year] = true; |
51 | - $liste[$lat][$long]['logs'][$year] ++; |
|
51 | + $liste[$lat][$long]['logs'][$year]++; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | mysqli_free_result($rs); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | while ($cache = sql_fetch_assoc($rs)) { |
66 | 66 | $lat = floor($cache['latitude'] / $grid); |
67 | 67 | $long = floor($cache['longitude'] / $grid); |
68 | - $liste[$lat][$long]['caches']['all'] ++; |
|
68 | + $liste[$lat][$long]['caches']['all']++; |
|
69 | 69 | $liste[$lat][$long]['logs']['all'] += $cache['logs']; |
70 | 70 | } |
71 | 71 | mysqli_free_result($rs); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | isset($_REQUEST['desclang']) && |
23 | 23 | !isset($_REQUEST['descid'])) { // Ocprop |
24 | 24 | |
25 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
26 | - $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
25 | + $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
26 | + $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
27 | 27 | |
28 | 28 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
29 | 29 | if (mysqli_num_rows($rs) == 1) { |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | //save to DB? |
91 | 91 | if (isset($_POST['post'])) { // Ocprop |
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 = trim($_POST['short_desc']); // Ocprop |
|
126 | + $short_desc = trim($_POST['short_desc']); // Ocprop |
|
127 | 127 | $hint = htmlspecialchars(trim($_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 = trim($_POST['desc']); // Ocprop |
|
141 | + $desc = trim($_POST['desc']); // Ocprop |
|
142 | 142 | |
143 | 143 | // fuer alte Versionen von OCProp |
144 | 144 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8')); |
296 | 296 | tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8')); |
297 | 297 | tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8')); |
298 | - tpl_set_var('reset', $reset); // obsolete |
|
298 | + tpl_set_var('reset', $reset); // obsolete |
|
299 | 299 | tpl_set_var('submit', $submit); |
300 | 300 | |
301 | 301 | // Text / normal HTML / HTML editor |
@@ -47,7 +47,7 @@ |
||
47 | 47 | // REQUEST-Variablen durchlaufen und an target anhaengen |
48 | 48 | $allowed = ['cacheid', 'userid', 'logid', 'desclang', 'descid']; |
49 | 49 | |
50 | -foreach($_REQUEST as $varname => $varvalue) { |
|
50 | +foreach ($_REQUEST as $varname => $varvalue) { |
|
51 | 51 | if (in_array($varname, $allowed)) { |
52 | 52 | $target .= $varname . '=' . $varvalue . '&'; |
53 | 53 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | <?php |
156 | 156 | foreach ($opt['template']['locales'] as $k => $lang) { |
157 | 157 | if ($lang['status'] == OC_LOCALE_ACTIVE) { |
158 | - echo '<a style="text-decoration: none;" href="'.$langUrl . $k . '"><img src="' . $lang['flag'] . |
|
158 | + echo '<a style="text-decoration: none;" href="' . $langUrl . $k . '"><img src="' . $lang['flag'] . |
|
159 | 159 | '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> '; |
160 | 160 | } |
161 | 161 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | $nLastGroup = $tpl_usercountries[$i]['group']; |
187 | 187 | |
188 | - echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry==$tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
188 | + echo '<option value="' . htmlspecialchars($tpl_usercountries[$i]['country'], ENT_COMPAT, 'UTF-8') . '"' . (($sUserCountry == $tpl_usercountries[$i]['country']) ? ' selected="selected"' : '') . '>' . htmlspecialchars($tpl_usercountries[$i]['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
189 | 189 | } |
190 | 190 | ?> |
191 | 191 | </select> |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | </div> <!-- page-container-1 --> |
391 | 391 | |
392 | 392 | </div> <!-- overall --> |
393 | - <?php if($opt['tracking']['googleAnalytics']) { ?> |
|
393 | + <?php if ($opt['tracking']['googleAnalytics']) { ?> |
|
394 | 394 | <script type="text/javascript"> |
395 | 395 | // Set to the same value as the web property used on the site |
396 | 396 | var gaProperty = '<?= $opt['tracking']['googleAnalytics']; ?>'; |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | // return array(); |
358 | 358 | // Logic Error - log types are still valid when no NEW logs are allowed for the cache. |
359 | 359 | // (Would e.g. block admin logs and log-type restoring for locked caches.) |
360 | - return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid |
|
360 | + return get_cache_log_types($this->getCacheId(), $this->getType()); // depends on userid |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | public static function isDuplicate($cacheId, $userId, $logType, $logDate, $logText) |
@@ -443,8 +443,8 @@ discard block |
||
443 | 443 | if ($dateOk && $submit) { |
444 | 444 | $dateOk = ( |
445 | 445 | mktime( |
446 | - (int) $hour, |
|
447 | - (int) $minute, |
|
446 | + (int)$hour, |
|
447 | + (int)$minute, |
|
448 | 448 | 0, |
449 | 449 | $month, |
450 | 450 | $day, |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | $fieldNoteService = AppKernel::Container()->get(FieldNoteService::class); |
50 | 50 | |
51 | 51 | $fieldNote = $fieldNoteService->fetchOneBy([ |
52 | - 'id' => (int) $_GET['fieldnoteid'], |
|
53 | - 'user_id' => (int) $user->getUserId() |
|
52 | + 'id' => (int)$_GET['fieldnoteid'], |
|
53 | + 'user_id' => (int)$user->getUserId() |
|
54 | 54 | ]); |
55 | 55 | |
56 | 56 | if ($fieldNote !== null) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | // check if masslog warning is accepted (in cookie) |
97 | 97 | $masslogCookieSet = isset($_COOKIE['ocsuppressmasslogwarn']); |
98 | 98 | if ($masslogCookieSet) { |
99 | - $masslogCookieContent = (int) $_COOKIE['ocsuppressmasslogwarn']; |
|
99 | + $masslogCookieContent = (int)$_COOKIE['ocsuppressmasslogwarn']; |
|
100 | 100 | } else { |
101 | 101 | // save masslog acception in cookie that expires on midnight if clicked |
102 | 102 | if (isset($_REQUEST['suppressMasslogWarning']) && $_REQUEST['suppressMasslogWarning'] == 1) { |
@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | // logtext, logtype, logday, logmonth, logyear |
109 | 109 | |
110 | 110 | $logText = isset($_POST['logtext']) ? trim($_POST['logtext']) : ''; |
111 | - $logType = isset($_REQUEST['logtype']) ? (int) $_REQUEST['logtype'] : null; |
|
111 | + $logType = isset($_REQUEST['logtype']) ? (int)$_REQUEST['logtype'] : null; |
|
112 | 112 | $logDateDay = isset($_POST['logday']) ? trim($_POST['logday']) : ($datesaved ? $defaultLogDay : date('d')); |
113 | 113 | $logDateMonth = isset($_POST['logmonth']) ? trim($_POST['logmonth']) : ($datesaved ? $defaultLogMonth : date('m')); |
114 | 114 | $logDateYear = isset($_POST['logyear']) ? trim($_POST['logyear']) : ($datesaved ? $defaultLogYear : date('Y')); |
115 | 115 | $logTimeHour = isset($_POST['loghour']) ? trim($_POST['loghour']) : ''; |
116 | 116 | $logTimeMinute = isset($_POST['logminute']) ? trim($_POST['logminute']) : ''; |
117 | - $needsMaintenance = isset($_POST['needs_maintenance2']) ? (int) $_POST['needs_maintenance2'] : (isset($_POST['needs_maintenance']) ? (int) $_POST['needs_maintenance'] : 0); |
|
118 | - $listingOutdated = isset($_POST['listing_outdated2']) ? (int) $_POST['listing_outdated2'] : (isset($_POST['listing_outdated']) ? (int) $_POST['listing_outdated'] : 0); |
|
119 | - $confirmListingOk = isset($_POST['confirm_listing_ok']) ? (int) $_POST['confirm_listing_ok'] : 0; |
|
120 | - $rateOption = isset($_POST['ratingoption']) ? (int) $_POST['ratingoption'] : 0; |
|
121 | - $rateCache = isset($_POST['rating']) ? (int) $_POST['rating'] : 0; |
|
117 | + $needsMaintenance = isset($_POST['needs_maintenance2']) ? (int)$_POST['needs_maintenance2'] : (isset($_POST['needs_maintenance']) ? (int)$_POST['needs_maintenance'] : 0); |
|
118 | + $listingOutdated = isset($_POST['listing_outdated2']) ? (int)$_POST['listing_outdated2'] : (isset($_POST['listing_outdated']) ? (int)$_POST['listing_outdated'] : 0); |
|
119 | + $confirmListingOk = isset($_POST['confirm_listing_ok']) ? (int)$_POST['confirm_listing_ok'] : 0; |
|
120 | + $rateOption = isset($_POST['ratingoption']) ? (int)$_POST['ratingoption'] : 0; |
|
121 | + $rateCache = isset($_POST['rating']) ? (int)$_POST['rating'] : 0; |
|
122 | 122 | $ocTeamComment = isset($_REQUEST['teamcomment']) ? $_REQUEST['teamcomment'] != 0 : 0; |
123 | 123 | $suppressMasslogWarning = isset($_REQUEST['suppressMasslogWarning']) ? $_REQUEST['suppressMasslogWarning'] : ($masslogCookieSet ? $masslogCookieContent : 0); |
124 | 124 | |
@@ -164,12 +164,12 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // if not a found log, ignore the rating |
167 | - $rateOption = (int) ($logType == 1 || $logType == 7); |
|
167 | + $rateOption = (int)($logType == 1 || $logType == 7); |
|
168 | 168 | |
169 | 169 | // get log text editor mode (from form or from userprofile) |
170 | 170 | // 1 = text; 2 = HTML; 3 = tinyMCE |
171 | 171 | if (isset($_POST['descMode'])) { |
172 | - $descMode = (int) $_POST['descMode']; // Ocprop: 2 |
|
172 | + $descMode = (int)$_POST['descMode']; // Ocprop: 2 |
|
173 | 173 | if (($descMode < 1) || ($descMode > 3)) { |
174 | 174 | $descMode = 3; |
175 | 175 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * set seconds 00:00:01, means "00:00 was logged" |
252 | 252 | * set seconds 00:00:00, means "no time was logged" |
253 | 253 | */ |
254 | - $logTimeSecond = (int) ($logTimeHour . $logTimeMinute != '' |
|
254 | + $logTimeSecond = (int)($logTimeHour . $logTimeMinute != '' |
|
255 | 255 | && $logTimeHour == 0 |
256 | 256 | && $logTimeMinute == 0); |
257 | 257 | |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | $logDate = date( |
260 | 260 | $opt['db']['dateformat'], |
261 | 261 | mktime( |
262 | - (int) $logTimeHour, |
|
263 | - (int) $logTimeMinute, |
|
262 | + (int)$logTimeHour, |
|
263 | + (int)$logTimeMinute, |
|
264 | 264 | $logTimeSecond, |
265 | 265 | $logDateMonth, |
266 | 266 | $logDateDay, |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if (isset($_REQUEST['fieldnoteid']) && $_REQUEST['fieldnoteid']) { |
312 | 312 | sql( |
313 | 313 | 'DELETE FROM field_note WHERE `id` = &1 AND `user_id` = &2', |
314 | - (int) $_REQUEST['fieldnoteid'], |
|
314 | + (int)$_REQUEST['fieldnoteid'], |
|
315 | 315 | $user->getUserId() |
316 | 316 | ); |
317 | 317 | |
@@ -398,8 +398,8 @@ discard block |
||
398 | 398 | |
399 | 399 | // prepare template and display |
400 | 400 | $tpl->assign('logtype_allows_nm', implode(',', $logtype_allows_nm)); |
401 | -$tpl->assign('scrollposx', isset($_REQUEST['scrollposx']) ? (int) $_REQUEST['scrollposx']: 0); |
|
402 | -$tpl->assign('scrollposy', isset($_REQUEST['scrollposy']) ? (int) $_REQUEST['scrollposy']: 0); |
|
401 | +$tpl->assign('scrollposx', isset($_REQUEST['scrollposx']) ? (int)$_REQUEST['scrollposx'] : 0); |
|
402 | +$tpl->assign('scrollposy', isset($_REQUEST['scrollposy']) ? (int)$_REQUEST['scrollposy'] : 0); |
|
403 | 403 | $tpl->assign('validate', $validate); |
404 | 404 | $tpl->assign('editlog', false); |
405 | 405 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php return array ( |
|
1 | +<?php return array( |
|
2 | 2 | 'version_number' => 1908, |
3 | 3 | 'git_revision' => '6be38dcd869651db7dd2fddf94a09e3f64519320', |
4 | 4 | ); |
5 | 5 | \ No newline at end of file |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $databaseArray |
76 | 76 | ); |
77 | 77 | |
78 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
78 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
79 | 79 | |
80 | 80 | return $entity; |
81 | 81 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | ['id' => $entity->id] |
100 | 100 | ); |
101 | 101 | |
102 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
102 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
103 | 103 | |
104 | 104 | return $entity; |
105 | 105 | } |
@@ -147,13 +147,13 @@ discard block |
||
147 | 147 | public function getEntityFromDatabaseArray(array $data): PageEntity |
148 | 148 | { |
149 | 149 | $entity = new PageEntity(); |
150 | - $entity->id = (int) $data['id']; |
|
150 | + $entity->id = (int)$data['id']; |
|
151 | 151 | $entity->slug = $data['slug']; |
152 | 152 | $entity->metaKeywords = $data['meta_keywords']; |
153 | 153 | $entity->metaDescription = $data['meta_description']; |
154 | 154 | $entity->metaSocial = $data['meta_social']; |
155 | 155 | $entity->updatedAt = new DateTime($data['updated_at']); |
156 | - $entity->active = (bool) $data['active']; |
|
156 | + $entity->active = (bool)$data['active']; |
|
157 | 157 | |
158 | 158 | return $entity; |
159 | 159 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $databaseArray |
84 | 84 | ); |
85 | 85 | |
86 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
86 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
87 | 87 | |
88 | 88 | return $entity; |
89 | 89 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ['id' => $entity->id] |
108 | 108 | ); |
109 | 109 | |
110 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
110 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
111 | 111 | |
112 | 112 | return $entity; |
113 | 113 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | 'page_id' => $entity->pageId, |
144 | 144 | 'title' => $entity->title, |
145 | 145 | 'html' => $entity->html, |
146 | - 'position' => (int) $entity->position, |
|
146 | + 'position' => (int)$entity->position, |
|
147 | 147 | 'updated_at' => $entity->updatedAt->format(DateTime::ATOM), |
148 | 148 | 'active' => $entity->active, |
149 | 149 | ]; |
@@ -155,13 +155,13 @@ discard block |
||
155 | 155 | public function getEntityFromDatabaseArray(array $data): BlockEntity |
156 | 156 | { |
157 | 157 | $entity = new BlockEntity(); |
158 | - $entity->id = (int) $data['id']; |
|
159 | - $entity->pageId = (int) $data['page_id']; |
|
158 | + $entity->id = (int)$data['id']; |
|
159 | + $entity->pageId = (int)$data['page_id']; |
|
160 | 160 | $entity->title = $data['title']; |
161 | 161 | $entity->html = $data['html']; |
162 | - $entity->position = (int) $data['position']; |
|
162 | + $entity->position = (int)$data['position']; |
|
163 | 163 | $entity->updatedAt = new DateTime($data['updated_at']); |
164 | - $entity->active = (bool) $data['active']; |
|
164 | + $entity->active = (bool)$data['active']; |
|
165 | 165 | |
166 | 166 | return $entity; |
167 | 167 | } |