@@ -228,6 +228,9 @@ |
||
| 228 | 228 | return $str; |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | +/** |
|
| 232 | + * @param string $str |
|
| 233 | + */ |
|
| 231 | 234 | function lf2crlf($str) |
| 232 | 235 | { |
| 233 | 236 | return mb_ereg_replace("\r\r\n", "\r\n", mb_ereg_replace("\n", "\r\n", $str)); |
@@ -28,6 +28,9 @@ discard block |
||
| 28 | 28 | $this->translator = $this->initTranslator($translator); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param boolean $request |
|
| 33 | + */ |
|
| 31 | 34 | private function initRequest($request) |
| 32 | 35 | { |
| 33 | 36 | if ($request) { |
@@ -37,6 +40,9 @@ discard block |
||
| 37 | 40 | return new RequestHttp(); |
| 38 | 41 | } |
| 39 | 42 | |
| 43 | + /** |
|
| 44 | + * @param boolean $translator |
|
| 45 | + */ |
|
| 40 | 46 | private function initTranslator($translator) |
| 41 | 47 | { |
| 42 | 48 | if ($translator) { |
@@ -35,6 +35,6 @@ |
||
| 35 | 35 | |
| 36 | 36 | protected function getValue($value) |
| 37 | 37 | { |
| 38 | - return (int) $value; |
|
| 38 | + return (int)$value; |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // number of points in the polygon |
| 30 | 30 | $n = count($polygon); |
| 31 | 31 | $poly1 = $polygon[0]; |
| 32 | - for ($i = 1; $i <= $n; $i ++) { |
|
| 32 | + for ($i = 1; $i <= $n; $i++) { |
|
| 33 | 33 | $poly1XY = explode(' ', $poly1); |
| 34 | 34 | $poly1x = $poly1XY[0]; |
| 35 | 35 | $poly1y = $poly1XY[1]; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($poly1y != $poly2y) { |
| 45 | 45 | $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x; |
| 46 | 46 | if ($poly1x == $poly2x || $px <= $xinters) { |
| 47 | - $counter ++; |
|
| 47 | + $counter++; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $to_page = min($last_page, max($first_page, $current_page - $lrspan) + $this->max_pages_shown - 1); |
| 60 | 60 | $from_page = max($first_page, $to_page - $this->max_pages_shown + 1); |
| 61 | 61 | |
| 62 | - for ($page = $from_page; $page <= $to_page; $page ++) { |
|
| 62 | + for ($page = $from_page; $page <= $to_page; $page++) { |
|
| 63 | 63 | if ($page == $current_page) { |
| 64 | 64 | $pages[$page] = false; |
| 65 | 65 | } else { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * Use {page} in link_url als placeholder for the selected page number |
| 22 | 22 | * and/or {offset} for the 0-based data offset of the selected page. |
| 23 | 23 | * |
| 24 | - * @param $link_url |
|
| 24 | + * @param string $link_url |
|
| 25 | 25 | * @param int $min_pages_shown |
| 26 | 26 | * @param int $max_pages_shown |
| 27 | 27 | */ |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | - * @param $current_page |
|
| 42 | - * @param $total_pages |
|
| 41 | + * @param double $current_page |
|
| 42 | + * @param double $total_pages |
|
| 43 | 43 | * @param bool $page_size |
| 44 | 44 | */ |
| 45 | 45 | public function make_from_pagenr($current_page, $total_pages, $page_size = false) |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | 112 | * @param $page |
| 113 | - * @param $page_size |
|
| 113 | + * @param boolean $page_size |
|
| 114 | 114 | * |
| 115 | 115 | * @return string |
| 116 | 116 | */ |
@@ -14,8 +14,7 @@ |
||
| 14 | 14 | $tpl->caching = true; |
| 15 | 15 | $tpl->cache_lifetime = 3600; |
| 16 | 16 | |
| 17 | -$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : |
|
| 18 | - (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
| 17 | +$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']); |
|
| 19 | 18 | |
| 20 | 19 | if (!$tpl->is_cached()) { |
| 21 | 20 | $newCaches = array(); |
@@ -17,9 +17,9 @@ discard block |
||
| 17 | 17 | * $opt['locale'] |
| 18 | 18 | ***************************************************************************/ |
| 19 | 19 | |
| 20 | -define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
| 21 | -define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
| 22 | -define('OC_LOCALE_DISABLED', 0); // disable language |
|
| 20 | +define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
| 21 | +define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
| 22 | +define('OC_LOCALE_DISABLED', 0); // disable language |
|
| 23 | 23 | |
| 24 | 24 | $opt['template']['locales']['DE']['status'] = OC_LOCALE_ACTIVE; |
| 25 | 25 | $opt['template']['locales']['DE']['flag'] = 'images/flag/DE.png'; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="resource2/ocstyle/images/media/cc-by-nc-nd-small.png" /></a><div style="text-align:center; margin:8px 0 0 6px;">Die <a href="articles.php?page=impressum#datalicense">Inhalte</a> von {site} stehen unter der Creative-Commons-Lizenz <a rel="license" href="%1">BY-NC-ND 3.0 DE</a>.</div>'; |
| 132 | 132 | $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/'; |
| 133 | 133 | $opt['locale']['DE']['mostly_translated'] = true; |
| 134 | -$opt['locale']['DE']['what3words'] = true; // "beta" |
|
| 134 | +$opt['locale']['DE']['what3words'] = true; // "beta" |
|
| 135 | 135 | |
| 136 | 136 | $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y'; |
| 137 | 137 | $opt['locale']['IT']['format']['dm'] = '%d/%m'; |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching'; |
| 234 | 234 | $opt['locale']['SV']['page']['subtitle2'] = ''; |
| 235 | 235 | $opt['locale']['SV']['mostly_translated'] = false; |
| 236 | -$opt['locale']['SV']['what3words'] = true; // "beta" |
|
| 236 | +$opt['locale']['SV']['what3words'] = true; // "beta" |
|
| 237 | 237 | |
| 238 | 238 | $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y'; |
| 239 | 239 | $opt['locale']['NO']['format']['dm'] = '%d.%m.'; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $opt['locale']['RU']['country'] = 'RU'; |
| 284 | 284 | $opt['locale']['RU']['primary_lang_of'] = ['RU']; |
| 285 | 285 | $opt['locale']['RU']['mostly_translated'] = false; |
| 286 | -$opt['locale']['RU']['what3words'] = true; // "beta" |
|
| 286 | +$opt['locale']['RU']['what3words'] = true; // "beta" |
|
| 287 | 287 | |
| 288 | 288 | $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y'; |
| 289 | 289 | $opt['locale']['DA']['format']['dm'] = '%d.%m.'; |
@@ -113,6 +113,11 @@ discard block |
||
| 113 | 113 | return $this->nOptions[$pId]['internal_use']; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | + /** |
|
| 117 | + * @param integer $pId |
|
| 118 | + * |
|
| 119 | + * @return string |
|
| 120 | + */ |
|
| 116 | 121 | public function getOptValue($pId) |
| 117 | 122 | { |
| 118 | 123 | if ($pId == USR_OPT_SHOWSTATS && |
@@ -129,6 +134,9 @@ discard block |
||
| 129 | 134 | return false; |
| 130 | 135 | } |
| 131 | 136 | |
| 137 | + /** |
|
| 138 | + * @param integer $pValue |
|
| 139 | + */ |
|
| 132 | 140 | public function setOptVisible($pId, $pValue) |
| 133 | 141 | { |
| 134 | 142 | $pId += 0; |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $str = ''; |
| 200 | 200 | |
| 201 | 201 | ftsearch_load_ignores(); |
| 202 | - for ($i = count($astr) - 1; $i >= 0; $i --) { |
|
| 202 | + for ($i = count($astr) - 1; $i >= 0; $i--) { |
|
| 203 | 203 | // ignore? |
| 204 | 204 | if (array_search(mb_strtolower($astr[$i]), $ftsearch_ignores) !== false) { |
| 205 | 205 | unset($astr[$i]); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | // doppelte chars ersetzen |
| 256 | 256 | $ordZ = ord('z'); |
| 257 | - for ($c = ord('a'); $c <= $ordZ; $c ++) { |
|
| 257 | + for ($c = ord('a'); $c <= $ordZ; $c++) { |
|
| 258 | 258 | $old_str = ''; |
| 259 | 259 | while ($old_str !== $str) { |
| 260 | 260 | $old_str = $str; |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * str = single word |
| 70 | 70 | * @param $str |
| 71 | - * @param $simple |
|
| 71 | + * @param boolean $simple |
|
| 72 | 72 | * |
| 73 | - * @return array |
|
| 73 | + * @return string |
|
| 74 | 74 | */ |
| 75 | 75 | function ftsearch_split(&$str, $simple) |
| 76 | 76 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * str = single word |
| 142 | 142 | * @param $str |
| 143 | 143 | * |
| 144 | - * @return mixed|string |
|
| 144 | + * @return string |
|
| 145 | 145 | */ |
| 146 | 146 | function ftsearch_text2simple($str) |
| 147 | 147 | { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | * str = single word |
| 172 | 172 | * @param $str |
| 173 | 173 | * |
| 174 | - * @return mixed|string |
|
| 174 | + * @return string |
|
| 175 | 175 | */ |
| 176 | 176 | function ftsearch_text2sort($str) |
| 177 | 177 | { |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | /** |
| 315 | 315 | * @param $text |
| 316 | 316 | * |
| 317 | - * @return mixed|string |
|
| 317 | + * @return string |
|
| 318 | 318 | */ |
| 319 | 319 | function ftsearch_strip_html($text) |
| 320 | 320 | { |