Completed
Push — master ( 598c1e...182b8c )
by Thomas
15:55 queued 08:34
created
htdocs/src/Oc/Libse/Coordinate/TypeCoordinate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 namespace Oc\Libse\Coordinate;
9 9
 
10
-require_once __DIR__ . '/../../../../lib2/logic/const.inc.php';
10
+require_once __DIR__.'/../../../../lib2/logic/const.inc.php';
11 11
 
12 12
 class TypeCoordinate
13 13
 {
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Coordinate/FormatterCoordinate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@
 block discarded – undo
47 47
     public function formatHtml($coordinate, $separator = ' ')
48 48
     {
49 49
         return $this->formatHtmlHemDegMin($this->formatLatHem($coordinate), $this->formatLatDeg($coordinate), $this->formatLatMin($coordinate))
50
-        . $separator .
50
+        . $separator.
51 51
         $this->formatHtmlHemDegMin($this->formatLonHem($coordinate), $this->formatLonDeg($coordinate), $this->formatLonMin($coordinate));
52 52
     }
53 53
 
54 54
     private function formatHtmlHemDegMin($hem, $deg, $min)
55 55
     {
56
-        return $hem . ' ' . $deg . '° ' . $min . '\'';
56
+        return $hem.' '.$deg.'° '.$min.'\'';
57 57
     }
58 58
 }
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Validator/IntegerValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
 
31 31
     protected function getValidateRegex()
32 32
     {
33
-        return '-?[0-9]' . $this->int_len . '$';
33
+        return '-?[0-9]'.$this->int_len.'$';
34 34
     }
35 35
 
36 36
     protected function getValue($value)
37 37
     {
38
-        return (int) $value;
38
+        return (int)$value;
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
htdocs/src/Oc/Libse/Validator/RealValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     protected function getMinValue()
24 24
     {
25
-        return - 1e38;
25
+        return -1e38;
26 26
     }
27 27
 
28 28
     protected function getMaxValue()
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function getValidateRegex()
34 34
     {
35
-        return '-?[0-9]' . $this->int_len . '([,.][0-9]' . $this->dec_len . ')?$';
35
+        return '-?[0-9]'.$this->int_len.'([,.][0-9]'.$this->dec_len.')?$';
36 36
     }
37 37
 
38 38
     protected function getValue($value)
Please login to merge, or discard this patch.
htdocs/src/Oc/Console/Command/CodeSnifferCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         }
44 44
 
45 45
         $process = new Process($cmd, $this->rootPath, null, null, 9600);
46
-        $process->run(function ($type, $buffer) {
46
+        $process->run(function($type, $buffer) {
47 47
             echo $buffer;
48 48
         });
49 49
 
Please login to merge, or discard this patch.
htdocs/src/Oc/Console/Command/AbstractCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
     {
28 28
         parent::__construct($name);
29 29
 
30
-        $this->rootPath = realpath(__DIR__ . '/../../../../');
30
+        $this->rootPath = realpath(__DIR__.'/../../../../');
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
htdocs/map2.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 $build_map_towns_menu = true;
11 11
 
12
-require __DIR__ . '/lib2/web.inc.php';
12
+require __DIR__.'/lib2/web.inc.php';
13 13
 
14 14
 /* because the map does access some private info like
15 15
  * ignored caches, we need to verify the login data
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                        WHERE option_id=6 AND user_id='&1'", true, $login->userid))
68 68
 ) {
69 69
     $fullscreen = true;
70
-    $tpl->popup = true;        // disables page header and -frame
70
+    $tpl->popup = true; // disables page header and -frame
71 71
     $tpl->popupmargin = false;
72 72
 } else {
73 73
     $fullscreen = false;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     $tpl->error($translate->t('There is no google maps key registered for this domain.', '', '', 0));
134 134
 }
135 135
 
136
-$tpl->add_header_javascript($opt['page']['protocol'] . '://maps.googleapis.com/maps/api/js?sensor=false&key=' . urlencode($sGMKey) . '&language=' . strtolower($opt['template']['locale']));
136
+$tpl->add_header_javascript($opt['page']['protocol'].'://maps.googleapis.com/maps/api/js?sensor=false&key='.urlencode($sGMKey).'&language='.strtolower($opt['template']['locale']));
137 137
 // https is supported by google, but may make problems in some environments,
138 138
 // e.g. does not work with MSIE 7 on WinXP
139 139
 $tpl->add_header_javascript('resource2/misc/map/dragzoom_packed.js');
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     global $login;
280 280
 
281 281
     $rsCache = sql_slave(
282
-        "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance) . " AS `distance`,
282
+        "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance)." AS `distance`,
283 283
                                   `caches`.`wp_oc`
284 284
                              FROM `caches`
285 285
                        INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id`
@@ -389,42 +389,42 @@  discard block
 block discarded – undo
389 389
     $wphandler = new HandlerChildWp();
390 390
     $waypoints = $wphandler->getChildWps($rCache['cache_id'], true);
391 391
 
392
-    echo '<caches>' . "\n";
392
+    echo '<caches>'."\n";
393 393
     echo '  <cache ';
394
-    echo 'name="' . xmlentities($rCache['name']) . '" ';
395
-    echo 'wpoc="' . xmlentities($rCache['wp_oc']) . '" ';
396
-    echo 'coords="' . $rCache['longitude'] . ',' . $rCache['latitude'] . '" ';
397
-    echo 'inactive="' . xmlentities($rCache['inactive']) . '" ';
398
-    echo 'status_text="' . xmlentities($rCache['statustext']) . '" ';
399
-    echo 'type_id="' . xmlentities($rCache['type_id']) . '" ';
400
-    echo 'type_text="' . xmlentities($rCache['type_text']) . '" ';
401
-    echo 'size="' . xmlentities($rCache['size']) . '" ';
402
-    echo 'difficulty="' . xmlentities($rCache['difficulty'] / 2) . '" ';
403
-    echo 'terrain="' . xmlentities($rCache['terrain'] / 2) . '" ';
404
-    echo 'listed_since="' . xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))) . '" ';
405
-    echo 'is_publishdate="' . xmlentities($rCache['is_publishdate']) . '" ';
406
-    echo 'toprating="' . xmlentities($rCache['toprating']) . '" ';
407
-    echo 'geokreties="' . xmlentities($nGeokretyCount) . '" ';
408
-    echo 'found="' . xmlentities(($nFoundCount > 0) ? 1 : 0) . '" ';
409
-    echo 'notfound="' . xmlentities(($nNotFoundCount > 0) ? 1 : 0) . '" ';
410
-    echo 'attended="' . xmlentities(($nAttendedCount > 0) ? 1 : 0) . '" ';
411
-    echo 'oconly="' . xmlentities($rCache['oconly']) . '" ';
412
-    echo 'owner="' . xmlentities($rCache['owner']) . '" ';
413
-    echo 'username="' . xmlentities($rCache['username']) . '" ';
414
-    echo 'userid="' . xmlentities($rCache['user_id']) . '" ';
415
-    echo 'picurl="' . xmlentities($rCache['picurl']) . '" ';
416
-    echo 'pictitle="' . xmlentities(trim($rCache['pictitle'])) . '" >\n';
394
+    echo 'name="'.xmlentities($rCache['name']).'" ';
395
+    echo 'wpoc="'.xmlentities($rCache['wp_oc']).'" ';
396
+    echo 'coords="'.$rCache['longitude'].','.$rCache['latitude'].'" ';
397
+    echo 'inactive="'.xmlentities($rCache['inactive']).'" ';
398
+    echo 'status_text="'.xmlentities($rCache['statustext']).'" ';
399
+    echo 'type_id="'.xmlentities($rCache['type_id']).'" ';
400
+    echo 'type_text="'.xmlentities($rCache['type_text']).'" ';
401
+    echo 'size="'.xmlentities($rCache['size']).'" ';
402
+    echo 'difficulty="'.xmlentities($rCache['difficulty'] / 2).'" ';
403
+    echo 'terrain="'.xmlentities($rCache['terrain'] / 2).'" ';
404
+    echo 'listed_since="'.xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))).'" ';
405
+    echo 'is_publishdate="'.xmlentities($rCache['is_publishdate']).'" ';
406
+    echo 'toprating="'.xmlentities($rCache['toprating']).'" ';
407
+    echo 'geokreties="'.xmlentities($nGeokretyCount).'" ';
408
+    echo 'found="'.xmlentities(($nFoundCount > 0) ? 1 : 0).'" ';
409
+    echo 'notfound="'.xmlentities(($nNotFoundCount > 0) ? 1 : 0).'" ';
410
+    echo 'attended="'.xmlentities(($nAttendedCount > 0) ? 1 : 0).'" ';
411
+    echo 'oconly="'.xmlentities($rCache['oconly']).'" ';
412
+    echo 'owner="'.xmlentities($rCache['owner']).'" ';
413
+    echo 'username="'.xmlentities($rCache['username']).'" ';
414
+    echo 'userid="'.xmlentities($rCache['user_id']).'" ';
415
+    echo 'picurl="'.xmlentities($rCache['picurl']).'" ';
416
+    echo 'pictitle="'.xmlentities(trim($rCache['pictitle'])).'" >\n';
417 417
 
418 418
     foreach ($waypoints as $waypoint) {
419 419
         echo '    <wpt ';
420
-        echo 'typeid="' . xmlentities($waypoint['type']) . '" ';
421
-        echo 'typename="' . xmlentities($waypoint['name']) . '" ';
422
-        echo 'typepreposition="' . xmlentities($waypoint['preposition']) . '" ';
423
-        echo 'image="' . xmlentities($waypoint['image']) . '" ';
420
+        echo 'typeid="'.xmlentities($waypoint['type']).'" ';
421
+        echo 'typename="'.xmlentities($waypoint['name']).'" ';
422
+        echo 'typepreposition="'.xmlentities($waypoint['preposition']).'" ';
423
+        echo 'image="'.xmlentities($waypoint['image']).'" ';
424 424
         echo 'imagewidth="38" imageheight="38" ';
425
-        echo 'latitude="' . xmlentities($waypoint['latitude']) . '" ';
426
-        echo 'longitude="' . xmlentities($waypoint['longitude']) . '" ';
427
-        echo 'description="' . xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))) . '" />\n';
425
+        echo 'latitude="'.xmlentities($waypoint['latitude']).'" ';
426
+        echo 'longitude="'.xmlentities($waypoint['longitude']).'" ';
427
+        echo 'description="'.xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))).'" />\n';
428 428
     }
429 429
 
430 430
     echo '  </cache>\n';
@@ -438,9 +438,9 @@  discard block
 block discarded – undo
438 438
 {
439 439
     global $login, $opt;
440 440
 
441
-    echo '<caches>' . "\n";
441
+    echo '<caches>'."\n";
442 442
     $rs = sql_slave(
443
-        "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, 0) . " AS `distance`,
443
+        "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, 0)." AS `distance`,
444 444
                           `caches`.`name`, `caches`.`wp_oc`
445 445
                      FROM `map2_data`
446 446
                INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id`
@@ -449,30 +449,30 @@  discard block
 block discarded – undo
449 449
                       AND (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&3')
450 450
                       AND `map2_data`.`result_id`='&2'
451 451
                            ORDER BY `distance` ASC LIMIT 30",
452
-        '%' . $sName . '%',
452
+        '%'.$sName.'%',
453 453
         $nResultId,
454 454
         $login->userid
455 455
     );
456 456
     $caches_found = 0;
457 457
     while ($r = sql_fetch_assoc($rs)) {
458
-        echo '<cache name="' . xmlentities($r['name']) . '" wpoc="' . xmlentities($r['wp_oc']) . '" />' . "\n";
459
-        ++ $caches_found;
458
+        echo '<cache name="'.xmlentities($r['name']).'" wpoc="'.xmlentities($r['wp_oc']).'" />'."\n";
459
+        ++$caches_found;
460 460
     }
461 461
     sql_free_result($rs);
462 462
 
463 463
     if (!$caches_found && preg_match('/^[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}$/', $sName)) {
464
-        $result = @file_get_contents('http://api.what3words.com/w3w?key=' . $opt['lib']['w3w']['apikey']
465
-            . '&string=' . urlencode($sName));
464
+        $result = @file_get_contents('http://api.what3words.com/w3w?key='.$opt['lib']['w3w']['apikey']
465
+            . '&string='.urlencode($sName));
466 466
         if ($result) {
467 467
             $json = json_decode($result, true);
468 468
             if (!is_null($json['words']) && !is_null($json['position']) && count($json['position']) == 2) {
469
-                echo '<coord name="' . xmlentities(implode('.', $json['words'])) .
470
-                    '" latitude="' . xmlentities($json["position"][0]) .
471
-                    '" longitude="' . xmlentities($json["position"][1]) . '" />' . "\n";
469
+                echo '<coord name="'.xmlentities(implode('.', $json['words'])).
470
+                    '" latitude="'.xmlentities($json["position"][0]).
471
+                    '" longitude="'.xmlentities($json["position"][1]).'" />'."\n";
472 472
             }
473 473
         }
474 474
     }
475
-    echo '</caches>' . "\n";
475
+    echo '</caches>'."\n";
476 476
 
477 477
     exit;
478 478
 }
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
         "SELECT `slave_id`
497 497
         FROM `map2_result`
498 498
         WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()",
499
-        - 2,
499
+        -2,
500 500
         $nResultId,
501 501
         $opt['map']['maxcacheage']
502 502
     );
@@ -562,8 +562,8 @@  discard block
 block discarded – undo
562 562
     $bMaxRecordReached = ($nRecordCount > $maxrecords);
563 563
 
564 564
     // output data
565
-    echo '<searchresult count="' . xmlentities($nRecordCount) . '" available="1"' .
566
-        ' maxrecordreached="' . ($bMaxRecordReached ? '1' : '0') . '">' . "\n";
565
+    echo '<searchresult count="'.xmlentities($nRecordCount).'" available="1"'.
566
+        ' maxrecordreached="'.($bMaxRecordReached ? '1' : '0').'">'."\n";
567 567
 
568 568
     if (!$bMaxRecordReached) {
569 569
         $namequery = ($cachenames ? ", `caches`.`name` AS `cachename`" : "");
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                             IF(`found_logs`.`id` IS NULL, 0, 1) AS `found`,
579 579
                             IF(`found_logs`.`id` IS NULL AND `notfound_logs`.`id` IS NOT NULL, 1, 0) AS `notfound`,
580 580
                             IF(`caches_attributes`.`attrib_id` IS NULL, 0, 1) AS `oconly`" .
581
-            $namequery . "
581
+            $namequery."
582 582
                        FROM `map2_data`
583 583
                  INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id`
584 584
                  INNER JOIN `user` ON `user`.`user_id`=`caches`.`user_id`
@@ -622,19 +622,19 @@  discard block
 block discarded – undo
622 622
                 $flags |= 16;
623 623
             }
624 624
             if ($compact) {
625
-                echo '<c d="' .
625
+                echo '<c d="'.
626 626
                     xmlentities(
627
-                        $r['wp_oc'] . '/' . round($r['longitude'], 5) . '/' .
628
-                        round($r['latitude'], 5) . '/' . $r['type'] . '/' . $flags) . '"' .
629
-                    (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') .
627
+                        $r['wp_oc'].'/'.round($r['longitude'], 5).'/'.
628
+                        round($r['latitude'], 5).'/'.$r['type'].'/'.$flags).'"'.
629
+                    (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : '').
630 630
                     ' />';
631 631
             } else {
632
-                echo '<cache wp="' . xmlentities($r['wp_oc']) . '"' .
633
-                    ' lon="' . xmlentities(round($r['longitude'], 5)) . '"' .
634
-                    ' lat="' . xmlentities(round($r['latitude'], 5)) . '"' .
635
-                    ' type="' . xmlentities($r['type']) . '"' .
636
-                    (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') .
637
-                    ' f="' . xmlentities($flags) . '" />' . "\n";
632
+                echo '<cache wp="'.xmlentities($r['wp_oc']).'"'.
633
+                    ' lon="'.xmlentities(round($r['longitude'], 5)).'"'.
634
+                    ' lat="'.xmlentities(round($r['latitude'], 5)).'"'.
635
+                    ' type="'.xmlentities($r['type']).'"'.
636
+                    (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : '').
637
+                    ' f="'.xmlentities($flags).'" />'."\n";
638 638
             }
639 639
         }
640 640
         sql_free_result($rs);
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/editlog.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
 
19 19
 $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.');
20 20
 
21
-$date_message = '<span class="errormsg">' . t('date or time is invalid') . '</span>';
21
+$date_message = '<span class="errormsg">'.t('date or time is invalid').'</span>';
22 22
 $smiley_link = '<a href="javascript:insertSmiley(\'{smiley_symbol}\',\'{smiley_file}\')">{smiley_image}</a>';
23 23
 
24
-$log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> (' . t('only for found logs') . ')</td></tr>
24
+$log_pw_field = '<tr><td colspan="2">'.t('passwort to log:').' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ('.t('only for found logs').')</td></tr>
25 25
                     <tr><td class="spacer" colspan="2"></td></tr>';
26
-$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
26
+$log_pw_field_pw_not_ok = '<tr><td colspan="2">'.t('passwort to log:').' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> '.t('Invalid password!').'</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';
27 27
 
28
-$teamcomment_field = '&nbsp; <input type="checkbox" name="teamcomment" value="1" class="checkbox" {chk_sel} id="teamcomment" /> <label for="teamcomment">' . t('OC team comment') . "</label>";
28
+$teamcomment_field = '&nbsp; <input type="checkbox" name="teamcomment" value="1" class="checkbox" {chk_sel} id="teamcomment" /> <label for="teamcomment">'.t('OC team comment')."</label>";
29 29
 
30 30
 $type_edit_disabled = 'disabled class="disabled"';
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/rating.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,16 +17,16 @@
 block discarded – undo
17 17
 
18 18
  ****************************************************************************/
19 19
 
20
-$rating_tpl =    '<tr>
21
-                <td valign="top">' . t('Recommendations:') . '</td>
20
+$rating_tpl = '<tr>
21
+                <td valign="top">' . t('Recommendations:').'</td>
22 22
                 <td valign="top">
23 23
                     {rating_msg}
24
-                    <noscript><br />' . t('A recommendation can only be made within a "found"-log!') . '</noscript>
24
+                    <noscript><br />' . t('A recommendation can only be made within a "found"-log!').'</noscript>
25 25
                 </td>
26 26
             </tr>
27 27
             <tr><td class="spacer" colspan="2"></td></tr>';
28 28
 
29
-$rating_allowed = '<input type="hidden" name="ratingoption" value="1"><input type="checkbox" name="rating" value="1" class="checkbox" {chk_sel}/>&nbsp;' . t('This cache is one of my recommendations.');
29
+$rating_allowed = '<input type="hidden" name="ratingoption" value="1"><input type="checkbox" name="rating" value="1" class="checkbox" {chk_sel}/>&nbsp;'.t('This cache is one of my recommendations.');
30 30
 $rating_too_few_founds = t('You need additional {anzahl} finds, to make another recommandation.');
31 31
 $rating_maywithdraw = t('Alternatively, you can withdraw a <a href="mytop5.php">existing recommendation</a>.');
32 32
 $rating_stat = t('You have given {curr} of {max} possible recommendations.');
Please login to merge, or discard this patch.