@@ -435,8 +435,8 @@ discard block |
||
| 435 | 435 | . ($namelike ? " AND `name` LIKE '%" . sql_escape($namelike) . "%'" : '') |
| 436 | 436 | . ($userlike ? " AND `username` LIKE '%" . sql_escape($userlike) . "%'" : ''), |
| 437 | 437 | 0, |
| 438 | - (int) $startat, |
|
| 439 | - (int) $maxitems, |
|
| 438 | + (int)$startat, |
|
| 439 | + (int)$maxitems, |
|
| 440 | 440 | true |
| 441 | 441 | ); |
| 442 | 442 | } |
@@ -526,8 +526,8 @@ discard block |
||
| 526 | 526 | ORDER BY `prio`, $nameField |
| 527 | 527 | LIMIT &2,&3", |
| 528 | 528 | $login->userid, |
| 529 | - (int) $startat, |
|
| 530 | - (int) $maxitems |
|
| 529 | + (int)$startat, |
|
| 530 | + (int)$maxitems |
|
| 531 | 531 | ); |
| 532 | 532 | |
| 533 | 533 | $lists = sql_fetch_assoc_table($rs); |
@@ -18,6 +18,9 @@ discard block |
||
| 18 | 18 | public $nCachelistId = 0; |
| 19 | 19 | public $reCachelist; |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param integer $nNewCacheListId |
|
| 23 | + */ |
|
| 21 | 24 | public function __construct($nNewCacheListId = ID_NEW, $nUserId = 0) |
| 22 | 25 | { |
| 23 | 26 | $this->reCachelist = new rowEditor('cache_lists'); |
@@ -145,6 +148,9 @@ discard block |
||
| 145 | 148 | return $this->reCachelist->setValue('description', $desc); |
| 146 | 149 | } |
| 147 | 150 | |
| 151 | + /** |
|
| 152 | + * @param string $pw |
|
| 153 | + */ |
|
| 148 | 154 | public function setPassword($pw): void |
| 149 | 155 | { |
| 150 | 156 | $this->reCachelist->setValue('password', $pw); |
@@ -225,6 +231,9 @@ discard block |
||
| 225 | 231 | return sql_fetch_assoc_table($rs); |
| 226 | 232 | } |
| 227 | 233 | |
| 234 | + /** |
|
| 235 | + * @param string $wp |
|
| 236 | + */ |
|
| 228 | 237 | public function addCacheByWP($wp) |
| 229 | 238 | { |
| 230 | 239 | $cache = cache::fromWP($wp); |
@@ -273,6 +282,9 @@ discard block |
||
| 273 | 282 | return $this->addCache(new cache($cache_id)); |
| 274 | 283 | } |
| 275 | 284 | |
| 285 | + /** |
|
| 286 | + * @param cache $cache |
|
| 287 | + */ |
|
| 276 | 288 | public function addCache($cache) |
| 277 | 289 | { |
| 278 | 290 | if (!$cache->exist() || !$cache->allowView()) { |
@@ -508,6 +520,10 @@ discard block |
||
| 508 | 520 | return false; |
| 509 | 521 | } |
| 510 | 522 | |
| 523 | + /** |
|
| 524 | + * @param string $condition |
|
| 525 | + * @param integer $maxitems |
|
| 526 | + */ |
|
| 511 | 527 | private static function getLists( |
| 512 | 528 | $condition, |
| 513 | 529 | $prio = 0, |
@@ -72,8 +72,8 @@ |
||
| 72 | 72 | ] |
| 73 | 73 | ) |
| 74 | 74 | ->orderBy('caches.' . $dateField, $sortOrder) |
| 75 | - ->setFirstResult((int) $startAt) |
|
| 76 | - ->setMaxResults((int) $perpage); |
|
| 75 | + ->setFirstResult((int)$startAt) |
|
| 76 | + ->setMaxResults((int)$perpage); |
|
| 77 | 77 | |
| 78 | 78 | if ($country) { |
| 79 | 79 | $newCachesQuery->andWhere('`caches`.`country`= :country'); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | /** |
| 400 | 400 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 401 | 401 | * @param $value |
| 402 | - * @return false|string |
|
| 402 | + * @return string |
|
| 403 | 403 | */ |
| 404 | 404 | function sql_escape($value) |
| 405 | 405 | { |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | /** |
| 414 | 414 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 415 | 415 | * @param $value |
| 416 | - * @return false|mixed|string |
|
| 416 | + * @return string |
|
| 417 | 417 | */ |
| 418 | 418 | function sql_escape_backtick($value) |
| 419 | 419 | { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 86 | 86 | * @param $sql |
| 87 | - * @return resource |
|
| 87 | + * @return mysqli_result |
|
| 88 | 88 | */ |
| 89 | 89 | function sql($sql) |
| 90 | 90 | { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | /** |
| 115 | 115 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 116 | 116 | * @param $sql |
| 117 | - * @return resource |
|
| 117 | + * @return mysqli_result |
|
| 118 | 118 | */ |
| 119 | 119 | function sql_slave($sql) |
| 120 | 120 | { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 145 | 145 | * @param $dblink |
| 146 | 146 | * @param $sql |
| 147 | - * @return resource |
|
| 147 | + * @return mysqli_result |
|
| 148 | 148 | */ |
| 149 | 149 | function sql_internal($dblink, $sql) |
| 150 | 150 | { |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | /** |
| 343 | 343 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 344 | 344 | * @param string $sql |
| 345 | - * @return resource |
|
| 345 | + * @return mysqli_result |
|
| 346 | 346 | */ |
| 347 | 347 | function sqlf($sql) |
| 348 | 348 | { |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | /** |
| 361 | 361 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 362 | 362 | * @param string $sql |
| 363 | - * @return resource |
|
| 363 | + * @return mysqli_result |
|
| 364 | 364 | */ |
| 365 | 365 | function sqlf_slave($sql) |
| 366 | 366 | { |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | /** |
| 379 | 379 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 380 | 380 | * @param string $sql |
| 381 | - * @return resource |
|
| 381 | + * @return mysqli_result |
|
| 382 | 382 | */ |
| 383 | 383 | function sqll($sql) |
| 384 | 384 | { |
@@ -1228,7 +1228,7 @@ discard block |
||
| 1228 | 1228 | |
| 1229 | 1229 | /** |
| 1230 | 1230 | * @deprecated use DBAL Conenction instead. See adminreports.php for an example implementation |
| 1231 | - * @param $f |
|
| 1231 | + * @param resource $f |
|
| 1232 | 1232 | * @param resource $rs |
| 1233 | 1233 | * @param $table |
| 1234 | 1234 | * @param bool $truncate |
@@ -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); |
@@ -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, |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * @param $userCountry |
|
| 20 | + * @param string $userCountry |
|
| 21 | 21 | */ |
| 22 | 22 | public function set_userCountry($userCountry): void |
| 23 | 23 | { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * |
| 42 | 42 | * @param string $type type of the "new"-information, i.e. cache, event, rating, etc |
| 43 | 43 | * @param array $args numeric array containing the parameter for "sql_slave" |
| 44 | - * @return object mysql result used by smarty assign_rs |
|
| 44 | + * @return mysqli_result|null mysql result used by smarty assign_rs |
|
| 45 | 45 | */ |
| 46 | 46 | public function rsForSmarty($type, $args = null) |
| 47 | 47 | { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * cacheRs executes the database statements for type "cache" |
| 90 | 90 | * |
| 91 | 91 | * @param array $args numeric array containing the parameter for "sql_slave" |
| 92 | - * @return object mysql result used by smarty assign_rs |
|
| 92 | + * @return mysqli_result mysql result used by smarty assign_rs |
|
| 93 | 93 | */ |
| 94 | 94 | private function cacheRs($args = null) |
| 95 | 95 | { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * eventRs executes the database statements for type "event" |
| 144 | 144 | * |
| 145 | 145 | * @param array $args numeric array containing the parameter for "sql_slave" |
| 146 | - * @return object mysql result used by smarty assign_rs |
|
| 146 | + * @return mysqli_result mysql result used by smarty assign_rs |
|
| 147 | 147 | */ |
| 148 | 148 | private function eventRs($args = null) |
| 149 | 149 | { |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * ratingRs executes the database statements for type "rating" |
| 216 | 216 | * |
| 217 | 217 | * @param array $args numeric array containing the parameter for "sql_slave" |
| 218 | - * @return object mysql result used by smarty assign_rs |
|
| 218 | + * @return mysqli_result mysql result used by smarty assign_rs |
|
| 219 | 219 | */ |
| 220 | 220 | private function ratingRs($args = null) |
| 221 | 221 | { |