Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
created
htdocs/lib2/translateAccess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__ . '/logic/const.inc.php';
8
+require_once __DIR__.'/logic/const.inc.php';
9 9
 
10 10
 class translateAccess
11 11
 {
Please login to merge, or discard this patch.
htdocs/lib2/common.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  *  TODO: accept-language des Browser auswerten
11 11
  ***************************************************************************/
12 12
 
13
-require_once __DIR__ . '/../vendor/autoload.php';
13
+require_once __DIR__.'/../vendor/autoload.php';
14 14
 
15 15
 function __autoload($class_name)
16 16
 {
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
         return;
21 21
     }
22 22
 
23
-    $file1 = $opt['rootpath'] . 'lib2/' . $class_name . '.class.php';
24
-    $file2 = $opt['rootpath'] . 'lib2/logic/' . $class_name . '.class.php';
23
+    $file1 = $opt['rootpath'].'lib2/'.$class_name.'.class.php';
24
+    $file2 = $opt['rootpath'].'lib2/logic/'.$class_name.'.class.php';
25 25
     if (file_exists($file1)) {
26 26
         require_once $file1;
27 27
     } elseif (file_exists($file2)) {
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 mb_regex_encoding('UTF-8');
44 44
 
45 45
 // set options
46
-require_once $opt['rootpath'] . 'config2/settings-dist.inc.php';
47
-require_once $opt['rootpath'] . 'config2/settings.inc.php';
48
-require_once $opt['rootpath'] . 'config2/verify-settings.inc.php';
46
+require_once $opt['rootpath'].'config2/settings-dist.inc.php';
47
+require_once $opt['rootpath'].'config2/settings.inc.php';
48
+require_once $opt['rootpath'].'config2/verify-settings.inc.php';
49 49
 
50 50
 foreach ($opt['page']['banned_user_agents'] as $ua) {
51 51
     if (strpos($useragent, $ua) !== false) {
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
     }
70 70
 }
71 71
 
72
-require_once $opt['rootpath'] . 'lib2/errorhandler.inc.php';
72
+require_once $opt['rootpath'].'lib2/errorhandler.inc.php';
73 73
 configure_php();
74 74
 
75
-require $opt['rootpath'] . 'lib2/cookie.class.php';
75
+require $opt['rootpath'].'lib2/cookie.class.php';
76 76
 normalize_settings();
77 77
 set_language();
78 78
 set_usercountry();
@@ -85,30 +85,30 @@  discard block
 block discarded – undo
85 85
         $opt['template']['style'] = $opt['template']['default']['style'];
86 86
     }
87 87
 
88
-    if (!is_dir($opt['rootpath'] . 'templates2/' . $opt['template']['style'])) {
88
+    if (!is_dir($opt['rootpath'].'templates2/'.$opt['template']['style'])) {
89 89
         $opt['template']['style'] = $opt['template']['default']['style'];
90 90
     }
91 91
 } else {
92 92
     $opt['template']['style'] = $opt['template']['default']['style'];
93 93
 }
94
-$opt['stylepath'] = $opt['rootpath'] . 'templates2/' . $opt['template']['style'] . '/';
94
+$opt['stylepath'] = $opt['rootpath'].'templates2/'.$opt['template']['style'].'/';
95 95
 
96 96
 check_useragent();
97 97
 
98 98
 /* setup smarty
99 99
  *
100 100
  */
101
-require $opt['rootpath'] . 'lib2/OcSmarty.class.php';
101
+require $opt['rootpath'].'lib2/OcSmarty.class.php';
102 102
 $tpl = new OcSmarty();
103 103
 
104 104
 // include all we need
105
-require_once $opt['rootpath'] . 'lib2/logic/const.inc.php';
106
-require_once $opt['rootpath'] . 'lib2/error.inc.php';
107
-require_once $opt['rootpath'] . 'lib2/util.inc.php';
108
-require_once $opt['rootpath'] . 'lib2/db.inc.php';
109
-require_once $opt['rootpath'] . 'lib2/login.class.php';
110
-require_once $opt['rootpath'] . 'lib2/menu.class.php';
111
-require_once $opt['rootpath'] . 'lib2/logic/labels.inc.php';
105
+require_once $opt['rootpath'].'lib2/logic/const.inc.php';
106
+require_once $opt['rootpath'].'lib2/error.inc.php';
107
+require_once $opt['rootpath'].'lib2/util.inc.php';
108
+require_once $opt['rootpath'].'lib2/db.inc.php';
109
+require_once $opt['rootpath'].'lib2/login.class.php';
110
+require_once $opt['rootpath'].'lib2/menu.class.php';
111
+require_once $opt['rootpath'].'lib2/logic/labels.inc.php';
112 112
 // require_once $opt['rootpath'] . 'lib2/throttle.inc.php';
113 113
 
114 114
 // apply post configuration
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     $login->userid > 0 &&
124 124
     sql_value("SELECT `email_problems` FROM `user` WHERE `user_id`='&1'", 0, $login->userid) != 0
125 125
 ) {
126
-    header("Location: verifyemail.php?page=" . basename($_SERVER['REQUEST_URI']));
126
+    header("Location: verifyemail.php?page=".basename($_SERVER['REQUEST_URI']));
127 127
     exit;
128 128
 }
129 129
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     }
149 149
 
150 150
     if (isset($opt['logic']['cachemaps']['wmsurl']) && strstr($opt['logic']['cachemaps']['wmsurl'], '://')) {
151
-        $opt['logic']['cachemaps']['wmsurl'] = $opt['page']['protocol'] . strstr(
151
+        $opt['logic']['cachemaps']['wmsurl'] = $opt['page']['protocol'].strstr(
152 152
                 $opt['logic']['cachemaps']['wmsurl'],
153 153
                 '://'
154 154
             );
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $cookie->set('locale', $opt['template']['locale'], $opt['template']['default']['locale']);
237 237
     }
238 238
 
239
-    bindtextdomain('messages', $opt['rootpath'] . 'cache2/translate');
239
+    bindtextdomain('messages', $opt['rootpath'].'cache2/translate');
240 240
     set_php_locale();
241 241
     textdomain('messages');
242 242
 }
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
     if (strtolower(substr($url, 0, strlen($opt['page']['absolute_http_url']))) == $opt['page']['absolute_http_url']
278 278
         && $opt['page']['https']['active']
279 279
     ) {
280
-        return 'https' . strstr($url, '://');
280
+        return 'https'.strstr($url, '://');
281 281
     } elseif (strtolower(
282 282
             substr($url, 0, strlen($opt['page']['absolute_https_url']))
283 283
         ) == $opt['page']['absolute_https_url']
284 284
         && !$opt['page']['https']['active']
285 285
     ) {
286
-        return 'http' . strstr($url, '://');
286
+        return 'http'.strstr($url, '://');
287 287
     } else {
288 288
         return $url;
289 289
     }
Please login to merge, or discard this patch.
htdocs/lib2/smiley.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@
 block discarded – undo
90 90
 
91 91
     $smiley_a = array();
92 92
     for ($n = 0; $n < count($smiley['file']); ++ $n) {
93
-        $smiley['image'][$n] = '<img src="' . $opt['template']['smiley'] . $smiley['file'][$n] . '" alt="' . $smiley['text'][$n] . '" border="0" width="18px" height="18px" />';
94
-        $smiley['spaced_image'][$n] = ' ' . $smiley['image'][$n] . ' ';
93
+        $smiley['image'][$n] = '<img src="'.$opt['template']['smiley'].$smiley['file'][$n].'" alt="'.$smiley['text'][$n].'" border="0" width="18px" height="18px" />';
94
+        $smiley['spaced_image'][$n] = ' '.$smiley['image'][$n].' ';
95 95
         $smiley_a[] = [
96 96
             'text' => $smiley['text'][$n],
97 97
             'file' => $smiley['file'][$n],
Please login to merge, or discard this patch.
htdocs/lib2/search/search.kml.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $kmlLine =
22 22
         '
23 23
 <Placemark>
24
-  <description><![CDATA[' . $t_by . ' {username}<br><br><a href="' . $opt['page']['default_absolute_url'] . 'viewcache.php?cacheid={cacheid}">' . $t_showdesc . '</a><br>&nbsp;<br><table cellspacing="0" cellpadding="0" border="0"><tr><td>{typeimgurl} </td><td>' . $t_type . ' {type}<br>' . $t_size . ' {size}</td></tr><tr><td colspan="2">' . $t_difficulty . '<br>' . $t_terrain . '</td></tr></table>]]></description>
24
+  <description><![CDATA[' . $t_by.' {username}<br><br><a href="'.$opt['page']['default_absolute_url'].'viewcache.php?cacheid={cacheid}">'.$t_showdesc.'</a><br>&nbsp;<br><table cellspacing="0" cellpadding="0" border="0"><tr><td>{typeimgurl} </td><td>'.$t_type.' {type}<br>'.$t_size.' {size}</td></tr><tr><td colspan="2">'.$t_difficulty.'<br>'.$t_terrain.'</td></tr></table>]]></description>
25 25
   <name>{name}{archivedflag}</name>
26 26
   <LookAt>
27 27
     <longitude>{lon}</longitude>
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
   <Point>
35 35
     <coordinates>{lon},{lat},0</coordinates>
36 36
   </Point>
37
-  <Snippet>D: {difficulty}/T: {terrain} {size}  ' . $t_by . ' {username}</Snippet>
37
+  <Snippet>D: {difficulty}/T: {terrain} {size}  ' . $t_by.' {username}</Snippet>
38 38
 </Placemark>
39 39
 ';
40 40
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     while ($r = sql_fetch_array($rs)) {
95 95
         $thisline = $kmlLine;
96
-        $typeimgurl = '<img src="{urlbase}resource2/' . $style . '/images/cacheicon/' . $r['icon_large'] . '" alt="' . $r['typedesc'] . '" title="' . $r['typedesc'] . '" />';
96
+        $typeimgurl = '<img src="{urlbase}resource2/'.$style.'/images/cacheicon/'.$r['icon_large'].'" alt="'.$r['typedesc'].'" title="'.$r['typedesc'].'" />';
97 97
 
98 98
         $thisline = mb_ereg_replace('{icon}', $r['kml_name'], $thisline);
99 99
         $thisline = mb_ereg_replace('{typeimgurl}', $typeimgurl, $thisline);
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
 
112 112
         if (($r['status'] == 2) || ($r['status'] == 3) || ($r['status'] == 6)) {
113 113
             if ($r['status'] == 2) {
114
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_temporarily_na . ')', $thisline);
114
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_temporarily_na.')', $thisline);
115 115
             } elseif ($r['status'] == 3) {
116
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_archived . ')', $thisline);
116
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_archived.')', $thisline);
117 117
             } else {
118
-                $thisline = mb_ereg_replace('{archivedflag}', ' (' . $state_locked . ')', $thisline);
118
+                $thisline = mb_ereg_replace('{archivedflag}', ' ('.$state_locked.')', $thisline);
119 119
             }
120 120
         } else {
121 121
             $thisline = mb_ereg_replace('{archivedflag}', '', $thisline);
Please login to merge, or discard this patch.
htdocs/lib2/search/search.loc.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     $server_domain = $opt['page']['domain'];
20 20
     $server_address = $opt['page']['default_absolute_url'];
21 21
 
22
-    $locHead = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><loc version="1.0" src="' . $server_domain . '">' . "\n";
22
+    $locHead = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><loc version="1.0" src="'.$server_domain.'">'."\n";
23 23
 
24 24
     $locLine =
25 25
         '
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     <name id="{waypoint}"><![CDATA[{archivedflag}{name} by {username}]]></name>
28 28
     <coord lat="{lat}" lon="{lon}"/>
29 29
     <type>Geocache</type>
30
-    <link text="Beschreibung">' . $server_address . 'viewcache.php?cacheid={cacheid}</link>
30
+    <link text="Beschreibung">' . $server_address.'viewcache.php?cacheid={cacheid}</link>
31 31
 </waypoint>
32 32
 ';
33 33
 
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
         if (($r['status'] == 2) || ($r['status'] == 3) || ($r['status'] == 6)) {
80 80
             if ($r['status'] == 2) {
81
-                $thisline = mb_ereg_replace('{archivedflag}', $state_temporarily_na . '!, ', $thisline);
81
+                $thisline = mb_ereg_replace('{archivedflag}', $state_temporarily_na.'!, ', $thisline);
82 82
             } elseif ($r['status'] == 3) {
83
-                $thisline = mb_ereg_replace('{archivedflag}', $state_archived . '!, ', $thisline);
83
+                $thisline = mb_ereg_replace('{archivedflag}', $state_archived.'!, ', $thisline);
84 84
             } else {
85
-                $thisline = mb_ereg_replace('{archivedflag}', $state_locked . '!, ', $thisline);
85
+                $thisline = mb_ereg_replace('{archivedflag}', $state_locked.'!, ', $thisline);
86 86
             }
87 87
         } else {
88 88
             $thisline = mb_ereg_replace('{archivedflag}', '', $thisline);
Please login to merge, or discard this patch.
htdocs/lib2/search/search.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
     }
157 157
 
158 158
     // doppelte chars ersetzen
159
-    for ($c = ord('a'); $c <= ord('z'); $c ++) {
160
-        $str = mb_ereg_replace(chr($c) . chr($c), chr($c), $str);
159
+    for ($c = ord('a'); $c <= ord('z'); $c++) {
160
+        $str = mb_ereg_replace(chr($c).chr($c), chr($c), $str);
161 161
     }
162 162
 
163 163
     return $str;
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 {
258 258
     global $opt;
259 259
 
260
-    $desclangs = ',' . $rCache['desc_languages'] . ',';
260
+    $desclangs = ','.$rCache['desc_languages'].',';
261 261
     $desclang = $rCache['desc_language'];
262 262
 
263
-    if (strpos($desclangs, ',' . $opt['template']['locale'] . ',') !== false) {
263
+    if (strpos($desclangs, ','.$opt['template']['locale'].',') !== false) {
264 264
         $desclang = $opt['template']['locale'];
265
-    } elseif (strpos($desclangs, ',' . $opt['template']['default']['locale'] . ',') !== false) {
265
+    } elseif (strpos($desclangs, ','.$opt['template']['default']['locale'].',') !== false) {
266 266
         $desclang = $opt['template']['default']['locale'];
267
-    } elseif (strpos($desclangs, ',' . $opt['template']['default']['fallback_locale'] . ',') !== false) {
267
+    } elseif (strpos($desclangs, ','.$opt['template']['default']['fallback_locale'].',') !== false) {
268 268
         $desclang = $opt['template']['default']['fallback_locale'];
269 269
     } elseif (strpos($desclangs, ',EN,') !== false) {
270 270
         $desclang = 'EN';
Please login to merge, or discard this patch.
htdocs/lib2/search/search.map2.inc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     $tpl->error(ERROR_INVALID_OPERATION);
13 13
 }
14 14
 
15
-$sqlchecksum = sprintf('%u', crc32($cachesFilter . "\n" . $sqlFilter));
15
+$sqlchecksum = sprintf('%u', crc32($cachesFilter."\n".$sqlFilter));
16 16
 
17 17
 // check if query was already executed within the cache period
18 18
 $rsMapCache = sql(
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 );
29 29
 if ($rMapCache = sql_fetch_assoc($rsMapCache)) {
30 30
     $resultId = $rMapCache['result_id'];
31
-    sql("UPDATE `map2_result` SET `shared_counter`=`shared_counter`+1 WHERE `result_id`='" . ($resultId + 0) . "'");
31
+    sql("UPDATE `map2_result` SET `shared_counter`=`shared_counter`+1 WHERE `result_id`='".($resultId + 0)."'");
32 32
 } else {
33 33
     // ensure that query is performed without errors before reserving the result_id
34 34
     sql_temp_table_slave('tmpmapresult');
35 35
     sql_slave("CREATE TEMPORARY TABLE &tmpmapresult (`cache_id` INT UNSIGNED NOT NULL, PRIMARY KEY (`cache_id`)) ENGINE=MEMORY");
36
-    sql_slave("INSERT INTO &tmpmapresult (`cache_id`) " . $sqlFilter);
36
+    sql_slave("INSERT INTO &tmpmapresult (`cache_id`) ".$sqlFilter);
37 37
 
38 38
     sql(
39 39
         "
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         VALUES ('&1', '&2', '&3', NOW(), NOW())",
42 42
         $db['slave_id'],
43 43
         $sqlchecksum,
44
-        $cachesFilter . "\n" . $sqlFilter
44
+        $cachesFilter."\n".$sqlFilter
45 45
     );
46 46
     $resultId = sql_insert_id();
47 47
 
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
             $rBounds['lon_min'] -= $halfwin;
75 75
             $rBounds['lon_max'] += $halfwin;
76 76
         }
77
-        $bounds_param = "&lat_min=" . round($rBounds['lat_min'], 5) . "&lat_max=" . round($rBounds['lat_max'], 5) . '&lon_min=' . round($rBounds['lon_min'], 5) . '&lon_max=' . round($rBounds['lon_max'], 5);
77
+        $bounds_param = "&lat_min=".round($rBounds['lat_min'], 5)."&lat_max=".round($rBounds['lat_max'], 5).'&lon_min='.round($rBounds['lon_min'], 5).'&lon_max='.round($rBounds['lon_max'], 5);
78 78
     }
79 79
     sql_free_result($rs);
80 80
 
81
-    $tpl->redirect('map2.php?queryid=' . $options['queryid'] . '&resultid=' . $resultId . $bounds_param);
81
+    $tpl->redirect('map2.php?queryid='.$options['queryid'].'&resultid='.$resultId.$bounds_param);
82 82
 } else {
83 83
     echo $resultId;
84 84
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,8 @@
 block discarded – undo
67 67
     if (($rBounds = sql_fetch_assoc($rs)) && $rBounds['lat_min'] !== null /* >0 caches */) {
68 68
         if ($rBounds['lat_min'] == $rBounds['lat_max'] &&
69 69
             $rBounds['lon_min'] == $rBounds['lon_max']
70
-        ) { // 1 Cache
70
+        ) {
71
+// 1 Cache
71 72
             $halfwin = 0.02;
72 73
             $rBounds['lat_min'] -= $halfwin;
73 74
             $rBounds['lat_max'] += $halfwin;
Please login to merge, or discard this patch.
htdocs/lib2/search/search.ovl.inc.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
  * OVL search output for TOP25, TOP50 etc.
8 8
  ****************************************************************************/
9 9
 
10
-require_once $opt['rootpath'] . 'lib2/charset.inc.php';
10
+require_once $opt['rootpath'].'lib2/charset.inc.php';
11 11
 
12 12
 $search_output_file_download = true;
13 13
 $content_type_plain = 'application/ovl';
Please login to merge, or discard this patch.
htdocs/lib2/cli.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,30 +11,30 @@
 block discarded – undo
11 11
 {
12 12
     public function out($str)
13 13
     {
14
-        echo $str . "\n";
14
+        echo $str."\n";
15 15
     }
16 16
 
17 17
     public function debug($str)
18 18
     {
19 19
         global $opt;
20 20
         if (($opt['debug'] & DEBUG_CLI) == DEBUG_CLI) {
21
-            echo 'DEBUG: ' . $str . "\n";
21
+            echo 'DEBUG: '.$str."\n";
22 22
         }
23 23
     }
24 24
 
25 25
     public function warn($str)
26 26
     {
27
-        echo 'WARN: ' . $str . "\n";
27
+        echo 'WARN: '.$str."\n";
28 28
     }
29 29
 
30 30
     public function error($str)
31 31
     {
32
-        echo 'ERROR: ' . $str . "\n";
32
+        echo 'ERROR: '.$str."\n";
33 33
     }
34 34
 
35 35
     public function fatal($str)
36 36
     {
37
-        echo 'FATAL: ' . $str . "\n";
37
+        echo 'FATAL: '.$str."\n";
38 38
         exit;
39 39
     }
40 40
 }
Please login to merge, or discard this patch.