Completed
Pull Request — master (#324)
by Mirko
07:17 queued 21s
created
htdocs/cachelists.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 __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
Please login to merge, or discard this patch.
htdocs/news.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 __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
Please login to merge, or discard this patch.
htdocs/remindemail.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 __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
Please login to merge, or discard this patch.
htdocs/admins.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 __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $tpl->name = 'event_attendance';
11 11
 $tpl->popup = true;
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
@@ -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/common.inc.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
     ) {
278 278
         return 'https' . strstr($url, '://');
279 279
     } elseif (strtolower(substr($url, 0, strlen($opt['page']['absolute_https_url'])))
280
-                  == $opt['page']['absolute_https_url']
280
+                    == $opt['page']['absolute_https_url']
281 281
               && !$opt['page']['https']['active']
282 282
     ) {
283 283
         return 'http' . strstr($url, '://');
Please login to merge, or discard this 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
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     if (isset($opt['logic']['cachemaps']['wmsurl']) && strstr($opt['logic']['cachemaps']['wmsurl'], '://')) {
151 151
         $opt['logic']['cachemaps']['wmsurl'] =
152
-            $opt['page']['protocol'] . strstr($opt['logic']['cachemaps']['wmsurl'], '://');
152
+            $opt['page']['protocol'].strstr($opt['logic']['cachemaps']['wmsurl'], '://');
153 153
     }
154 154
 }
155 155
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $cookie->set('locale', $opt['template']['locale'], $opt['template']['default']['locale']);
235 235
     }
236 236
 
237
-    bindtextdomain('messages', $opt['rootpath'] . 'cache2/translate');
237
+    bindtextdomain('messages', $opt['rootpath'].'cache2/translate');
238 238
     set_php_locale();
239 239
     textdomain('messages');
240 240
 }
@@ -275,12 +275,12 @@  discard block
 block discarded – undo
275 275
     if (strtolower(substr($url, 0, strlen($opt['page']['absolute_http_url']))) == $opt['page']['absolute_http_url']
276 276
         && $opt['page']['https']['active']
277 277
     ) {
278
-        return 'https' . strstr($url, '://');
278
+        return 'https'.strstr($url, '://');
279 279
     } elseif (strtolower(substr($url, 0, strlen($opt['page']['absolute_https_url'])))
280 280
                   == $opt['page']['absolute_https_url']
281 281
               && !$opt['page']['https']['active']
282 282
     ) {
283
-        return 'http' . strstr($url, '://');
283
+        return 'http'.strstr($url, '://');
284 284
     } else {
285 285
         return $url;
286 286
     }
Please login to merge, or discard this patch.
htdocs/thumbs.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $login->verify();
11 11
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $login->hasAdminPriv(ADMIN_USER) ? 1 : 0
40 40
         ) == 0) {
41 41
             if ($debug == 1) {
42
-                die('Debug: line ' . __LINE__);
42
+                die('Debug: line '.__LINE__);
43 43
             } else {
44 44
                 $tpl->redirect(thumbpath('extern', 1));
45 45
             }
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
             $login->hasAdminPriv(ADMIN_USER) ? 1 : 0
58 58
         ) == 0) {
59 59
             if ($debug == 1) {
60
-                die('Debug: line ' . __LINE__);
60
+                die('Debug: line '.__LINE__);
61 61
             } else {
62 62
                 $tpl->redirect(thumbpath('extern', 2));
63 63
             }
64 64
         }
65 65
     } else {
66 66
         if ($debug == 1) {
67
-            die('Debug: line ' . __LINE__);
67
+            die('Debug: line '.__LINE__);
68 68
         } else {
69 69
             $tpl->redirect(thumbpath('intern', $default_object_type));
70 70
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     if ($r['local'] == 0) {
74 74
         if ($debug == 1) {
75
-            die('Debug: line ' . __LINE__);
75
+            die('Debug: line '.__LINE__);
76 76
         } else {
77 77
             $tpl->redirect(thumbpath('extern', $r['object_type']));
78 78
         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     if (($r['spoiler'] == 1) && ($showspoiler != 1)) {
82 82
         if ($debug == 1) {
83
-            die('Debug: line ' . __LINE__);
83
+            die('Debug: line '.__LINE__);
84 84
         } else {
85 85
             $tpl->redirect(thumbpath('spoiler', $r['object_type']));
86 86
         }
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
     $imgurl = $r['url'];
90 90
     $urlparts = mb_split('/', $imgurl);
91 91
 
92
-    if (!file_exists($opt['logic']['pictures']['dir'] . '/' . $urlparts[count($urlparts) - 1])) {
92
+    if (!file_exists($opt['logic']['pictures']['dir'].'/'.$urlparts[count($urlparts) - 1])) {
93 93
         if ($debug == 1) {
94
-            die('Debug: line ' . __LINE__);
94
+            die('Debug: line '.__LINE__);
95 95
         } else {
96 96
             $tpl->redirect(thumbpath('intern', $r['object_type']));
97 97
         }
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
     }
105 105
 
106 106
     if (!file_exists(
107
-        $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr(
107
+        $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr(
108 108
             $urlparts[count($urlparts) - 1],
109 109
             0,
110 110
             1
111
-        ) . '/' . mb_substr($urlparts[count($urlparts) - 1], 1, 1) . '/' . $urlparts[count($urlparts) - 1]
111
+        ).'/'.mb_substr($urlparts[count($urlparts) - 1], 1, 1).'/'.$urlparts[count($urlparts) - 1]
112 112
     )
113 113
     ) {
114 114
         $bGenerate = true;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     if ($bGenerate) {
118 118
         if ($r['unknown_format'] == 1) {
119 119
             if ($debug == 1) {
120
-                die('Debug: line ' . __LINE__);
120
+                die('Debug: line '.__LINE__);
121 121
             } else {
122 122
                 $tpl->redirect(thumbpath('format', $r['object_type']));
123 123
             }
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         $filenameparts = mb_split('\\.', $filename);
129 129
         $extension = mb_strtolower($filenameparts[count($filenameparts) - 1]);
130 130
 
131
-        if (mb_strpos(';' . $opt['logic']['pictures']['extensions'] . ';', ';' . $extension . ';') === false) {
131
+        if (mb_strpos(';'.$opt['logic']['pictures']['extensions'].';', ';'.$extension.';') === false) {
132 132
             sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']);
133 133
 
134 134
             if ($debug == 1) {
135
-                die('Debug: line ' . __LINE__);
135
+                die('Debug: line '.__LINE__);
136 136
             } else {
137 137
                 $tpl->redirect(thumbpath('format', $r['object_type']));
138 138
             }
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
         }
144 144
         switch ($extension) {
145 145
             case 'jpg':
146
-                $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'] . '/' . $filename);
146
+                $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'].'/'.$filename);
147 147
                 break;
148 148
 
149 149
             case 'gif':
150
-                $im = imagecreatefromgif($opt['logic']['pictures']['dir'] . '/' . $filename);
150
+                $im = imagecreatefromgif($opt['logic']['pictures']['dir'].'/'.$filename);
151 151
                 break;
152 152
 
153 153
             case 'png':
154
-                $im = imagecreatefrompng($opt['logic']['pictures']['dir'] . '/' . $filename);
154
+                $im = imagecreatefrompng($opt['logic']['pictures']['dir'].'/'.$filename);
155 155
                 break;
156 156
 
157 157
             case 'bmp':
158
-                require $opt['rootpath'] . 'lib2/imagebmp.inc.php';
159
-                $im = imagecreatefrombmp($opt['logic']['pictures']['dir'] . '/' . $filename);
158
+                require $opt['rootpath'].'lib2/imagebmp.inc.php';
159
+                $im = imagecreatefrombmp($opt['logic']['pictures']['dir'].'/'.$filename);
160 160
                 break;
161 161
         }
162 162
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']);
165 165
 
166 166
             if ($debug == 1) {
167
-                die('Debug: line ' . __LINE__);
167
+                die('Debug: line '.__LINE__);
168 168
             } else {
169 169
                 $tpl->redirect(thumbpath('format', $r['object_type']));
170 170
             }
@@ -201,15 +201,15 @@  discard block
 block discarded – undo
201 201
         imagecopyresampled($thumbimage, $im, 0, 0, 0, 0, $thumbwidth, $thumbheight, $imwidth, $imheight);
202 202
 
203 203
         // Create directory
204
-        if (!file_exists($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1))) {
205
-            mkdir($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1));
204
+        if (!file_exists($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1))) {
205
+            mkdir($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1));
206 206
         }
207 207
         if (!file_exists(
208
-            $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr($filename, 1, 1)
208
+            $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr($filename, 1, 1)
209 209
         )
210 210
         ) {
211 211
             mkdir(
212
-                $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
212
+                $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
213 213
                     $filename,
214 214
                     1,
215 215
                     1
@@ -218,48 +218,48 @@  discard block
 block discarded – undo
218 218
         }
219 219
 
220 220
         $savedir =
221
-            $opt['logic']['pictures']['thumb_dir'] . '/'
222
-            . mb_substr($filename, 0, 1) . '/'
221
+            $opt['logic']['pictures']['thumb_dir'].'/'
222
+            . mb_substr($filename, 0, 1).'/'
223 223
             . mb_substr($filename, 1, 1);
224 224
 
225 225
         switch ($extension) {
226 226
             case 'jpg':
227
-                imagejpeg($thumbimage, $savedir . '/' . $filename);
227
+                imagejpeg($thumbimage, $savedir.'/'.$filename);
228 228
                 break;
229 229
 
230 230
             case 'gif':
231
-                imagegif($thumbimage, $savedir . '/' . $filename);
231
+                imagegif($thumbimage, $savedir.'/'.$filename);
232 232
                 break;
233 233
 
234 234
             case 'png':
235
-                imagepng($thumbimage, $savedir . '/' . $filename);
235
+                imagepng($thumbimage, $savedir.'/'.$filename);
236 236
                 break;
237 237
 
238 238
             case 'bmp':
239
-                imagebmp($thumbimage, $savedir . '/' . $filename);
239
+                imagebmp($thumbimage, $savedir.'/'.$filename);
240 240
                 break;
241 241
         }
242 242
 
243 243
         sql(
244 244
             "UPDATE `pictures` SET `thumb_last_generated`=NOW(), `thumb_url`='&1' WHERE `uuid`='&2'",
245
-            $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
245
+            $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
246 246
                 $filename,
247 247
                 1,
248 248
                 1
249
-            ) . '/' . $filename,
249
+            ).'/'.$filename,
250 250
             $r['uuid']
251 251
         );
252 252
 
253 253
         if ($debug == 1) {
254
-            die($opt['logic']['pictures']['thumb_url'] . '/' . $filename);
254
+            die($opt['logic']['pictures']['thumb_url'].'/'.$filename);
255 255
         } else {
256 256
             $tpl->redirect(
257 257
                 use_current_protocol(
258
-                    $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
258
+                    $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
259 259
                         $filename,
260 260
                         1,
261 261
                         1
262
-                    ) . '/' . $filename
262
+                    ).'/'.$filename
263 263
                 )
264 264
             );
265 265
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     }
273 273
 } else {
274 274
     if ($debug == 1) {
275
-        die('Debug: line ' . __LINE__);
275
+        die('Debug: line '.__LINE__);
276 276
     } else {
277 277
         $tpl->redirect(thumbpath('404', $default_object_type));
278 278
     }
@@ -287,18 +287,18 @@  discard block
 block discarded – undo
287 287
         || ($object_type != 1 && $object_type != 2)
288 288
     ) {
289 289
         if ($debug == 1) {
290
-            die('Debug: line ' . __LINE__);
290
+            die('Debug: line '.__LINE__);
291 291
         } else {
292 292
             $name = 'intern';
293 293
             $object_type = $default_object_type;
294 294
         }
295 295
     }
296 296
 
297
-    $imgdir = 'resource2/' . $opt['template']['style'] . '/images/thumb/';
298
-    $filename = 'thumb' . $name . '_' . $object_type . '.gif';
299
-    $thumbpath = $imgdir . strtolower($opt['template']['locale']) . '/' . $filename;
297
+    $imgdir = 'resource2/'.$opt['template']['style'].'/images/thumb/';
298
+    $filename = 'thumb'.$name.'_'.$object_type.'.gif';
299
+    $thumbpath = $imgdir.strtolower($opt['template']['locale']).'/'.$filename;
300 300
     if (!file_exists($thumbpath)) {
301
-        $thumbpath = $imgdir . 'en/' . $filename;
301
+        $thumbpath = $imgdir.'en/'.$filename;
302 302
     }
303 303
 
304 304
     return $thumbpath;
Please login to merge, or discard this patch.
htdocs/util2/gns/mkadmtxt.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  ***************************************************************************/
11 11
 
12 12
 $opt['rootpath'] = '../../';
13
-require_once $opt['rootpath'] . 'lib2/cli.inc.php';
14
-require_once $opt['rootpath'] . 'lib2/search/search.inc.php';
13
+require_once $opt['rootpath'].'lib2/cli.inc.php';
14
+require_once $opt['rootpath'].'lib2/search/search.inc.php';
15 15
 
16 16
 
17 17
 $rsLocations = sql("SELECT `uni`, `lat`, `lon`, `rc`, `cc1`, `adm1` FROM `gns_locations` WHERE `dsg` LIKE 'PPL%'");
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     // den nächsgelegenen Ort in den geodb ermitteln
25 25
     $sql =
26
-        "SELECT " .
26
+        "SELECT ".
27 27
             geomath::getSqlDistanceFormula(
28 28
                 $rLocations['lon'],
29 29
                 $rLocations['lat'],
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
                 'lon',
33 33
                 'lat',
34 34
                 'geodb_coordinates'
35
-            ) . " `distance`,
35
+            )." `distance`,
36 36
             `geodb_coordinates`.`loc_id` `loc_id`
37 37
          FROM `geodb_coordinates`
38 38
          WHERE
39
-            `lon` > '" . sql_escape($minlon) . "' AND `lon` < '" . sql_escape($maxlon) . "' AND
40
-            `lat` > '" . sql_escape($minlat) . "' AND `lat` < '" . sql_escape($maxlat) . "'
39
+            `lon` > '" . sql_escape($minlon)."' AND `lon` < '".sql_escape($maxlon)."' AND
40
+            `lat` > '" . sql_escape($minlat)."' AND `lat` < '".sql_escape($maxlat)."'
41 41
          HAVING `distance` < 10
42 42
          ORDER BY `distance` ASC
43 43
          LIMIT 1";
Please login to merge, or discard this patch.
htdocs/newcache.php 2 patches
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
  *  Unicode Reminder メモ
10 10
  ***************************************************************************/
11 11
 
12
-require_once __DIR__ . '/lib/consts.inc.php';
12
+require_once __DIR__.'/lib/consts.inc.php';
13 13
 $opt['gui'] = GUI_HTML;
14
-require_once __DIR__ . '/lib/common.inc.php';
15
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require_once __DIR__.'/lib/common.inc.php';
15
+require_once __DIR__.'/lib2/edithelper.inc.php';
16 16
 
17 17
 $no_tpl_build = false;
18 18
 
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 
34 34
         //set here the template to process
35 35
         $tplname = 'newcache';
36
-        require_once $stylepath . '/' . $tplname . '.inc.php';
36
+        require_once $stylepath.'/'.$tplname.'.inc.php';
37 37
 
38 38
         //set template replacements
39
-        tpl_set_var('reset', $reset);  // obsolete
39
+        tpl_set_var('reset', $reset); // obsolete
40 40
         tpl_set_var('submit', $submit);
41 41
         tpl_set_var('general_message', '');
42 42
         tpl_set_var('hidden_since_message', '');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         tpl_set_var('diff_message', '');
54 54
         tpl_set_var('safari_message', '');
55 55
 
56
-        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0;  // Ocprop
56
+        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop
57 57
         if (!isset($_POST['size'])) {
58 58
             if ($sel_type == 4 || $sel_type == 5) {
59 59
                 $sel_size = 7;
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
                 $sel_size = - 1;
62 62
             }
63 63
         } else {
64
-            $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1;  // Ocprop
64
+            $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop
65 65
         }
66 66
         $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;
67
-        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry();  // Ocprop
67
+        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop
68 68
         $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
69 69
         $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
70 70
 
71 71
         //coords
72
-        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW;  // Ocprop
72
+        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop
73 73
         if ($lonEW == 'E') {
74 74
             tpl_set_var('lonEsel', ' selected="selected"');
75 75
             tpl_set_var('lonWsel', '');
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
             tpl_set_var('lonEsel', '');
78 78
             tpl_set_var('lonWsel', ' selected="selected"');
79 79
         }
80
-        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0';  // Ocprop
80
+        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop
81 81
         tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8'));
82 82
 
83
-        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000';  // Ocprop
83
+        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop
84 84
         tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8'));
85 85
 
86
-        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS;  // Ocprop
86
+        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop
87 87
         if ($latNS == 'N') {
88 88
             tpl_set_var('latNsel', ' selected="selected"');
89 89
             tpl_set_var('latSsel', '');
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
             tpl_set_var('latNsel', '');
92 92
             tpl_set_var('latSsel', ' selected="selected"');
93 93
         }
94
-        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0';  // Ocprop
94
+        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop
95 95
         tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8'));
96 96
 
97
-        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000';  // Ocprop
97
+        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop
98 98
         tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8'));
99 99
 
100 100
         //name
101
-        $name = isset($_POST['name']) ? trim($_POST['name']) : '';  // Ocprop
101
+        $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop
102 102
         tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8'));
103 103
 
104 104
         //shortdesc
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $oldDescMode = $descMode;
121 121
             }
122 122
         } else {
123
-            if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) {
123
+            if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) {
124 124
                 $descMode = 1;
125 125
             } else {
126 126
                 $descMode = 3;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         // fuer alte Versionen von OCProp
132 132
         if (isset($_POST['submit']) && !isset($_POST['version2'])) {
133
-            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1;  // Ocprop
133
+            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop
134 134
             $_POST['submitform'] = $_POST['submit'];
135 135
 
136 136
             $short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc);
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 
153 153
         tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8'));
154 154
 
155
-        $headers = tpl_get_var('htmlheaders') . "\n";
155
+        $headers = tpl_get_var('htmlheaders')."\n";
156 156
         if ($descMode == 3) {
157 157
             // TinyMCE
158
-            $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n";
159
-            $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang=' . strtolower($locale) . '"></script>' . "\n";
158
+            $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n";
159
+            $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang='.strtolower($locale).'"></script>'."\n";
160 160
         }
161
-        $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
161
+        $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n";
162 162
         tpl_set_var('htmlheaders', $headers);
163 163
 
164 164
         //effort
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $st_hours = floor($search_time);
183 183
         $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60);
184 184
 
185
-        tpl_set_var('search_time', $st_hours . ':' . $st_minutes);
185
+        tpl_set_var('search_time', $st_hours.':'.$st_minutes);
186 186
         tpl_set_var('way_length', $way_length);
187 187
 
188 188
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
 
198 198
         //tos
199
-        $tos = isset($_POST['TOS']) ? 1 : 0;  // Ocprop
199
+        $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop
200 200
         if ($tos == 1) {
201 201
             tpl_set_var('toschecked', ' checked="checked"');
202 202
         } else {
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         }
205 205
 
206 206
         //hidden_since
207
-        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d');  // Ocprop
208
-        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m');  // Ocprop
209
-        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y');  // Ocprop
207
+        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop
208
+        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop
209
+        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop
210 210
         tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8'));
211 211
         tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8'));
212 212
         tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8'));
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         tpl_set_var('publish_later_checked', '');
224 224
         tpl_set_var('publish_notnow_checked', '');
225 225
 
226
-        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2';  // Ocprop
226
+        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop
227 227
         if ($publish == 'now2') {
228 228
             tpl_set_var('publish_now_checked', 'checked');
229 229
         } elseif ($publish == 'later') {
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
         // fill activate hours
238 238
         $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0;
239 239
         $activation_hours = '';
240
-        for ($i = 0; $i <= 23; $i ++) {
240
+        for ($i = 0; $i <= 23; $i++) {
241 241
             if ($activate_hour == $i) {
242
-                $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>';
242
+                $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
243 243
             } else {
244
-                $activation_hours .= '<option value="' . $i . '">' . $i . '</option>';
244
+                $activation_hours .= '<option value="'.$i.'">'.$i.'</option>';
245 245
             }
246 246
             $activation_hours .= "\n";
247 247
         }
@@ -253,30 +253,30 @@  discard block
 block discarded – undo
253 253
 
254 254
         // gc- and nc-waypoints
255 255
         // fix #4356: gc waypoints are frequently copy&pasted with leading spaces
256
-        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : '';  // Ocprop
256
+        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop
257 257
         tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8'));
258 258
 
259 259
         //difficulty
260
-        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1;  // Ocprop
261
-        $difficulty_options = '<option value="1">' . $sel_message . '</option>';
262
-        for ($i = 2; $i <= 10; $i ++) {
260
+        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop
261
+        $difficulty_options = '<option value="1">'.$sel_message.'</option>';
262
+        for ($i = 2; $i <= 10; $i++) {
263 263
             if ($difficulty == $i) {
264
-                $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
264
+                $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>';
265 265
             } else {
266
-                $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>';
266
+                $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>';
267 267
             }
268 268
             $difficulty_options .= "\n";
269 269
         }
270 270
         tpl_set_var('difficulty_options', $difficulty_options);
271 271
 
272 272
         //terrain
273
-        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1;  // Ocprop
274
-        $terrain_options = '<option value="1">' . $sel_message . '</option>';
275
-        for ($i = 2; $i <= 10; $i ++) {
273
+        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop
274
+        $terrain_options = '<option value="1">'.$sel_message.'</option>';
275
+        for ($i = 2; $i <= 10; $i++) {
276 276
             if ($terrain == $i) {
277
-                $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
277
+                $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>';
278 278
             } else {
279
-                $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>';
279
+                $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>';
280 280
             }
281 281
             $terrain_options .= "\n";
282 282
         }
@@ -284,34 +284,34 @@  discard block
 block discarded – undo
284 284
 
285 285
         //sizeoptions
286 286
         $sSelected = ($sel_size == - 1) ? ' selected="selected"' : '';
287
-        $sizes = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>';
287
+        $sizes = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>';
288 288
         $rsSizes = sql(
289 289
             "SELECT `cache_size`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_size`.`name`) AS `name`
290 290
                   FROM `cache_size`
291 291
              LEFT JOIN `sys_trans` ON `cache_size`.`trans_id`=`sys_trans`.`id`
292 292
              LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND
293
-                       `sys_trans_text`.`lang`='" . sql_escape($locale) . "'
293
+                       `sys_trans_text`.`lang`='" . sql_escape($locale)."'
294 294
               ORDER BY `cache_size`.`ordinal` ASC"
295 295
         );
296 296
         while ($rSize = sql_fetch_assoc($rsSizes)) {
297 297
             $sSelected = ($rSize['id'] == $sel_size) ? ' selected="selected"' : '';
298
-            $sizes .= '<option value="' . $rSize['id'] . '"' . $sSelected . '>' . htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8') . '</option>';
298
+            $sizes .= '<option value="'.$rSize['id'].'"'.$sSelected.'>'.htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8').'</option>';
299 299
         }
300 300
         sql_free_result($rsSizes);
301 301
         tpl_set_var('sizeoptions', $sizes);
302 302
 
303 303
         //typeoptions
304 304
         $sSelected = ($sel_type == - 1) ? ' selected="selected"' : '';
305
-        $types = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>';
305
+        $types = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>';
306 306
         $rsTypes = sql("SELECT `cache_type`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_type`.`en`) AS `name`
307 307
                               FROM `cache_type`
308 308
                          LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id`
309 309
                          LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND
310
-                                   `sys_trans_text`.`lang`='" . sql_escape($locale) . "'
310
+                                   `sys_trans_text`.`lang`='" . sql_escape($locale)."'
311 311
                           ORDER BY `cache_type`.`ordinal` ASC");
312 312
         while ($rType = sql_fetch_assoc($rsTypes)) {
313 313
             $sSelected = ($rType['id'] == $sel_type) ? ' selected="selected"' : '';
314
-            $types .= '<option value="' . $rType['id'] . '"' . $sSelected . '>' . htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8') . '</option>';
314
+            $types .= '<option value="'.$rType['id'].'"'.$sSelected.'>'.htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8').'</option>';
315 315
         }
316 316
         sql_free_result($rsTypes);
317 317
         tpl_set_var('typeoptions', $types);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
             tpl_set_var('show_all_langs', '0');
343 343
             tpl_set_var(
344 344
                 'show_all_langs_submit',
345
-                '<input type="submit" name="show_all_langs_submit" value="' . $show_all . '"/>'
345
+                '<input type="submit" name="show_all_langs_submit" value="'.$show_all.'"/>'
346 346
             );
347 347
 
348 348
             $rs = sql(
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
         while ($record = sql_fetch_assoc($rs)) {
378 378
             $sSelected = ($record['short'] == $sel_lang) ? ' selected="selected"' : '';
379
-            $langsoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
379
+            $langsoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n";
380 380
         }
381 381
 
382 382
         tpl_set_var('langoptions', $langsoptions);
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
         if ($show_all_countries == 0) {
401 401
             tpl_set_var('show_all_countries', '0');
402
-            tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="' . $show_all . '" onclick="submitbutton(\'showallcountries\')" />');
402
+            tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="'.$show_all.'" onclick="submitbutton(\'showallcountries\')" />');
403 403
 
404 404
             $rs = sql(
405 405
                 "SELECT `countries`.`short`, IFNULL(`sys_trans_text`.`text`, `countries`.`name`) AS `name`
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         // build the "country" dropdown list, preselect $sel_country
435 435
         while ($record = sql_fetch_array($rs)) {
436 436
             $sSelected = ($record['short'] == $sel_country) ? ' selected="selected"' : '';
437
-            $countriesoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n";
437
+            $countriesoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n";
438 438
         }
439 439
         sql_free_result($rs);
440 440
 
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                 LEFT JOIN `sys_trans_text` AS `ttdesc`
489 489
                     ON `tdesc`.`id`=`ttdesc`.`trans_id`
490 490
                     AND `ttdesc`.`lang`='&1'
491
-                WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0) . "
491
+                WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0)."
492 492
                 AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1
493 493
                 AND `cache_attrib`.`selectable`!=0
494 494
                 ORDER BY `cache_attrib`.`group_id`, `cache_attrib`.`id`",
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                 $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line);
509 509
                 $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
510 510
                 $group_line .= $line;
511
-                $nLineAttrCount ++;
511
+                $nLineAttrCount++;
512 512
 
513 513
                 $line = $cache_attrib_js;
514 514
                 $line = mb_ereg_replace('{id}', $record['id'], $line);
@@ -673,8 +673,8 @@  discard block
 block discarded – undo
673 673
                         "SELECT MIN(wp_oc)
674 674
                          FROM `caches`
675 675
                          WHERE `status`=1
676
-                         AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude) . "',6)
677
-                         AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude) . "',6)",
676
+                         AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude)."',6)
677
+                         AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude)."',6)",
678 678
                         null
679 679
                     );
680 680
                 if ($duplicate_wpoc) {
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
                 } elseif ($publish == 'later') {
814 814
                     $sel_status = 5;
815 815
                     $activation_date =
816
-                        "'" . date(
816
+                        "'".date(
817 817
                             'Y-m-d H:i:s',
818 818
                             mktime(
819 819
                                 $activate_hour,
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
                                 $activate_day,
824 824
                                 $activate_year
825 825
                             )
826
-                        ) . "'";
826
+                        )."'";
827 827
                 } elseif ($publish == 'notnow') {
828 828
                     $sel_status = 5;
829 829
                     $activation_date = 'NULL';
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
                 );
904 904
 
905 905
                 // insert cache-attributes
906
-                for ($i = 0; $i < count($cache_attribs); $i ++) {
906
+                for ($i = 0; $i < count($cache_attribs); $i++) {
907 907
                     if (($cache_attribs[$i] + 0) > 0) {
908 908
                         sql(
909 909
                             "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')",
@@ -916,14 +916,14 @@  discard block
 block discarded – undo
916 916
                 // only if cache is published NOW or activate_date is in the past
917 917
                 if ($publish == 'now2' || ($publish == 'later' && mktime($activate_hour, 0, 0, $activate_month, $activate_day, $activate_year) <= $today)) {
918 918
                     //do event handling
919
-                    include_once(__DIR__ . '/lib/eventhandler.inc.php');
919
+                    include_once(__DIR__.'/lib/eventhandler.inc.php');
920 920
 
921 921
                     event_notify_new_cache($cache_id + 0);
922 922
                     event_new_cache($usr['userid'] + 0);
923 923
                 }
924 924
 
925 925
                 // redirection
926
-                tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id));
926
+                tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id));
927 927
             } else {
928 928
                 tpl_set_var('general_message', $error_general);
929 929
             }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,8 @@  discard block
 block discarded – undo
106 106
         tpl_set_var('short_desc', htmlspecialchars($short_desc, ENT_COMPAT, 'UTF-8'));
107 107
 
108 108
         // descMode auslesen, falls nicht gesetzt aus dem Profil laden
109
-        if (isset($_POST['descMode'])) {// Ocprop
109
+        if (isset($_POST['descMode'])) {
110
+// Ocprop
110 111
             $descMode = $_POST['descMode'] + 0;
111 112
             if (($descMode < 1) || ($descMode > 3)) {
112 113
                 $descMode = 3;
@@ -569,7 +570,8 @@  discard block
 block discarded – undo
569 570
 
570 571
         tpl_set_var('firstcache_note', mb_ereg_replace('%1', $opt['page']['sitename'], $firstcache_note));
571 572
 
572
-        if (isset($_POST['submitform'])) {  // Ocprop
573
+        if (isset($_POST['submitform'])) {
574
+// Ocprop
573 575
             // check the entered data
574 576
 
575 577
             // check coordinates
Please login to merge, or discard this patch.