@@ -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 | } |
@@ -1,8 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | if (isset($_REQUEST['lang'])) { |
| 3 | 3 | $lang = $_REQUEST['lang']; |
| 4 | - } |
|
| 5 | - else { |
|
| 4 | + } else { |
|
| 6 | 5 | $lang = 'de'; |
| 7 | 6 | } |
| 8 | 7 | ?> |
@@ -1,14 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | if (isset($_REQUEST['cacheid'])) { |
| 3 | 3 | $cacheID = $_REQUEST['cacheid']; |
| 4 | - } |
|
| 5 | - else { |
|
| 4 | + } else { |
|
| 6 | 5 | $cacheID = 0; |
| 7 | 6 | } |
| 8 | 7 | if (isset($_REQUEST['lang'])) { |
| 9 | 8 | $lang = $_REQUEST['lang']; |
| 10 | - } |
|
| 11 | - else { |
|
| 9 | + } else { |
|
| 12 | 10 | $lang = 'de'; |
| 13 | 11 | } |
| 14 | 12 | ?> |
@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | - if (isset($_REQUEST['lang'])) |
|
| 3 | - $lang = $_REQUEST['lang']; |
|
| 4 | - else |
|
| 5 | - $lang = 'de'; |
|
| 6 | -?> |
|
| 2 | + if (isset($_REQUEST['lang'])) { |
|
| 3 | + $lang = $_REQUEST['lang']; |
|
| 4 | + } else { |
|
| 5 | + $lang = 'de'; |
|
| 6 | + } |
|
| 7 | + ?> |
|
| 7 | 8 | |
| 8 | 9 | tinyMCE_GZ.init({ |
| 9 | 10 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -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"; |