@@ -76,7 +76,8 @@ 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 | $cache_id = $_REQUEST['cacheid']; |
| 81 | 82 | } |
| 82 | 83 | |
@@ -196,7 +197,8 @@ discard block |
||
| 196 | 197 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
| 197 | 198 | |
| 198 | 199 | if ($status_old == 5 && $status == 5) { |
| 199 | - if (isset($_POST['publish'])) { // Ocprop |
|
| 200 | + if (isset($_POST['publish'])) { |
|
| 201 | +// Ocprop |
|
| 200 | 202 | $publish = $_POST['publish']; |
| 201 | 203 | if (!($publish == 'now' || $publish == 'later' || $publish == 'notnow')) { |
| 202 | 204 | // somebody messed up the POST-data, so we do not publish the cache, since he isn't published right now (status=5) |
@@ -226,12 +228,14 @@ discard block |
||
| 226 | 228 | $status = $status_old; |
| 227 | 229 | } |
| 228 | 230 | |
| 229 | - if ($status_old == 7) // cache is locked |
|
| 231 | + if ($status_old == 7) { |
|
| 232 | + // cache is locked |
|
| 230 | 233 | { |
| 231 | 234 | // only admins can change status of locked caches |
| 232 | 235 | if (($bAdmin & ADMIN_USER) != ADMIN_USER) { |
| 233 | 236 | // no status change allowed for normal user |
| 234 | 237 | $status = $status_old; |
| 238 | + } |
|
| 235 | 239 | } |
| 236 | 240 | } |
| 237 | 241 | |
@@ -437,7 +441,8 @@ discard block |
||
| 437 | 441 | } |
| 438 | 442 | |
| 439 | 443 | //try to save to DB? |
| 440 | - if (isset($_POST['submit'])) { // Ocprop |
|
| 444 | + if (isset($_POST['submit'])) { |
|
| 445 | +// Ocprop |
|
| 441 | 446 | //all validations ok? |
| 442 | 447 | 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)) { |
| 443 | 448 | $cache_lat = $coords_lat_h + $coords_lat_min / 60; |
@@ -927,9 +932,11 @@ discard block |
||
| 927 | 932 | tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1', $cache_id, $status_change)); |
| 928 | 933 | |
| 929 | 934 | // show activation form? |
| 930 | - if ($status_old == 5) // status = not yet published |
|
| 935 | + if ($status_old == 5) { |
|
| 936 | + // status = not yet published |
|
| 931 | 937 | { |
| 932 | 938 | $tmp = $activation_form; |
| 939 | + } |
|
| 933 | 940 | |
| 934 | 941 | $tmp = mb_ereg_replace( |
| 935 | 942 | '{activate_day}', |