@@ -19,9 +19,12 @@ discard block |
||
19 | 19 | require $stylepath . '/editdesc.inc.php'; |
20 | 20 | |
21 | 21 | // check for old-style parameters |
22 | - if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) // Ocprop |
|
22 | + if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) { |
|
23 | + // Ocprop |
|
23 | 24 | { |
24 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
25 | + $cache_id = $_REQUEST['cacheid']; |
|
26 | + } |
|
27 | + // Ocprop |
|
25 | 28 | $desc_lang = $_REQUEST['desclang']; // Ocprop |
26 | 29 | |
27 | 30 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
@@ -87,10 +90,13 @@ discard block |
||
87 | 90 | $show_all_langs = false; |
88 | 91 | |
89 | 92 | //save to DB? |
90 | - if (isset($_POST['post'])) // Ocprop |
|
93 | + if (isset($_POST['post'])) { |
|
94 | + // Ocprop |
|
91 | 95 | { |
92 | 96 | //here we read all used information from the form if submitted |
93 | - $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; // Ocprop |
|
97 | + $descMode = isset($_POST['descMode']) ? $_POST['descMode'] + 0 : 1; |
|
98 | + } |
|
99 | + // Ocprop |
|
94 | 100 | |
95 | 101 | // fuer alte Versionen von OCProp |
96 | 102 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -147,7 +153,8 @@ discard block |
||
147 | 153 | |
148 | 154 | $desc = processEditorInput($oldDescMode, $descMode, $desc); |
149 | 155 | |
150 | - if (isset($_POST['submitform'])) // Ocprop |
|
156 | + if (isset($_POST['submitform'])) { |
|
157 | + // Ocprop |
|
151 | 158 | { |
152 | 159 | // prüfen, ob sprache nicht schon vorhanden |
153 | 160 | $rs = sql( |
@@ -160,6 +167,7 @@ discard block |
||
160 | 167 | $descid, |
161 | 168 | $desclang |
162 | 169 | ); |
170 | + } |
|
163 | 171 | $r = sql_fetch_array($rs); |
164 | 172 | if ($r['count'] > 0) { |
165 | 173 | tpl_errorMsg('editdesc', $error_desc_exists); |
@@ -224,8 +232,7 @@ discard block |
||
224 | 232 | |
225 | 233 | if ($oldDescMode == 0) { |
226 | 234 | $desc = processEditorInput($oldDescMode, $descMode, $desc_record['desc']); |
227 | - } |
|
228 | - else { |
|
235 | + } else { |
|
229 | 236 | $desc = $desc_record['desc']; |
230 | 237 | } |
231 | 238 | } |
@@ -55,8 +55,7 @@ |
||
55 | 55 | $text = isset($_REQUEST['text']) ? $_REQUEST['text'] : ''; |
56 | 56 | if (isset($_REQUEST['emailaddress'])) { |
57 | 57 | $bEmailaddress = ($_REQUEST['emailaddress'] == 1); |
58 | -} |
|
59 | -else { |
|
58 | +} else { |
|
60 | 59 | $own_user = new user($login->userid); |
61 | 60 | $bEmailaddress = $own_user->getUsermailSendAddress(); |
62 | 61 | } |
@@ -894,8 +894,9 @@ |
||
894 | 894 | } |
895 | 895 | |
896 | 896 | if ($db['dblink_slave'] !== false) { |
897 | - if (mysql_select_db($opt['db']['placeholder']['db'], $db['dblink_slave']) == false) |
|
898 | - sql_error(); |
|
897 | + if (mysql_select_db($opt['db']['placeholder']['db'], $db['dblink_slave']) == false) { |
|
898 | + sql_error(); |
|
899 | + } |
|
899 | 900 | |
900 | 901 | mysql_query("SET NAMES '" . mysql_real_escape_string($opt['charset']['mysql'], $db['dblink_slave']) . "'", $db['dblink_slave']); |
901 | 902 |
@@ -76,10 +76,12 @@ discard block |
||
76 | 76 | if ($error == false) { |
77 | 77 | //cacheid |
78 | 78 | $cache_id = 0; |
79 | - if (isset($_REQUEST['cacheid'])) // Ocprop |
|
79 | + if (isset($_REQUEST['cacheid'])) { |
|
80 | + // Ocprop |
|
80 | 81 | { |
81 | 82 | $cache_id = $_REQUEST['cacheid']; |
82 | 83 | } |
84 | + } |
|
83 | 85 | |
84 | 86 | if ($usr === false) { |
85 | 87 | $tplname = 'login'; |
@@ -197,9 +199,11 @@ discard block |
||
197 | 199 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
198 | 200 | |
199 | 201 | if ($status_old == 5 && $status == 5) { |
200 | - if (isset($_POST['publish'])) // Ocprop |
|
202 | + if (isset($_POST['publish'])) { |
|
203 | + // Ocprop |
|
201 | 204 | { |
202 | 205 | $publish = $_POST['publish']; |
206 | + } |
|
203 | 207 | if (!($publish == 'now' || $publish == 'later' || $publish == 'notnow')) { |
204 | 208 | // somebody messed up the POST-data, so we do not publish the cache, since he isn't published right now (status=5) |
205 | 209 | $publish = 'notnow'; |
@@ -228,12 +232,14 @@ discard block |
||
228 | 232 | $status = $status_old; |
229 | 233 | } |
230 | 234 | |
231 | - if ($status_old == 7) // cache is locked |
|
235 | + if ($status_old == 7) { |
|
236 | + // cache is locked |
|
232 | 237 | { |
233 | 238 | // only admins can change status of locked caches |
234 | 239 | if (($bAdmin & ADMIN_USER) != ADMIN_USER) { |
235 | 240 | // no status change allowed for normal user |
236 | 241 | $status = $status_old; |
242 | + } |
|
237 | 243 | } |
238 | 244 | } |
239 | 245 | |
@@ -439,11 +445,13 @@ discard block |
||
439 | 445 | } |
440 | 446 | |
441 | 447 | //try to save to DB? |
442 | - if (isset($_POST['submit'])) // Ocprop |
|
448 | + if (isset($_POST['submit'])) { |
|
449 | + // Ocprop |
|
443 | 450 | { |
444 | 451 | //all validations ok? |
445 | 452 | if (!($hidden_date_not_ok || $lat_not_ok || $lon_not_ok || $name_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $activate_date_not_ok || $status_not_ok || $diff_not_ok || $attribs_not_ok || $wpgc_not_ok)) { |
446 | 453 | $cache_lat = $coords_lat_h + $coords_lat_min / 60; |
454 | + } |
|
447 | 455 | if ($coords_latNS == 'S') { |
448 | 456 | $cache_lat = - $cache_lat; |
449 | 457 | } |
@@ -931,9 +939,11 @@ discard block |
||
931 | 939 | tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1', $cache_id, $status_change)); |
932 | 940 | |
933 | 941 | // show activation form? |
934 | - if ($status_old == 5) // status = not yet published |
|
942 | + if ($status_old == 5) { |
|
943 | + // status = not yet published |
|
935 | 944 | { |
936 | 945 | $tmp = $activation_form; |
946 | + } |
|
937 | 947 | |
938 | 948 | $tmp = mb_ereg_replace( |
939 | 949 | '{activate_day}', |
@@ -17,8 +17,9 @@ |
||
17 | 17 | $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0; |
18 | 18 | $lang = isset($_REQUEST['lang']) ? mb_strtoupper($_REQUEST['lang']) : $opt['template']['locale']; |
19 | 19 | |
20 | -if (!isset($opt['locale'][$lang])) |
|
20 | +if (!isset($opt['locale'][$lang])) { |
|
21 | 21 | $lang = $opt['template']['locale']; |
22 | +} |
|
22 | 23 | |
23 | 24 | $filename = GetFilename($userid, $lang); |
24 | 25 |
@@ -112,7 +112,8 @@ discard block |
||
112 | 112 | $emailadr |
113 | 113 | ); |
114 | 114 | } else { |
115 | - if ($bounced) // maximum one bounce per day is counted, to filter out temporary problems |
|
115 | + if ($bounced) { |
|
116 | + // maximum one bounce per day is counted, to filter out temporary problems |
|
116 | 117 | { |
117 | 118 | sql( |
118 | 119 | "UPDATE `user` SET `email_problems`=`email_problems`+1, `last_email_problem`='&2' |
@@ -121,6 +122,7 @@ discard block |
||
121 | 122 | $logentry['created'] |
122 | 123 | ); |
123 | 124 | } |
125 | + } |
|
124 | 126 | } |
125 | 127 | } else { |
126 | 128 | echo $this->name . ": no email address found for record ID " . $logentry['id'] . "\n"; |
@@ -88,8 +88,9 @@ |
||
88 | 88 | $tpl->assign('coordW3W2', $coord->getW3W($w3w_langs[1])); |
89 | 89 | $lang2_name = sql_value("SELECT `name` FROM `languages` WHERE `short`='&1'", '', $w3w_langs[1]); |
90 | 90 | $tpl->assign('W3Wlang2', $translate->t($lang2_name, '', '', 0)); |
91 | -} else |
|
91 | +} else { |
|
92 | 92 | $tpl->assign('coordW3W2', false); |
93 | +} |
|
93 | 94 | |
94 | 95 | // wp gesetzt? |
95 | 96 | $wp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : ''; |
@@ -84,7 +84,8 @@ discard block |
||
84 | 84 | $called_by_search = isset($_REQUEST['calledbysearch']) ? $_REQUEST['calledbysearch'] <> 0 : true; |
85 | 85 | $called_by_profile_query = false; |
86 | 86 | |
87 | -if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) { // Ocprop: showresult, queryid |
|
87 | +if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) { |
|
88 | +// Ocprop: showresult, queryid |
|
88 | 89 | $bCookieQueryid = false; |
89 | 90 | $queryid = isset($_REQUEST['queryid']) ? $_REQUEST['queryid'] : 0; |
90 | 91 | if ($queryid && |
@@ -208,7 +209,8 @@ discard block |
||
208 | 209 | sql_free_result($rs_name); |
209 | 210 | } |
210 | 211 | } |
211 | -} else { // $queryid == 0 |
|
212 | +} else { |
|
213 | +// $queryid == 0 |
|
212 | 214 | // build search options from GET/POST parameters or default values |
213 | 215 | |
214 | 216 | // hack |
@@ -287,12 +289,14 @@ discard block |
||
287 | 289 | if (!isset($_REQUEST['utf8'])) { |
288 | 290 | $options['cachename'] = iconv("ISO-8859-1", "UTF-8", $options['cachename']); |
289 | 291 | } |
290 | - } elseif (isset($_REQUEST['searchbyowner'])) { // Ocprop |
|
292 | + } elseif (isset($_REQUEST['searchbyowner'])) { |
|
293 | +// Ocprop |
|
291 | 294 | $options['searchtype'] = 'byowner'; |
292 | 295 | |
293 | 296 | $options['ownerid'] = isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
294 | 297 | $options['owner'] = isset($_REQUEST['owner']) ? stripslashes($_REQUEST['owner']) : ''; |
295 | - } elseif (isset($_REQUEST['searchbyfinder'])) { // Ocprop |
|
298 | + } elseif (isset($_REQUEST['searchbyfinder'])) { |
|
299 | +// Ocprop |
|
296 | 300 | $options['searchtype'] = 'byfinder'; |
297 | 301 | |
298 | 302 | $options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0; |
@@ -437,7 +441,8 @@ discard block |
||
437 | 441 | $bRememberQuery = isset($_REQUEST['skipqueryid']) ? !$_REQUEST['skipqueryid'] : true; |
438 | 442 | // This is used by the map, which implements its own query-caching. |
439 | 443 | if ($bRememberQuery) { |
440 | - if ($queryid == 0 && $options['showresult'] != 0) { // 'showresult' = "execute query" |
|
444 | + if ($queryid == 0 && $options['showresult'] != 0) { |
|
445 | +// 'showresult' = "execute query" |
|
441 | 446 | sql( |
442 | 447 | "INSERT INTO `queries` (`user_id`, `options`, `last_queried`) VALUES (0, '&1', NOW())", |
443 | 448 | serialize($options) |
@@ -854,7 +859,8 @@ discard block |
||
854 | 859 | outputSearchForm($options); |
855 | 860 | exit; |
856 | 861 | } |
857 | - } elseif ($options['searchtype'] == 'bydistance') { // Ocprop |
|
862 | + } elseif ($options['searchtype'] == 'bydistance') { |
|
863 | +// Ocprop |
|
858 | 864 | //check the entered data |
859 | 865 | if (isset($options['lat']) && isset($options['lon'])) { |
860 | 866 | $lat = $options['lat'] + 0; |
@@ -924,7 +930,8 @@ discard block |
||
924 | 930 | $sql_innerjoin[] = '`cache_logs` ON `caches`.`cache_id`=`cache_logs`.`cache_id`'; |
925 | 931 | $sql_where[] = '`cache_logs`.`user_id`=\'' . sql_escape($finder_id) . '\''; |
926 | 932 | |
927 | - if ($options['logtype'] != '0') { // 0 = all types |
|
933 | + if ($options['logtype'] != '0') { |
|
934 | +// 0 = all types |
|
928 | 935 | $ids = explode(',', $options['logtype']); |
929 | 936 | $idNumbers = '0'; |
930 | 937 | foreach ($ids as $id) { |
@@ -1405,7 +1412,8 @@ discard block |
||
1405 | 1412 | } |
1406 | 1413 | |
1407 | 1414 | $count = $caches_per_page; |
1408 | - if (isset($_REQUEST['count'])) { // Ocprop |
|
1415 | + if (isset($_REQUEST['count'])) { |
|
1416 | +// Ocprop |
|
1409 | 1417 | $count = floor($_REQUEST['count'] + 0); |
1410 | 1418 | } |
1411 | 1419 | if ($count == 'max') { |
@@ -1525,7 +1533,8 @@ discard block |
||
1525 | 1533 | } else { |
1526 | 1534 | exit; |
1527 | 1535 | } |
1528 | -} else { // $options['showresult'] == 0 |
|
1536 | +} else { |
|
1537 | +// $options['showresult'] == 0 |
|
1529 | 1538 | //============================================================= |
1530 | 1539 | // F5. present search options form to the user |
1531 | 1540 | //============================================================= |
@@ -1597,7 +1606,8 @@ discard block |
||
1597 | 1606 | |
1598 | 1607 | if (isset($options['sort'])) { |
1599 | 1608 | $bBynameChecked = ($options['sort'] == 'byname'); |
1600 | - } else { // Ocprop |
|
1609 | + } else { |
|
1610 | +// Ocprop |
|
1601 | 1611 | $bBynameChecked = (!$login->logged_in()); |
1602 | 1612 | } |
1603 | 1613 | $tpl->assign('byname_checked', $bBynameChecked); |
@@ -1759,7 +1769,8 @@ discard block |
||
1759 | 1769 | } |
1760 | 1770 | if ($options['searchtype'] == 'bydistance') { |
1761 | 1771 | $dByDistanceChecked = ($options['searchtype'] == 'bydistance'); |
1762 | - } else { // Ocprop |
|
1772 | + } else { |
|
1773 | +// Ocprop |
|
1763 | 1774 | $dByDistanceChecked = false; |
1764 | 1775 | } |
1765 | 1776 | $tpl->assign('dbydistance_checked', $dByDistanceChecked); |
@@ -1800,7 +1811,8 @@ discard block |
||
1800 | 1811 | ); |
1801 | 1812 | if ($options['searchtype'] == 'bywaypoint') { |
1802 | 1813 | $dByWaypointChecked = ($options['searchtype'] == 'bywaypoint'); |
1803 | - } else { // Ocprop |
|
1814 | + } else { |
|
1815 | +// Ocprop |
|
1804 | 1816 | $dByWaypointChecked = false; |
1805 | 1817 | } |
1806 | 1818 | $tpl->assign('dbywaypoint_checked', $dByWaypointChecked); |
@@ -24,7 +24,8 @@ discard block |
||
24 | 24 | if ($error == false) { |
25 | 25 | //logid |
26 | 26 | $log_id = 0; |
27 | - if (isset($_REQUEST['logid'])) { // Ocprop |
|
27 | + if (isset($_REQUEST['logid'])) { |
|
28 | +// Ocprop |
|
28 | 29 | $log_id = $_REQUEST['logid']; |
29 | 30 | } |
30 | 31 | |
@@ -273,7 +274,8 @@ discard block |
||
273 | 274 | } |
274 | 275 | |
275 | 276 | //store? |
276 | - if ($date_ok && $logtype_ok && $pw_ok && isset($_POST['submitform'])) { // Ocprop |
|
277 | + if ($date_ok && $logtype_ok && $pw_ok && isset($_POST['submitform'])) { |
|
278 | +// Ocprop |
|
277 | 279 | // 00:00:01 = "00:00 was logged" |
278 | 280 | // 00:00:00 = "no time was logged" |
279 | 281 | if ("$log_time_hour$log_time_minute" != "" && |