@@ -300,7 +300,7 @@ |
||
| 300 | 300 | while ($r = sql_fetch_assoc($rs)) { |
| 301 | 301 | $user = new user($r['user_id']); |
| 302 | 302 | $user->sendRegistrationCode(); |
| 303 | - ++ $n; |
|
| 303 | + ++$n; |
|
| 304 | 304 | } |
| 305 | 305 | sql_free_result($rs); |
| 306 | 306 | self::message(0, $n . ' users have been re-sent the activation code'); |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | 'SELECT COUNT(*) |
| 101 | 101 | FROM `' . $table . '` |
| 102 | 102 | WHERE ' . $this->getDateCondition($table, $dateField) . |
| 103 | - ($andWhere ? ' AND (' . $andWhere . ')' : ''), |
|
| 103 | + ($andWhere ? ' AND (' . $andWhere . ')' : ''), |
|
| 104 | 104 | 0 |
| 105 | 105 | ); |
| 106 | 106 | self::message(1, $objectCount . ' ' . $description); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | if ($error == false) { |
| 74 | 74 | $cache_id = 0; |
| 75 | 75 | if (isset($_REQUEST['cacheid'])) { |
| 76 | - $cache_id = (int) $_REQUEST['cacheid']; |
|
| 76 | + $cache_id = (int)$_REQUEST['cacheid']; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | if ($usr === false) { |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | //here we read all used information from the form if submitted, otherwise from DB |
| 137 | - $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 137 | + $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 138 | 138 | $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type']; |
| 139 | 139 | if (!isset($_POST['size'])) { |
| 140 | 140 | if ($cache_type == 4 || $cache_type == 5) { |
@@ -148,15 +148,15 @@ discard block |
||
| 148 | 148 | $cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date( |
| 149 | 149 | 'd', |
| 150 | 150 | strtotime($cache_record['date_hidden']) |
| 151 | - ); // Ocprop |
|
| 151 | + ); // Ocprop |
|
| 152 | 152 | $cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date( |
| 153 | 153 | 'm', |
| 154 | 154 | strtotime($cache_record['date_hidden']) |
| 155 | - ); // Ocprop |
|
| 155 | + ); // Ocprop |
|
| 156 | 156 | $cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date( |
| 157 | 157 | 'Y', |
| 158 | 158 | strtotime($cache_record['date_hidden']) |
| 159 | - ); // Ocprop |
|
| 159 | + ); // Ocprop |
|
| 160 | 160 | |
| 161 | 161 | if (is_null($cache_record['date_activate'])) { |
| 162 | 162 | $cache_activate_day = isset($_POST['activate_day']) ? $_POST['activate_day'] : date('d'); |
@@ -182,12 +182,12 @@ discard block |
||
| 182 | 182 | ); |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 186 | - $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 187 | - $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 185 | + $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 186 | + $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 187 | + $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 188 | 188 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
| 189 | 189 | $listing_modified = isset($_POST['listing_modified']) ? $_POST['listing_modified'] + 0 : 0; |
| 190 | - $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 190 | + $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 191 | 191 | $status_old = $cache_record['status']; |
| 192 | 192 | $search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time']; |
| 193 | 193 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw']; |
| 250 | 250 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
| 251 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 251 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 252 | 252 | $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0; |
| 253 | 253 | $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0; |
| 254 | 254 | |
@@ -260,12 +260,12 @@ discard block |
||
| 260 | 260 | |
| 261 | 261 | if (isset($_POST['latNS'])) { |
| 262 | 262 | //get coords from post-form |
| 263 | - $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 264 | - $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 265 | - $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 266 | - $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 267 | - $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 268 | - $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 263 | + $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 264 | + $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 265 | + $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 266 | + $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 267 | + $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 268 | + $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 269 | 269 | } else { |
| 270 | 270 | //get coords from DB |
| 271 | 271 | $coords_lon = $cache_record['longitude']; |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | $logtype = 13; |
| 564 | 564 | break; |
| 565 | 565 | default: |
| 566 | - $logtype = 0; // ??? |
|
| 566 | + $logtype = 0; // ??? |
|
| 567 | 567 | } |
| 568 | 568 | if ($logtype > 0) { |
| 569 | 569 | sql( |
@@ -959,8 +959,8 @@ discard block |
||
| 959 | 959 | . '</option>'; |
| 960 | 960 | } |
| 961 | 961 | tpl_set_var('statusoptions', $statusoptions); |
| 962 | - $statuschange_a_msg = mb_ereg_replace('%1', $cache_id, $status_change_a); |
|
| 963 | - $statuschange_msg = mb_ereg_replace('{a}', $statuschange_a_msg, $status_change); |
|
| 962 | + $statuschange_a_msg = mb_ereg_replace('%1', $cache_id, $status_change_a); |
|
| 963 | + $statuschange_msg = mb_ereg_replace('{a}', $statuschange_a_msg, $status_change); |
|
| 964 | 964 | tpl_set_var('statuschange', $status_old == 5 ? '' : $statuschange_msg); |
| 965 | 965 | |
| 966 | 966 | // show activation form? |
@@ -1105,7 +1105,7 @@ discard block |
||
| 1105 | 1105 | tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : ''); |
| 1106 | 1106 | tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : ''); |
| 1107 | 1107 | |
| 1108 | - tpl_set_var('reset', $reset); // obsolete |
|
| 1108 | + tpl_set_var('reset', $reset); // obsolete |
|
| 1109 | 1109 | tpl_set_var('submit', $submit); |
| 1110 | 1110 | } |
| 1111 | 1111 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | require_once __DIR__ . '/../vendor/autoload.php'; |
| 13 | 13 | |
| 14 | -$opt['rootpath'] = __DIR__ .'/../'; |
|
| 14 | +$opt['rootpath'] = __DIR__ . '/../'; |
|
| 15 | 15 | |
| 16 | 16 | function __autoload($class_name) |
| 17 | 17 | { |
@@ -31,6 +31,11 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | if (!function_exists('bindtextdomain')) { |
| 34 | + |
|
| 35 | + /** |
|
| 36 | + * @param string $domain |
|
| 37 | + * @param string $directory |
|
| 38 | + */ |
|
| 34 | 39 | function bindtextdomain($domain, $directory) |
| 35 | 40 | { |
| 36 | 41 | // dummy function for travis |
@@ -38,6 +43,10 @@ discard block |
||
| 38 | 43 | } |
| 39 | 44 | |
| 40 | 45 | if (!function_exists('textdomain')) { |
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @param string $domain |
|
| 49 | + */ |
|
| 41 | 50 | function textdomain($domain) |
| 42 | 51 | { |
| 43 | 52 | // dummy function for travis |
@@ -45,6 +54,10 @@ discard block |
||
| 45 | 54 | } |
| 46 | 55 | |
| 47 | 56 | if (!function_exists('gettext')) { |
| 57 | + |
|
| 58 | + /** |
|
| 59 | + * @param string $message |
|
| 60 | + */ |
|
| 48 | 61 | function gettext($message) |
| 49 | 62 | { |
| 50 | 63 | // dummy function for travis |
@@ -637,6 +637,10 @@ |
||
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | if (!function_exists('get_logtype_name')) { |
| 640 | + |
|
| 641 | + /** |
|
| 642 | + * @return string |
|
| 643 | + */ |
|
| 640 | 644 | function get_logtype_name($logtype, $language) |
| 641 | 645 | { |
| 642 | 646 | return sqlValue( |
@@ -608,7 +608,7 @@ |
||
| 608 | 608 | $pid_daemon = fgets($pidfile, 20); |
| 609 | 609 | fclose($pidfile); |
| 610 | 610 | |
| 611 | - $pid_daemon = (int) $pid_daemon; |
|
| 611 | + $pid_daemon = (int)$pid_daemon; |
|
| 612 | 612 | |
| 613 | 613 | // process running? |
| 614 | 614 | if (posix_kill($pid_daemon, 0)) { |
@@ -802,6 +802,9 @@ |
||
| 802 | 802 | return ''; |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | +/** |
|
| 806 | + * @return string |
|
| 807 | + */ |
|
| 805 | 808 | function get_logtype_name($logtype, $language) |
| 806 | 809 | { |
| 807 | 810 | return sqlValue( |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | foreach ($sendTo as $receiver) { |
| 41 | 41 | $receiver = trim($receiver); |
| 42 | - echo ++ $n . "/$total: $receiver"; |
|
| 42 | + echo ++$n . "/$total: $receiver"; |
|
| 43 | 43 | mail( |
| 44 | 44 | $receiver, |
| 45 | 45 | $subject, |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function push_pos(&$pos) |
| 16 | 16 | { |
| 17 | - $this->stack[count($this->stack)] =& $pos; |
|
| 18 | - $this->stack_ref =& $pos; |
|
| 17 | + $this->stack[count($this->stack)] = & $pos; |
|
| 18 | + $this->stack_ref = & $pos; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | public function pop_pos() |
| 22 | 22 | { |
| 23 | 23 | unset($this->stack[count($this->stack) - 1]); |
| 24 | - $this->stack_ref =& $this->stack[count($this->stack) - 1]; |
|
| 24 | + $this->stack_ref = & $this->stack[count($this->stack) - 1]; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | isset($_REQUEST['desclang']) && |
| 23 | 23 | !isset($_REQUEST['descid'])) { // Ocprop |
| 24 | 24 | |
| 25 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
| 26 | - $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
| 25 | + $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
| 26 | + $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
| 27 | 27 | |
| 28 | 28 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
| 29 | 29 | if (mysql_num_rows($rs) == 1) { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | //save to DB? |
| 90 | 90 | if (isset($_POST['post'])) { // Ocprop |
| 91 | 91 | //here we read all used information from the form if submitted |
| 92 | - $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
| 92 | + $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
| 93 | 93 | |
| 94 | 94 | // fuer alte Versionen von OCProp |
| 95 | 95 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $oldDescMode = $descMode; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - $short_desc = $_POST['short_desc']; // Ocprop |
|
| 125 | + $short_desc = $_POST['short_desc']; // Ocprop |
|
| 126 | 126 | $hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8'); |
| 127 | 127 | $desclang = $_POST['desclang']; |
| 128 | 128 | $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | // Text from textarea |
| 140 | - $desc = $_POST['desc']; // Ocprop |
|
| 140 | + $desc = $_POST['desc']; // Ocprop |
|
| 141 | 141 | |
| 142 | 142 | // fuer alte Versionen von OCProp |
| 143 | 143 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8')); |
| 297 | 297 | tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8')); |
| 298 | 298 | tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8')); |
| 299 | - tpl_set_var('reset', $reset); // obsolete |
|
| 299 | + tpl_set_var('reset', $reset); // obsolete |
|
| 300 | 300 | tpl_set_var('submit', $submit); |
| 301 | 301 | |
| 302 | 302 | // Text / normal HTML / HTML editor |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | |
| 143 | 143 | /* default locale |
| 144 | 144 | */ |
| 145 | -$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
| 145 | +$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
| 146 | 146 | |
| 147 | 147 | // include all locale settings |
| 148 | 148 | require_once __DIR__ . '/../config2/locale.inc.php'; |