@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | /** |
| 293 | 293 | * @param int $id |
| 294 | - * @param $name |
|
| 294 | + * @param string $name |
|
| 295 | 295 | */ |
| 296 | 296 | public function checkGeoKretType($id, $name) |
| 297 | 297 | { |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | /** |
| 306 | 306 | * @param int $id |
| 307 | - * @param $name |
|
| 307 | + * @param string $name |
|
| 308 | 308 | */ |
| 309 | 309 | public function checkUser($id, $name) |
| 310 | 310 | { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | /** |
| 319 | 319 | * @param int $id |
| 320 | - * @param $name |
|
| 320 | + * @param string $name |
|
| 321 | 321 | */ |
| 322 | 322 | public function checkMoveType($id, $name) |
| 323 | 323 | { |
@@ -81,6 +81,10 @@ discard block |
||
| 81 | 81 | return preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/', $datetime); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | + /** |
|
| 85 | + * @param integer $level |
|
| 86 | + * @param string $text |
|
| 87 | + */ |
|
| 84 | 88 | private static function message($level, $text) |
| 85 | 89 | { |
| 86 | 90 | echo str_repeat(' ', 2 * $level) . $text . "\n"; |
@@ -93,6 +97,11 @@ discard block |
||
| 93 | 97 | ' AND `' . $table . '`.`' . $field . "` <= '" . sql_escape($this->toDateTime) . "'"; |
| 94 | 98 | } |
| 95 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $table |
|
| 102 | + * @param string $dateField |
|
| 103 | + * @param string $description |
|
| 104 | + */ |
|
| 96 | 105 | private function showObjectCount($table, $dateField, $description, $andWhere = '') |
| 97 | 106 | { |
| 98 | 107 | $objectCount = sql_value( |
@@ -716,7 +716,7 @@ |
||
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | /** |
| 719 | - * @return bool|string |
|
| 719 | + * @return string|false |
|
| 720 | 720 | */ |
| 721 | 721 | public function getPageLink() |
| 722 | 722 | { |
@@ -145,6 +145,9 @@ discard block |
||
| 145 | 145 | return $this->reCachelist->setValue('description', $desc); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $pw |
|
| 150 | + */ |
|
| 148 | 151 | public function setPassword($pw) |
| 149 | 152 | { |
| 150 | 153 | $this->reCachelist->setValue('password', $pw); |
@@ -225,6 +228,9 @@ discard block |
||
| 225 | 228 | return sql_fetch_assoc_table($rs); |
| 226 | 229 | } |
| 227 | 230 | |
| 231 | + /** |
|
| 232 | + * @param string $wp |
|
| 233 | + */ |
|
| 228 | 234 | public function addCacheByWP($wp) |
| 229 | 235 | { |
| 230 | 236 | $cache = cache::fromWP($wp); |
@@ -261,6 +267,9 @@ discard block |
||
| 261 | 267 | return $this->addCache(new cache($cache_id)); |
| 262 | 268 | } |
| 263 | 269 | |
| 270 | + /** |
|
| 271 | + * @param cache $cache |
|
| 272 | + */ |
|
| 264 | 273 | public function addCache($cache) |
| 265 | 274 | { |
| 266 | 275 | if (!$cache->exist() || !$cache->allowView()) { |
@@ -496,6 +505,10 @@ discard block |
||
| 496 | 505 | return false; |
| 497 | 506 | } |
| 498 | 507 | |
| 508 | + /** |
|
| 509 | + * @param string $condition |
|
| 510 | + * @param integer $maxitems |
|
| 511 | + */ |
|
| 499 | 512 | private static function getLists( |
| 500 | 513 | $condition, |
| 501 | 514 | $prio = 0, |
@@ -91,11 +91,17 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param integer $zoom |
|
| 96 | + */ |
|
| 94 | 97 | private function lonToTile($long, $zoom) |
| 95 | 98 | { |
| 96 | 99 | return (($long + 180) / 360) * (2 ** $zoom); |
| 97 | 100 | } |
| 98 | 101 | |
| 102 | + /** |
|
| 103 | + * @param integer $zoom |
|
| 104 | + */ |
|
| 99 | 105 | private function latToTile($lat, $zoom) |
| 100 | 106 | { |
| 101 | 107 | return (1 - log(tan($lat * M_PI / 180) + 1 / cos($lat * M_PI / 180)) / M_PI) / 2 * (2 ** $zoom); |
@@ -192,6 +198,10 @@ discard block |
||
| 192 | 198 | } |
| 193 | 199 | } |
| 194 | 200 | |
| 201 | + /** |
|
| 202 | + * @param string $pathname |
|
| 203 | + * @param integer $mode |
|
| 204 | + */ |
|
| 195 | 205 | private function mkdirRecursive($pathname, $mode) |
| 196 | 206 | { |
| 197 | 207 | is_dir(dirname($pathname)) || $this->mkdirRecursive(dirname($pathname), $mode); |
@@ -199,6 +209,9 @@ discard block |
||
| 199 | 209 | return is_dir($pathname) || mkdir($pathname, $mode) || is_dir($pathname); |
| 200 | 210 | } |
| 201 | 211 | |
| 212 | + /** |
|
| 213 | + * @param string $data |
|
| 214 | + */ |
|
| 202 | 215 | private function writeTileToCache($url, $data) |
| 203 | 216 | { |
| 204 | 217 | $filename = $this->tileUrlToFilename($url); |
@@ -206,6 +219,9 @@ discard block |
||
| 206 | 219 | file_put_contents($filename, $data); |
| 207 | 220 | } |
| 208 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string $url |
|
| 224 | + */ |
|
| 209 | 225 | private function fetchTile($url) |
| 210 | 226 | { |
| 211 | 227 | if ($this->useTileCache && $cached = $this->checkTileCache($url)) { |
@@ -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 |
@@ -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) |
| 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 | { |