Completed
Push — development ( 1b87d2...43bb99 )
by Thomas
06:02
created
htdocs/lib2/search/search.gpx.inc.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -140,19 +140,19 @@  discard block
 block discarded – undo
140 140
     $gpxTimeFormat = 'Y-m-d\TH:i:s\Z';
141 141
 
142 142
     $gpxStatus[0] = 'available="False" archived="False"'; // other (unavailable, not archived)
143
-    $gpxStatus[1] = 'available="True" archived="False"';  // available, not archived
143
+    $gpxStatus[1] = 'available="True" archived="False"'; // available, not archived
144 144
     $gpxStatus[2] = 'available="False" archived="False"'; // unavailable, not archived
145
-    $gpxStatus[3] = 'available="False" archived="True"';  // unavailable, archived
146
-    $gpxStatus[6] = 'available="False" archived="True"';  // locked, visible
145
+    $gpxStatus[3] = 'available="False" archived="True"'; // unavailable, archived
146
+    $gpxStatus[6] = 'available="False" archived="True"'; // locked, visible
147 147
 
148 148
     $gpxContainer[1] = 'Other';
149 149
     $gpxContainer[2] = 'Micro';
150 150
     $gpxContainer[3] = 'Small';
151 151
     $gpxContainer[4] = 'Regular';
152 152
     $gpxContainer[5] = 'Large';
153
-    $gpxContainer[6] = 'Large';     // very large
154
-    $gpxContainer[7] = 'Virtual';   // no container
155
-    $gpxContainer[8] = 'Micro';     // nano
153
+    $gpxContainer[6] = 'Large'; // very large
154
+    $gpxContainer[7] = 'Virtual'; // no container
155
+    $gpxContainer[8] = 'Micro'; // nano
156 156
 
157 157
     $gpxOcSize[1] = 'Other';
158 158
     $gpxOcSize[2] = 'Micro';
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
     $gpxType[4] = 'Virtual Cache';
170 170
     $gpxType[5] = 'Webcam Cache';
171 171
     $gpxType[6] = 'Event Cache';
172
-    $gpxType[7] = 'Unknown Cache';        // quiz cache
173
-    $gpxType[8] = 'Unknown Cache';        // maths/physics cache
174
-    $gpxType[9] = 'Unknown Cache';        // moving cache
175
-    $gpxType[10] = 'Traditional Cache';   // drive-in cache
172
+    $gpxType[7] = 'Unknown Cache'; // quiz cache
173
+    $gpxType[8] = 'Unknown Cache'; // maths/physics cache
174
+    $gpxType[9] = 'Unknown Cache'; // moving cache
175
+    $gpxType[10] = 'Traditional Cache'; // drive-in cache
176 176
 
177 177
     $gpxOcType[1] = 'Other Cache';
178 178
     $gpxOcType[2] = 'Traditional Cache';
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     $gpxOcType[5] = 'Webcam Cache';
182 182
     $gpxOcType[6] = 'Event Cache';
183 183
     $gpxOcType[7] = 'Quiz Cache';
184
-    $gpxOcType[8] = 'Quiz Cache';         // maths/physics cache
184
+    $gpxOcType[8] = 'Quiz Cache'; // maths/physics cache
185 185
     $gpxOcType[9] = 'Moving Cache';
186 186
     $gpxOcType[10] = 'Traditional Cache'; // drive-in cache
187 187
 
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
     $gpxLogType[9] = 'Archive';
195 195
     $gpxLogType[10] = 'Owner Maintenance';
196 196
     $gpxLogType[11] = 'Temporarily Disable Listing';
197
-    $gpxLogType[13] = 'Archive';          // locked
198
-    $gpxLogType[14] = 'Archive';          // locked/invisible
197
+    $gpxLogType[13] = 'Archive'; // locked
198
+    $gpxLogType[14] = 'Archive'; // locked/invisible
199 199
 
200 200
     $gpxSymNormal = 'Geocache';
201 201
     $gpxSymFound = 'Geocache Found';
@@ -524,9 +524,9 @@  discard block
 block discarded – undo
524 524
         $thisline = mb_ereg_replace('{oc_logs}', $oc_logentries, $thisline);
525 525
 
526 526
         // attributes
527
-        $addAttributes = [-1];  // dummy
527
+        $addAttributes = [-1]; // dummy
528 528
         if ($r['type'] == 10) {   // Drive-in
529
-            $addAttributes[] = 24;  // near the car / park and grab
529
+            $addAttributes[] = 24; // near the car / park and grab
530 530
         }
531 531
         $rsAttributes = sql_slave(
532 532
             "
Please login to merge, or discard this patch.
htdocs/lib2/search/search.ov2.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $cacheid = convert_string($r['wp_oc']);
67 67
 
68 68
         $line = "$name by $username, $type, $size, $cacheid";
69
-        $record = pack('CLllA*x', 2, 1 + 4 + 4 + 4 + strlen($line) + 1, (int) $lon, (int) $lat, $line);
69
+        $record = pack('CLllA*x', 2, 1 + 4 + 4 + 4 + strlen($line) + 1, (int)$lon, (int)$lat, $line);
70 70
 
71 71
         append_output($record);
72 72
     }
Please login to merge, or discard this patch.
htdocs/lib2/util.inc.php 1 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/lib2/menu.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                         'parent' => MNU_MAP,
79 79
                     ];
80 80
                     $menuitem[MNU_MAP]['subitems'][] = $menu_map;
81
-                    ++ $menu_map;
81
+                    ++$menu_map;
82 82
                 }
83 83
             }
84 84
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $rsSubmenu = sqlf('SELECT `id` FROM `sys_menu` WHERE `parent`=0 ORDER BY `parent` ASC, `position` ASC');
106 106
         while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) {
107 107
             $aMenu[MNU_ROOT]['subitems'][$nPos] = $rSubmenu['id'];
108
-            $nPos ++;
108
+            $nPos++;
109 109
         }
110 110
         sql_free_result($rsSubmenu);
111 111
         fwrite($f, "\n");
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             );
143 143
             while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) {
144 144
                 $aMenu[$r['id']]['subitems'][$nPos] = $rSubmenu['id'];
145
-                $nPos ++;
145
+                $nPos++;
146 146
             }
147 147
             sql_free_result($rsSubmenu);
148 148
         }
Please login to merge, or discard this patch.
htdocs/lib2/logic/coordinate.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
                 0,
156 156
             ];
157 157
         }
158
-        $lw = (float) $this->nLon;
159
-        $bw = (float) $this->nLat;
158
+        $lw = (float)$this->nLon;
159
+        $bw = (float)$this->nLat;
160 160
 
161 161
         //WGS84 Datum
162 162
         //Große Halbachse a und Abplattung f
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         if ($lzn < 10) {
204 204
             $lz = '0' . $lzn;
205 205
         }
206
-        $bd = (int) (1 + ($bw + 80) / 8);
206
+        $bd = (int)(1 + ($bw + 80) / 8);
207 207
         $bz = substr($b_sel, $bd - 1, 1);
208 208
 
209 209
         //Geographische Breite in Radianten br
@@ -248,20 +248,20 @@  discard block
 block discarded – undo
248 248
         $ew = 0.9996 * ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 +
249 249
                 $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120) + 500000;
250 250
 
251
-        $nk = $nw - (int) $nw;
251
+        $nk = $nw - (int)$nw;
252 252
         if ($nk < 0.5) {
253
-            $nw = '' . (int) $nw;
253
+            $nw = '' . (int)$nw;
254 254
         } else {
255
-            $nw = '' . ((int) $nw + 1);
255
+            $nw = '' . ((int)$nw + 1);
256 256
         }
257 257
 
258 258
         while (strlen($nw) < 7) {
259 259
             $nw = '0' . $nw;
260 260
         }
261 261
 
262
-        $nk = $ew - (int) $ew;
262
+        $nk = $ew - (int)$ew;
263 263
         if ($nk < 0.5) {
264
-            $ew = '0' . (int) $ew;
264
+            $ew = '0' . (int)$ew;
265 265
         } else {
266 266
             $ew = '0' . intval($ew + 1);
267 267
         }
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
                 0,
317 317
             ];
318 318
         }
319
-        $lw = (float) $lw;
320
-        $bw = (float) $bw;
319
+        $lw = (float)$lw;
320
+        $bw = (float)$bw;
321 321
 
322 322
         // Quellsystem WGS 84 Datum
323 323
         // Große Halbachse a und Abplattung fq
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
                 0,
396 396
             ];
397 397
         }
398
-        $lp = (float) $lp;
399
-        $bp = (float) $bp;
398
+        $lp = (float)$lp;
399
+        $bp = (float)$bp;
400 400
 
401 401
         // Potsdam Datum
402 402
         // Große Halbachse a und Abplattung f
@@ -454,18 +454,18 @@  discard block
 block discarded – undo
454 454
         $rw = ($nd * $cos1 * $dl + $nd * $cos3 * (1 - $tan2 + $etasq) * $dl3 / 6 +
455 455
             $nd * $cos5 * (5 - 18 * $tan2 + $tan4) * $dl5 / 120 + $kz * 1e6 + 500000);
456 456
 
457
-        $nk = $hw - (int) $hw;
457
+        $nk = $hw - (int)$hw;
458 458
         if ($nk < 0.5) {
459
-            $hw = (int) $hw;
459
+            $hw = (int)$hw;
460 460
         } else {
461
-            $hw = ((int) $hw) + 1;
461
+            $hw = ((int)$hw) + 1;
462 462
         }
463 463
 
464
-        $nk = $rw - (int) $rw;
464
+        $nk = $rw - (int)$rw;
465 465
         if ($nk < 0.5) {
466
-            $rw = (int) $rw;
466
+            $rw = (int)$rw;
467 467
         } else {
468
-            $rw = (int) ($rw + 1);
468
+            $rw = (int)($rw + 1);
469 469
         }
470 470
 
471 471
         return [
Please login to merge, or discard this patch.
htdocs/lib2/logic/attribute.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -151,18 +151,18 @@
 block discarded – undo
151 151
     public static function getConflictingAttribIds($attribId)
152 152
     {
153 153
         static $conflicts = [
154
-            [1, 38],    // only at night - 24/7
155
-            [1, 40],    // only at night - only by day
156
-            [24, 25],   // near the parking area - long walk
157
-            [24, 27],   // near the parking area - hilly area
158
-            [24, 29],   // near the parking area - swimming required
159
-            [24, 50],   // near the parking area - cave equipment
160
-            [24, 51],   // near the parking area - diving equipment
161
-            [24, 52],   // near the parking area - watercraft
162
-            [38, 39],   // 24/7 - only at specified times
163
-            [38, 40],   // 24/7 - only by day
164
-            [42, 43],   // all seasons - breeding season
165
-            [42, 60],    // all seassons - only during specified seasons
154
+            [1, 38], // only at night - 24/7
155
+            [1, 40], // only at night - only by day
156
+            [24, 25], // near the parking area - long walk
157
+            [24, 27], // near the parking area - hilly area
158
+            [24, 29], // near the parking area - swimming required
159
+            [24, 50], // near the parking area - cave equipment
160
+            [24, 51], // near the parking area - diving equipment
161
+            [24, 52], // near the parking area - watercraft
162
+            [38, 39], // 24/7 - only at specified times
163
+            [38, 40], // 24/7 - only by day
164
+            [42, 43], // all seasons - breeding season
165
+            [42, 60], // all seassons - only during specified seasons
166 166
         ];
167 167
 
168 168
         static $conflictsByAttr = [];
Please login to merge, or discard this patch.
htdocs/lib2/logic/picture.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -587,9 +587,9 @@
 block discarded – undo
587 587
                 return false;
588 588
             }
589 589
             // restore picture file
590
-                $this->setUrl($original_url);     // set the url, so that we can
590
+                $this->setUrl($original_url); // set the url, so that we can
591 591
                 $filename = $this->getFilename(); // .. retrieve the file path+name
592
-                $this->setFilenames($filename);   // now set url(s) from the new uuid
592
+                $this->setFilenames($filename); // now set url(s) from the new uuid
593 593
                 try {
594 594
                     rename($this->deletedFilename($filename), $this->getFilename());
595 595
                 } catch (Exception $e) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -716,7 +716,7 @@
 block discarded – undo
716 716
     }
717 717
 
718 718
     /**
719
-     * @return bool|string
719
+     * @return string|false
720 720
      */
721 721
     public function getPageLink()
722 722
     {
Please login to merge, or discard this patch.
htdocs/lib2/ss_zip.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         }
142 142
 
143 143
         $fnl = strlen($filename);
144
-        $fh = "\x14\x00";    // ver needed to extract
145
-        $fh .= "\x00\x00";    // gen purpose bit flag
146
-        $fh .= "\x08\x00";    // compression method
144
+        $fh = "\x14\x00"; // ver needed to extract
145
+        $fh .= "\x00\x00"; // gen purpose bit flag
146
+        $fh .= "\x08\x00"; // compression method
147 147
         $fh .= "\x00\x00\x00\x00"; // last mod time and date
148 148
         $fh .=
149 149
             pack(
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
                 'va*v3V2',
171 171
                 0,
172 172
                 $fh,
173
-                0,        // file comment length
174
-                0,        // disk number start
175
-                0,        // internal file attributes
176
-                $attr,    // external file attributes - 'archive/directory' bit set
173
+                0, // file comment length
174
+                0, // disk number start
175
+                0, // internal file attributes
176
+                $attr, // external file attributes - 'archive/directory' bit set
177 177
                 $this->offset
178 178
             ) . $filename;
179 179
 
180 180
         $this->offset += 42 + $fnl + $gzsize;
181 181
         $this->cdir[] = $cdir;
182
-        $this->cnt ++;
182
+        $this->cnt++;
183 183
         $this->idx = $this->cnt - 1;
184 184
     }
185 185
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 $cdsl, // size of central dir
228 228
                 $zdsl, // offset to start of central dir
229 229
                 0
230
-            );              // .zip file comment length
230
+            ); // .zip file comment length
231 231
         return $this->zipfile;
232 232
     }
233 233
 
Please login to merge, or discard this patch.
htdocs/config2/settings-dist.inc.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 // database placeholder
108 108
 
109 109
 // productive database with opencaching-tables
110
-$opt['db']['placeholder']['db'] = '';    // selected by default
110
+$opt['db']['placeholder']['db'] = ''; // selected by default
111 111
 
112 112
 // empty database for temporary table creation
113 113
 $opt['db']['placeholder']['tmpdb'] = '';
@@ -121,14 +121,14 @@  discard block
 block discarded – undo
121 121
 $opt['system']['maillog']['syslog_db_user'] = '';
122 122
 $opt['system']['maillog']['syslog_db_password'] = '';
123 123
 $opt['system']['maillog']['syslog_db_table'] = '';
124
-$opt['system']['maillog']['syslog_oc_host'] = '';  // 'host_name' column in syslog DB
125
-$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%';  // 'program' column in syslog DB
126
-$opt['system']['maillog']['column']['id'] = 'id';               // 'ID'
127
-$opt['system']['maillog']['column']['created'] = 'created';     // 'ReceivedAt'
124
+$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB
125
+$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB
126
+$opt['system']['maillog']['column']['id'] = 'id'; // 'ID'
127
+$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt'
128 128
 $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost'
129
-$opt['system']['maillog']['column']['message'] = 'message';     // 'Message'
130
-$opt['system']['maillog']['column']['program'] = 'program';     // 'SysLogTag'
131
-$opt['system']['maillog']['inactivity_warning'] = 30;   // warn after N days without new entries
129
+$opt['system']['maillog']['column']['message'] = 'message'; // 'Message'
130
+$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag'
131
+$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries
132 132
 
133 133
 /* cookie or session
134 134
  *
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
  *
151 151
  * other parameters may be customized
152 152
  */
153
-$opt['session']['mode'] = SAVE_COOKIE;     // don't change - other option "SAVE_SESSION" is not implemented properly
153
+$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly
154 154
 $opt['session']['cookiename'] = 'ocvagrant'; // only with SAVE_COOKIE
155 155
 $opt['session']['path'] = '/';
156
-$opt['session']['domain'] = '';    // may be overwritten by $opt['domain'][...]['cookiedomain']
156
+$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain']
157 157
 
158 158
 /* maximum session lifetime
159 159
  */
160 160
 $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year)
161
-$opt['session']['expire']['url'] = 1800;        // when no cookies used (default 30 min since last call), attention to session.js
161
+$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js
162 162
 
163 163
 /* If the Referer was sent by the client and the substring was not found,
164 164
  * the embedded session id will be marked as invalid.
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 /* other template options
185 185
  *
186 186
  */
187
-$opt['page']['origin_url'] = 'https://www.opencaching.de/';  // production installation for this OC site
187
+$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site
188 188
 $opt['page']['develsystem'] = false;
189 189
 $opt['page']['teampic_url'] = 'https://www.opencaching.de/images/team/';
190 190
 $opt['page']['teammember_url'] = 'https://www.opencaching.de/';
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     'newcaches' => [
219 219
         'show' => true,
220 220
         'url' => 'https://www.opencaching.de',
221
-        'urlname' => '',  // optional: show other name than the url-domain
221
+        'urlname' => '', // optional: show other name than the url-domain
222 222
     ],
223 223
 ];
224 224
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 
379 379
 /* license-related functions
380 380
  */
381
-$opt['logic']['license']['newusers'] = 2;  // see license constants in lib2/logic/const.inc.php
381
+$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
382 382
 $opt['logic']['license']['admin'] = true;
383 383
 $opt['logic']['license']['disclaimer'] = false;
384 384
 $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense';
@@ -386,18 +386,18 @@  discard block
 block discarded – undo
386 386
 
387 387
 /* optional APIs
388 388
  */
389
-$opt['logic']['api']['email_problems']['key'] = '';   // must be set to enable
390
-$opt['logic']['api']['user_inactivity']['key'] = '';  // must be set to enable
389
+$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable
390
+$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable
391 391
 
392 392
 /* cache report info settings
393 393
  */
394 394
 $opt['logic']['cache_reports']['delaydays'] = 2;
395
-$opt['logic']['cache_reports']['min_processperday'] = 5;   // set to 0 to disable
396
-$opt['logic']['cache_reports']['max_processperday'] = 20;  // set to 0 to disable
395
+$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable
396
+$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable
397 397
 
398 398
 /* cronjob
399 399
  */
400
-$opt['cron']['username'] = 'apache';   // system username for cronjobs
400
+$opt['cron']['username'] = 'apache'; // system username for cronjobs
401 401
 
402 402
 /* generate sitemap.xml and upload to search engines
403 403
  *
Please login to merge, or discard this patch.