Completed
Push — development ( e9186c...667d7a )
by Mirco
33s queued 10s
created
htdocs/editcache.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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']) ? trim($_POST['name']) : $cache_record['name']);  // Ocprop
137
+                $cache_name = trim(isset($_POST['name']) ? trim($_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
 block discarded – undo
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
 block discarded – undo
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']) ? trim($_POST['search_time']) : $cache_record['search_time'];
193 193
                 $way_length = isset($_POST['way_length']) ? trim($_POST['way_length']) : $cache_record['way_length'];
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 = trim($_POST['lat_h']);  // Ocprop
266
-                    $coords_lon_h = trim($_POST['lon_h']);  // Ocprop
267
-                    $coords_lat_min = trim($_POST['lat_min']);  // Ocprop
268
-                    $coords_lon_min = trim($_POST['lon_min']);  // Ocprop
263
+                    $coords_latNS = $_POST['latNS']; // Ocprop
264
+                    $coords_lonEW = $_POST['lonEW']; // Ocprop
265
+                    $coords_lat_h = trim($_POST['lat_h']); // Ocprop
266
+                    $coords_lon_h = trim($_POST['lon_h']); // Ocprop
267
+                    $coords_lat_min = trim($_POST['lat_min']); // Ocprop
268
+                    $coords_lon_min = trim($_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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
htdocs/newdesc.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 
44 44
                 //get the posted data
45 45
                 $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
46
-                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';  // Ocprop
46
+                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
47 47
 
48
-                $hints = isset($_POST['hints']) ? trim($_POST['hints']) : '';  // Ocprop
49
-                $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang;  // Ocprop
50
-                $desc = isset($_POST['desc']) ? trim($_POST['desc']) : '';  // Ocprop
48
+                $hints = isset($_POST['hints']) ? trim($_POST['hints']) : ''; // Ocprop
49
+                $sel_lang = isset($_POST['desc_lang']) ? trim($_POST['desc_lang']) : $default_lang; // Ocprop
50
+                $desc = isset($_POST['desc']) ? trim($_POST['desc']) : ''; // Ocprop
51 51
 
52 52
                 // read descMode; if not set, initialize from user profile
53 53
                 if (isset($_POST['descMode'])) {  // Ocprop
@@ -212,8 +212,7 @@  discard block
 block discarded – undo
212 212
                 tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
213 213
                 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
214 214
 
215
-                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message :
216
-                    (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
215
+                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
217 216
 
218 217
                 tpl_set_var('show_all_langs', $show_all_langs);
219 218
                 tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : '');
@@ -235,7 +234,7 @@  discard block
 block discarded – undo
235 234
                 $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
236 235
                 tpl_set_var('htmlheaders', $headers);
237 236
 
238
-                tpl_set_var('reset', $reset);  // obsolete
237
+                tpl_set_var('reset', $reset); // obsolete
239 238
                 tpl_set_var('submit', $submit);
240 239
             }
241 240
         } else {
Please login to merge, or discard this patch.
htdocs/lib2/util.inc.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 /**
100 100
  * @param $filename
101 101
  * @param $maxLength
102
- * @return bool|string
102
+ * @return false|string
103 103
  */
104 104
 function read_file($filename, $maxLength = 4096)
105 105
 {
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
  * format number with 1000s dots
266 266
  *
267 267
  * @param $n
268
- * @return mixed|string
268
+ * @return string
269 269
  */
270 270
 function number1000($n)
271 271
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  */
10 10
 function is_valid_email_address($eMail)
11 11
 {
12
-    return (int) ($eMail === filter_var($eMail, FILTER_VALIDATE_EMAIL));
12
+    return (int)($eMail === filter_var($eMail, FILTER_VALIDATE_EMAIL));
13 13
 }
14 14
 
15 15
 /**
Please login to merge, or discard this patch.
htdocs/viewcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 // get cacheid
47 47
 $cacheid = 0;
48 48
 if (isset($_REQUEST['cacheid'])) {
49
-    $cacheid = (int) $_REQUEST['cacheid'];
49
+    $cacheid = (int)$_REQUEST['cacheid'];
50 50
 } else {
51 51
     if (isset($_REQUEST['uuid'])) {
52 52
         $cacheid = cache::cacheIdFromUUID($_REQUEST['uuid']);
Please login to merge, or discard this patch.
htdocs/lib2/error.inc.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
  *  Common error messages
7 7
  ***************************************************************************/
8 8
 
9
- define('ERROR_UNKNOWN', 1000);
10
- define('ERROR_TEMPLATE_NOT_FOUND', 1001);
11
- define('ERROR_COMPILATION_FAILED', 1002);
12
- define('ERROR_NO_ACCESS', 1003);
13
- define('ERROR_INVALID_OPERATION', 1004);
14
- define('ERROR_LOGIN_REQUIRED', 1005);
15
- define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
16
- define('ERROR_NO_COOKIES', 1007);
17
- define('ERROR_ALREADY_LOGGEDIN', 1008);
18
- define('ERROR_USER_NOT_ACTIVE', 1009);
19
- define('ERROR_USER_NO_EMAIL', 1010);
20
- define('ERROR_CACHE_NOT_PUBLISHED', 1011);
21
- define('ERROR_CACHE_LOCKED', 1012);
9
+    define('ERROR_UNKNOWN', 1000);
10
+    define('ERROR_TEMPLATE_NOT_FOUND', 1001);
11
+    define('ERROR_COMPILATION_FAILED', 1002);
12
+    define('ERROR_NO_ACCESS', 1003);
13
+    define('ERROR_INVALID_OPERATION', 1004);
14
+    define('ERROR_LOGIN_REQUIRED', 1005);
15
+    define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006);
16
+    define('ERROR_NO_COOKIES', 1007);
17
+    define('ERROR_ALREADY_LOGGEDIN', 1008);
18
+    define('ERROR_USER_NOT_ACTIVE', 1009);
19
+    define('ERROR_USER_NO_EMAIL', 1010);
20
+    define('ERROR_CACHE_NOT_PUBLISHED', 1011);
21
+    define('ERROR_CACHE_LOCKED', 1012);
22 22
 
23
- define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
24
- define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
25
- define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
23
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013);
24
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014);
25
+    define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015);
26 26
  
27
- define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
28
- define('ERROR_DB_NO_ROOT', 1017);
27
+    define('ERROR_DB_COULD_NOT_RECONNECT', 1016);
28
+    define('ERROR_DB_NO_ROOT', 1017);
29 29
 
30
- define('ERROR_USER_NOT_EXISTS', 1018);
31
- define('ERROR_CACHE_NOT_EXISTS', 1019);
32
- define('ERROR_CACHELOG_NOT_EXISTS', 1020);
33
- define('ERROR_PICTURE_NOT_EXISTS', 1021);
30
+    define('ERROR_USER_NOT_EXISTS', 1018);
31
+    define('ERROR_CACHE_NOT_EXISTS', 1019);
32
+    define('ERROR_CACHELOG_NOT_EXISTS', 1020);
33
+    define('ERROR_PICTURE_NOT_EXISTS', 1021);
34 34
 
35
- define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
36
- define('ERROR_UPLOAD_ERR_SIZE', 1023);
37
- define('ERROR_UPLOAD_ERR_TYPE', 1024);
38
- define('ERROR_UPLOAD_UNKNOWN', 1025);
39
- define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
35
+    define('ERROR_UPLOAD_ERR_NO_FILE', 1022);
36
+    define('ERROR_UPLOAD_ERR_SIZE', 1023);
37
+    define('ERROR_UPLOAD_ERR_TYPE', 1024);
38
+    define('ERROR_UPLOAD_UNKNOWN', 1025);
39
+    define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026);
40 40
 
41
- define('ERROR_WRONG_NODE', 1027);
41
+    define('ERROR_WRONG_NODE', 1027);
Please login to merge, or discard this patch.
htdocs/picture.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     } else {
87 87
         $position = PHP_INT_MAX;
88 88
     }
89
-    $position = min($position, $allpics ? $allpics[count($allpics)-1]['seq'] + 1 : 1);
89
+    $position = min($position, $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1);
90 90
 
91 91
     // uploaded file ok?
92 92
     if (isset($_REQUEST['ok'])) { // Ocprop
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     }
234 234
     $tpl->assign('allpics', $allpics);
235 235
     $tpl->assign('position', $position);
236
-    $tpl->assign('appendseq', $allpics ? $allpics[count($allpics)-1]['seq']+1 : 1);
236
+    $tpl->assign('appendseq', $allpics ? $allpics[count($allpics) - 1]['seq'] + 1 : 1);
237 237
 }
238 238
 
239 239
 $rsCache = sql("SELECT `wp_oc`, `name` FROM `caches` WHERE `cache_id`='&1'", $picture->getCacheId());
Please login to merge, or discard this patch.
htdocs/src/Oc/Postfix/JournalLogs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
                     $cursor[$key] = $value;
72 72
                 }
73 73
 
74
-                $logEntry->id = (int) hexdec($cursor['i']);
74
+                $logEntry->id = (int)hexdec($cursor['i']);
75 75
 
76 76
                 $timeStamp = $entry['__REALTIME_TIMESTAMP'];
77 77
                 $logEntry->created = \DateTimeImmutable::createFromFormat(
Please login to merge, or discard this patch.
htdocs/lib2/logic/cache.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -505,8 +505,8 @@
 block discarded – undo
505 505
         }
506 506
 
507 507
         $coords = [];
508
-        if ($this->getType() != 7 && $this->getType() != 8 &&  // quiz cache
509
-            $this->hasAttribute(61) != true &&                 // safari cache
508
+        if ($this->getType() != 7 && $this->getType() != 8 && // quiz cache
509
+            $this->hasAttribute(61) != true && // safari cache
510 510
             $this->getStatus() != 5                            // unpublished cache
511 511
         ) {
512 512
             $rsCoords = sql(
Please login to merge, or discard this patch.
htdocs/okapi_settings.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
53 53
         'VERSION_FILE'     => __DIR__ . '/okapi/meta.php',
54 54
         'OCDE_HTML_PURIFIER_SETTINGS'
55
-                           => $opt['html_purifier'],
55
+                            => $opt['html_purifier'],
56 56
         'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'],
57 57
     ];
58 58
 }
Please login to merge, or discard this patch.