@@ -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, |
@@ -25,13 +25,13 @@ |
||
25 | 25 | |
26 | 26 | if (isset($_REQUEST['list_caches'])) { |
27 | 27 | $list_caches = strtoupper(trim($_REQUEST['list_caches'])); |
28 | -} elseif (isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1) { |
|
28 | +} elseif (isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1) { |
|
29 | 29 | $list_caches = $_REQUEST['addCache']; |
30 | 30 | } else { |
31 | 31 | $list_caches = ''; |
32 | 32 | } |
33 | 33 | |
34 | -if (isset($_REQUEST['addCache'])){ |
|
34 | +if (isset($_REQUEST['addCache'])) { |
|
35 | 35 | foreach ($list_caches as $nCacheId) { |
36 | 36 | $cache = new cache($nCacheId); |
37 | 37 | $oc_codes[] = $cache->getWPOC(); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $load_query = false; |
89 | 89 | $show_lastsearchbutton = true; |
90 | 90 | |
91 | -$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
91 | +$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
92 | 92 | $added_waypoints = 0; |
93 | 93 | |
94 | 94 | if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) { // Ocprop: showresult, queryid |
@@ -1297,11 +1297,11 @@ discard block |
||
1297 | 1297 | |
1298 | 1298 | //add selected caches to selected cachelist |
1299 | 1299 | if (isset($_REQUEST['addToList']) && isset($_REQUEST['addCache']) && isset($_REQUEST['selectCachelist'])) { |
1300 | - $list_caches_= $_REQUEST['addToList']; |
|
1300 | + $list_caches_ = $_REQUEST['addToList']; |
|
1301 | 1301 | $added_waypoints = addToList($list_caches); |
1302 | - $addCachelist= cachelist::getListById($_REQUEST['selectCachelist'] + 0); // null for invalid ID |
|
1302 | + $addCachelist = cachelist::getListById($_REQUEST['selectCachelist'] + 0); // null for invalid ID |
|
1303 | 1303 | } elseif (isset($_REQUEST['addToList'])) { |
1304 | - $addCachelist= cachelist::getListById($_REQUEST['selectCachelist'] + 0); // null for invalid ID |
|
1304 | + $addCachelist = cachelist::getListById($_REQUEST['selectCachelist'] + 0); // null for invalid ID |
|
1305 | 1305 | $error_addCaches = true; |
1306 | 1306 | } |
1307 | 1307 |