@@ -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, |
@@ -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); |
@@ -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'); |
@@ -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)) { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | private $useTileCache = true; |
| 35 | 35 | |
| 36 | - private $tileCacheBaseDir = __DIR__ . '/../../../var/cache2/staticmap'; |
|
| 36 | + private $tileCacheBaseDir = __DIR__ . '/../../../var/cache2/staticmap'; |
|
| 37 | 37 | |
| 38 | 38 | private $zoom = 0; |
| 39 | 39 | |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | if (isset($_GET['size']) && !empty($_GET['size'])) { |
| 72 | 72 | list($this->width, $this->height) = explode('x', $_GET['size']); |
| 73 | - $this->width = (int) $this->width; |
|
| 73 | + $this->width = (int)$this->width; |
|
| 74 | 74 | if ($this->width > $this->maxWidth) { |
| 75 | 75 | $this->width = $this->maxWidth; |
| 76 | 76 | } |
| 77 | - $this->height = (int) $this->height; |
|
| 77 | + $this->height = (int)$this->height; |
|
| 78 | 78 | if ($this->height > $this->maxHeight) { |
| 79 | 79 | $this->height = $this->maxHeight; |
| 80 | 80 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array ( |
| 2 | - 'version_number' => 1874, |
|
| 3 | - 'git_revision' => '57d4c7a2803a0d7784ae2dc994d0708eb5145bd5', |
|
| 2 | + 'version_number' => 1874, |
|
| 3 | + 'git_revision' => '57d4c7a2803a0d7784ae2dc994d0708eb5145bd5', |
|
| 4 | 4 | ); |
| 5 | 5 | \ No newline at end of file |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php return array ( |
|
| 1 | +<?php return array( |
|
| 2 | 2 | 'version_number' => 1874, |
| 3 | 3 | 'git_revision' => '57d4c7a2803a0d7784ae2dc994d0708eb5145bd5', |
| 4 | 4 | ); |
| 5 | 5 | \ No newline at end of file |