Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
created
htdocs/lib2/RSSParser.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                                     'description' => $item->description
67 67
                                 );
68 68
                                 // increment counter
69
-                                $i ++;
69
+                                $i++;
70 70
                                 // htmlspecialchars_decode() works around inconsistent HTML encoding
71 71
                                 // e.g. in SMF Forum Threads
72 72
                             } elseif (!in_array(htmlspecialchars_decode($item->title), $headlines) &&
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
                                     'title' => $item->title,
79 79
                                     'link' => $item->link
80 80
                                 );
81
-                                $headlines[] = "" . htmlspecialchars_decode($item->title);
81
+                                $headlines[] = "".htmlspecialchars_decode($item->title);
82 82
                                 // increment counter
83
-                                $i ++;
83
+                                $i++;
84 84
                             }
85 85
                         }
86 86
                     }
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/OcSmarty.class.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
  *  Inherit Smarty-Class and extend it
8 8
  ***************************************************************************/
9 9
 
10
-require_once __DIR__ . '/../vendor/autoload.php';
11
-require_once $opt['rootpath'] . 'lib2/db.inc.php';
12
-require_once $opt['rootpath'] . 'lib2/logic/labels.inc.php';
10
+require_once __DIR__.'/../vendor/autoload.php';
11
+require_once $opt['rootpath'].'lib2/db.inc.php';
12
+require_once $opt['rootpath'].'lib2/logic/labels.inc.php';
13 13
 
14 14
 class OcSmarty extends Smarty
15 15
 {
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public $main_template = 'sys_main';
18 18
     public $bench = null;
19 19
     public $compile_id = null;
20
-    public $cache_id = null;    // This is a smarty caching ID, not a caches.cache_id.
20
+    public $cache_id = null; // This is a smarty caching ID, not a caches.cache_id.
21 21
     public $title = '';
22 22
     public $menuitem = null;
23 23
     public $nowpsearch = false;
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
     public function __construct()
41 41
     {
42 42
         global $opt, $sqldebugger;
43
-        require_once $opt['rootpath'] . 'lib2/bench.inc.php';
43
+        require_once $opt['rootpath'].'lib2/bench.inc.php';
44 44
         $this->bench = new CBench();
45 45
         $this->bench->start();
46 46
 
47 47
         // configuration
48 48
         $this->template_dir = $opt['stylepath'];
49
-        $this->compile_dir = $opt['rootpath'] . 'cache2/smarty/compiled/';
50
-        $this->cache_dir = $opt['rootpath'] . 'cache2/smarty/cache/';
49
+        $this->compile_dir = $opt['rootpath'].'cache2/smarty/compiled/';
50
+        $this->cache_dir = $opt['rootpath'].'cache2/smarty/cache/';
51 51
         $this->plugins_dir = [
52 52
             'plugins',
53
-            __DIR__ . '/../src/Oc/SmartyPlugins'
53
+            __DIR__.'/../src/Oc/SmartyPlugins'
54 54
         ];
55 55
 
56 56
         // disable caching ... if caching is enabled, 1 hour is default
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->cache_lifetime = 3600; // default
59 59
 
60 60
         // register additional functions
61
-        require_once __DIR__ . '/../src/Oc/SmartyPlugins/block.nocache.php';
61
+        require_once __DIR__.'/../src/Oc/SmartyPlugins/block.nocache.php';
62 62
         $this->register_block('nocache', 'smarty_block_nocache', false);
63 63
         $this->load_filter('pre', 't');
64 64
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         // process debug level
75 75
         if (($opt['debug'] & DEBUG_SQLDEBUGGER) == DEBUG_SQLDEBUGGER) {
76
-            require_once $opt['rootpath'] . 'lib2/sqldebugger.class.php';
76
+            require_once $opt['rootpath'].'lib2/sqldebugger.class.php';
77 77
         } elseif (($opt['debug'] & DEBUG_OUTOFSERVICE) == DEBUG_OUTOFSERVICE) {
78 78
             $this->name = 'sys_outofservice';
79 79
             $this->display();
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
                 $this->target = '';
88 88
             }
89 89
         } else {
90
-            $target = basename($_SERVER['PHP_SELF']) . '?';
90
+            $target = basename($_SERVER['PHP_SELF']).'?';
91 91
 
92 92
             // REQUEST-Variablen durchlaufen und an target anhaengen
93 93
             reset($_REQUEST);
94 94
             while (list($varname, $varvalue) = each($_REQUEST)) {
95 95
                 if (in_array($varname, $opt['logic']['targetvars'])) {
96
-                    $target .= urlencode($varname) . '=' . urlencode($varvalue) . '&';
96
+                    $target .= urlencode($varname).'='.urlencode($varvalue).'&';
97 97
                 }
98 98
             }
99 99
             reset($_REQUEST);
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $optn['page']['absolute_urlpath'] = parse_url($opt['page']['absolute_url'], PHP_URL_PATH);
178 178
         $optn['page']['absolute_http_url'] = $opt['page']['absolute_http_url'];
179 179
         $optn['page']['default_absolute_url'] = $opt['page']['default_absolute_url'];
180
-        $optn['page']['login_url'] = ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '') . 'login.php';
180
+        $optn['page']['login_url'] = ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '').'login.php';
181 181
         $optn['page']['target'] = $this->target;
182 182
         $optn['page']['showdonations'] = $opt['page']['showdonations'];
183 183
         $optn['page']['title'] = $opt['page']['title'];
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         }
304 304
         $this->assign('sys_dbslave', ($db['slave_id'] != - 1));
305 305
 
306
-        if ($this->template_exists($this->name . '.tpl')) {
306
+        if ($this->template_exists($this->name.'.tpl')) {
307 307
             $this->assign('template', $this->name);
308 308
         } elseif ($this->name != 'sys_error') {
309 309
             $this->error(ERROR_TEMPLATE_NOT_FOUND);
@@ -314,15 +314,15 @@  discard block
 block discarded – undo
314 314
 
315 315
         $this->assign(
316 316
             'screen_css_time',
317
-            filemtime($opt['rootpath'] . "resource2/" . $opt['template']['style'] . "/css/style_screen.css")
317
+            filemtime($opt['rootpath']."resource2/".$opt['template']['style']."/css/style_screen.css")
318 318
         );
319 319
         $this->assign(
320 320
             'screen_msie_css_time',
321
-            filemtime($opt['rootpath'] . "resource2/" . $opt['template']['style'] . "/css/style_screen_msie.css")
321
+            filemtime($opt['rootpath']."resource2/".$opt['template']['style']."/css/style_screen_msie.css")
322 322
         );
323 323
         $this->assign(
324 324
             'print_css_time',
325
-            filemtime($opt['rootpath'] . "resource2/" . $opt['template']['style'] . "/css/style_print.css")
325
+            filemtime($opt['rootpath']."resource2/".$opt['template']['style']."/css/style_print.css")
326 326
         );
327 327
 
328 328
         // check if the template is compiled
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
         }
343 343
 
344 344
         if (($opt['debug'] & DEBUG_SQLDEBUGGER) == DEBUG_SQLDEBUGGER) {
345
-            require_once $opt['rootpath'] . 'lib2/sqldebugger.class.php';
345
+            require_once $opt['rootpath'].'lib2/sqldebugger.class.php';
346 346
 
347
-            parent::fetch($this->main_template . '.tpl', $this->get_cache_id(), $this->get_compile_id());
347
+            parent::fetch($this->main_template.'.tpl', $this->get_cache_id(), $this->get_compile_id());
348 348
 
349 349
             $this->clear_all_assign();
350 350
             $this->main_template = 'sys_sqldebugger';
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
             $opt['debug'] = $opt['debug'] & ~DEBUG_SQLDEBUGGER;
362 362
 
363 363
             $this->header();
364
-            parent::display($this->main_template . '.tpl');
364
+            parent::display($this->main_template.'.tpl');
365 365
         } else {
366 366
             $this->header();
367
-            parent::display($this->main_template . '.tpl', $this->get_cache_id(), $this->get_compile_id());
367
+            parent::display($this->main_template.'.tpl', $this->get_cache_id(), $this->get_compile_id());
368 368
         }
369 369
 
370 370
         exit;
@@ -385,8 +385,8 @@  discard block
 block discarded – undo
385 385
 
386 386
         $args = func_get_args();
387 387
         unset($args[0]);
388
-        for ($i = 1; isset($args[$i]); $i ++) {
389
-            $this->assign('p' . $i, $args[$i]);
388
+        for ($i = 1; isset($args[$i]); $i++) {
389
+            $this->assign('p'.$i, $args[$i]);
390 390
         }
391 391
 
392 392
         $this->name = 'error';
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
             }
406 406
         }
407 407
 
408
-        return parent::is_cached($this->main_template . '.tpl', $this->get_cache_id(), $this->get_compile_id());
408
+        return parent::is_cached($this->main_template.'.tpl', $this->get_cache_id(), $this->get_compile_id());
409 409
     }
410 410
 
411 411
     public function get_cache_id()
@@ -416,14 +416,14 @@  discard block
 block discarded – undo
416 416
         // Probably this is no safety or stability issue, but to be sure we restrict
417 417
         // the ID to a reasonable set of characters:
418 418
 
419
-        return $this->name . '|' . mb_ereg_replace('/[^A-Za-z0-9_\|\-\.]/', '', $this->cache_id);
419
+        return $this->name.'|'.mb_ereg_replace('/[^A-Za-z0-9_\|\-\.]/', '', $this->cache_id);
420 420
     }
421 421
 
422 422
     public function get_compile_id()
423 423
     {
424 424
         global $opt;
425 425
 
426
-        return $opt['template']['style'] . '|' . $opt['template']['locale'] . '|' . $this->compile_id;
426
+        return $opt['template']['style'].'|'.$opt['template']['locale'].'|'.$this->compile_id;
427 427
     }
428 428
 
429 429
     public function redirect($page)
@@ -445,21 +445,21 @@  discard block
 block discarded – undo
445 445
             if (substr($page, 0, 1) == '/') {
446 446
                 $page = substr($page, 1);
447 447
             }
448
-            $page = $opt['page']['absolute_url'] . $page;
448
+            $page = $opt['page']['absolute_url'].$page;
449 449
         }
450 450
 
451 451
         if ($opt['session']['mode'] == SAVE_SESSION) {
452 452
             if (defined('SID') && SID != '' && session_id() != '') {
453 453
                 if (strpos($page, '?') === false) {
454
-                    header("Location: " . $page . '?' . urlencode(session_name()) . '=' . urlencode(session_id()));
454
+                    header("Location: ".$page.'?'.urlencode(session_name()).'='.urlencode(session_id()));
455 455
                 } else {
456
-                    header("Location: " . $page . '&' . urlencode(session_name()) . '=' . urlencode(session_id()));
456
+                    header("Location: ".$page.'&'.urlencode(session_name()).'='.urlencode(session_id()));
457 457
                 }
458 458
             } else {
459
-                header("Location: " . $page);
459
+                header("Location: ".$page);
460 460
             }
461 461
         } else {
462
-            header("Location: " . $page);
462
+            header("Location: ".$page);
463 463
         }
464 464
         exit;
465 465
     }
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
 
476 476
         // ok ... redirect the get-data
477 477
         $target = ($opt['page']['https']['force_login'] ? 'https' : $opt['page']['protocol'])
478
-            . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
479
-        $this->redirect('login.php?target=' . urlencode($target));
478
+            . '://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
479
+        $this->redirect('login.php?target='.urlencode($target));
480 480
     }
481 481
 
482 482
     public function assign_rs($name, $rs)
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             // Date in the past
521 521
             header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
522 522
             // always modified
523
-            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
523
+            header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
524 524
 
525 525
             // set the cookie
526 526
             $cookie->header();
Please login to merge, or discard this patch.
htdocs/lib2/db.inc.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
         // & escaped?
186 186
         $escapesCount = 0;
187 187
         while ((($nextarg - $escapesCount - 1) > 0) && (substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
188
-            $escapesCount ++;
188
+            $escapesCount++;
189 189
         }
190 190
         if (($escapesCount % 2) == 1) {
191
-            $nextarg ++;
191
+            $nextarg++;
192 192
         } else {
193 193
             $nextchar = substr($sql, $nextarg + 1, 1);
194 194
             if (is_numeric($nextchar)) {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 while (preg_match('/^[0-9]{1}/', $nextchar) == 1) {
200 200
                     $arg .= $nextchar;
201 201
 
202
-                    $arglength ++;
202
+                    $arglength++;
203 203
                     $nextchar = substr($sql, $nextarg + $arglength + 1, 1);
204 204
                 }
205 205
 
@@ -225,13 +225,13 @@  discard block
 block discarded – undo
225 225
                         // strip apostroph and insert NULL
226 226
                         $filtered_sql = substr($filtered_sql, 0, strlen($filtered_sql) - 1);
227 227
                         $filtered_sql .= 'NULL';
228
-                        $sqlpos ++;
228
+                        $sqlpos++;
229 229
                     } else {
230 230
                         $filtered_sql .= 'NULL';
231 231
                     }
232 232
                 }
233 233
 
234
-                $sqlpos ++;
234
+                $sqlpos++;
235 235
             } else {
236 236
                 $arglength = 0;
237 237
                 $arg = '';
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                 while (preg_match('/^[a-zA-Z0-9_]{1}/', $nextchar) == 1) {
242 242
                     $arg .= $nextchar;
243 243
 
244
-                    $arglength ++;
244
+                    $arglength++;
245 245
                     $nextchar = substr($sql, $nextarg + $arglength + 1, 1);
246 246
                 }
247 247
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                         $filtered_sql .= '`';
264 264
                     }
265 265
 
266
-                    $filtered_sql .= sql_escape_backtick($opt['db']['placeholder']['tmpdb']) . '`.`' . sql_escape_backtick($db['temptables'][$arg]);
266
+                    $filtered_sql .= sql_escape_backtick($opt['db']['placeholder']['tmpdb']).'`.`'.sql_escape_backtick($db['temptables'][$arg]);
267 267
 
268 268
                     if (substr($sql, $nextarg + $arglength + 1, 1) != '`') {
269 269
                         $filtered_sql .= '`';
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
         $escapesCount = 0;
289 289
         while ((($nextarg - $escapesCount - 1) > 0)
290 290
             && (substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) {
291
-            $escapesCount ++;
291
+            $escapesCount++;
292 292
         }
293 293
         if (($escapesCount % 2) == 0) {
294 294
             // strip escapes of &
295
-            $filtered_sql = substr($filtered_sql, 0, $nextarg) . '&' . substr($filtered_sql, $nextarg + 2);
296
-            $nextarg --;
295
+            $filtered_sql = substr($filtered_sql, 0, $nextarg).'&'.substr($filtered_sql, $nextarg + 2);
296
+            $nextarg--;
297 297
         }
298 298
 
299 299
         $nextarg = strpos($filtered_sql, '\&', $nextarg + 2);
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     */
311 311
 
312 312
     if (isset($db['debug']) && ($db['debug'] == true)) {
313
-        require_once $opt['rootpath'] . 'lib2/sqldebugger.class.php';
313
+        require_once $opt['rootpath'].'lib2/sqldebugger.class.php';
314 314
         $result = $sqldebugger->execute($filtered_sql, $dblink, ($dblink === $db['dblink_slave']), $db['slave_server']);
315 315
         if ($result === false) {
316 316
             sql_error($filtered_sql);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     } else {
319 319
         // measure time
320 320
         if ($opt['db']['warn']['time'] > 0) {
321
-            require_once $opt['rootpath'] . 'lib2/bench.inc.php';
321
+            require_once $opt['rootpath'].'lib2/bench.inc.php';
322 322
             $cSqlExecution = new Cbench;
323 323
             $cSqlExecution->start();
324 324
         }
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
             $cSqlExecution->stop();
333 333
 
334 334
             if ($cSqlExecution->diff() > $opt['db']['warn']['time']) {
335
-                $ua = isset($_SERVER['HTTP_USER_AGENT']) ? "\r\n" . $_SERVER['HTTP_USER_AGENT'] : "";
336
-                sql_warn("execution took " . $cSqlExecution->diff() . " seconds" . $ua);
335
+                $ua = isset($_SERVER['HTTP_USER_AGENT']) ? "\r\n".$_SERVER['HTTP_USER_AGENT'] : "";
336
+                sql_warn("execution took ".$cSqlExecution->diff()." seconds".$ua);
337 337
             }
338 338
         }
339 339
     }
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
     }
775 775
 
776 776
     if ($db['dblink'] !== false) {
777
-        mysql_query("SET NAMES '" . mysql_real_escape_string($opt['charset']['mysql'], $db['dblink']) . "'", $db['dblink']);
777
+        mysql_query("SET NAMES '".mysql_real_escape_string($opt['charset']['mysql'], $db['dblink'])."'", $db['dblink']);
778 778
 
779 779
         //database connection established ... set the used database
780 780
         if (@mysql_select_db($opt['db']['placeholder']['db'], $db['dblink']) == false) {
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
         AND `online`= 1
838 838
         AND (TIMESTAMP(NOW())-TIMESTAMP(`last_check`)+`time_diff`<'&1')
839 839
         ORDER BY `w` DESC LIMIT 1",
840
-        - 1,
840
+        -1,
841 841
         $nMaxTimeDiff
842 842
     );
843 843
 
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
         if (mysql_select_db($opt['db']['placeholder']['db'], $db['dblink_slave']) == false)
898 898
             sql_error();
899 899
 
900
-        mysql_query("SET NAMES '" . mysql_real_escape_string($opt['charset']['mysql'], $db['dblink_slave']) . "'", $db['dblink_slave']);
900
+        mysql_query("SET NAMES '".mysql_real_escape_string($opt['charset']['mysql'], $db['dblink_slave'])."'", $db['dblink_slave']);
901 901
 
902 902
         // initialize temp tables on slave server
903 903
         $rs = sqlf_slave("SELECT `threadid`, `name` FROM `sys_temptables` WHERE `threadid`='&1'", mysql_thread_id($db['dblink_slave']));
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
     $errno = mysql_errno();
1010 1010
     $error = mysql_error();
1011 1011
     if ($sqlstatement != "") {
1012
-        $error .= "\n\nSQL statement: " . $sqlstatement;
1012
+        $error .= "\n\nSQL statement: ".$sqlstatement;
1013 1013
     }
1014 1014
 
1015 1015
     if ($db['error'] == true) {
@@ -1018,7 +1018,7 @@  discard block
 block discarded – undo
1018 1018
         // could not load translations from database)
1019 1019
 
1020 1020
         if ($opt['db']['error']['display'] == true) {
1021
-            $errmsg = 'MySQL error recursion (' . $errno . '): ' . $error;
1021
+            $errmsg = 'MySQL error recursion ('.$errno.'): '.$error;
1022 1022
         } else {
1023 1023
             $errmsg = "";
1024 1024
         }
@@ -1033,13 +1033,13 @@  discard block
 block discarded – undo
1033 1033
     }
1034 1034
 
1035 1035
     if ($opt['db']['error']['mail'] != '') {
1036
-        $subject = '[' . $opt['page']['domain'] . '] SQL error';
1036
+        $subject = '['.$opt['page']['domain'].'] SQL error';
1037 1037
         if (admin_errormail($opt['db']['error']['mail'],
1038 1038
             $subject,
1039
-            str_replace("\n", "\r\n", $error) . "\n" . print_r(debug_backtrace(), true),
1040
-            "From: " . $opt['mail']['from'])) {
1039
+            str_replace("\n", "\r\n", $error)."\n".print_r(debug_backtrace(), true),
1040
+            "From: ".$opt['mail']['from'])) {
1041 1041
         #
1042
-            require_once $opt['rootpath'] . 'lib2/mail.class.php';
1042
+            require_once $opt['rootpath'].'lib2/mail.class.php';
1043 1043
             $mail = new mail();
1044 1044
             $mail->subject = $subject;
1045 1045
             $mail->to = $opt['db']['error']['mail'];
@@ -1058,13 +1058,13 @@  discard block
 block discarded – undo
1058 1058
     if ($opt['gui'] == GUI_HTML) {
1059 1059
         if (isset($tpl)) {
1060 1060
             if ($opt['db']['error']['display'] == true) {
1061
-                $tpl->error('MySQL error (' . $errno . '): ' . $error);
1061
+                $tpl->error('MySQL error ('.$errno.'): '.$error);
1062 1062
             } else {
1063 1063
                 $tpl->error('A database command could not be performed.');
1064 1064
             }
1065 1065
         } else {
1066 1066
             if ($opt['db']['error']['display'] == true) {
1067
-                die('<html><body>' . htmlspecialchars('MySQL error (' . $errno . '): ' . str_replace("\n,", "<br />", $error)) . '</body></html>');
1067
+                die('<html><body>'.htmlspecialchars('MySQL error ('.$errno.'): '.str_replace("\n,", "<br />", $error)).'</body></html>');
1068 1068
             } else {
1069 1069
                 die('<html><body>A database command could not be performed</body></html>');
1070 1070
             }
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
     } else {
1073 1073
         // CLI script, simple text output
1074 1074
         if ($opt['db']['error']['display'] == true) {
1075
-            die('MySQL error (' . $errno . '): ' . $error . "\n");
1075
+            die('MySQL error ('.$errno.'): '.$error."\n");
1076 1076
         } else {
1077 1077
             die("A database command could not be performed.\n");
1078 1078
         }
@@ -1084,13 +1084,13 @@  discard block
 block discarded – undo
1084 1084
     global $opt;
1085 1085
 
1086 1086
     if ($opt['db']['error']['mail'] != '') {
1087
-        $subject = '[' . $opt['page']['domain'] . '] SQL error';
1087
+        $subject = '['.$opt['page']['domain'].'] SQL error';
1088 1088
         if (admin_errormail($opt['db']['error']['mail'],
1089 1089
             $subject,
1090
-            $warnmessage . "\n" . print_r(debug_backtrace(), true),
1091
-            "From: " . $opt['mail']['from'])) {
1090
+            $warnmessage."\n".print_r(debug_backtrace(), true),
1091
+            "From: ".$opt['mail']['from'])) {
1092 1092
         #
1093
-            require_once $opt['rootpath'] . 'lib2/mail.class.php';
1093
+            require_once $opt['rootpath'].'lib2/mail.class.php';
1094 1094
             $mail = new mail();
1095 1095
             $mail->name = 'sql_warn';
1096 1096
             $mail->subject = $subject;
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
     fwrite($f, "SET NAMES 'utf8';\n");
1111 1111
 
1112 1112
     if ($truncate == true) {
1113
-        fwrite($f, "TRUNCATE TABLE `" . sql_escape($table) . "`;\n");
1113
+        fwrite($f, "TRUNCATE TABLE `".sql_escape($table)."`;\n");
1114 1114
     }
1115 1115
 
1116 1116
     while ($r = sql_fetch_assoc($rs)) {
@@ -1118,19 +1118,19 @@  discard block
 block discarded – undo
1118 1118
         $values = array();
1119 1119
 
1120 1120
         foreach ($r as $k => $v) {
1121
-            $fields[] = '`' . sql_escape($k) . '`';
1121
+            $fields[] = '`'.sql_escape($k).'`';
1122 1122
             if ($v === null) {
1123 1123
                 $values[] = "NULL";
1124 1124
             } else {
1125
-                $values[] = "'" . sql_escape($v) . "'";
1125
+                $values[] = "'".sql_escape($v)."'";
1126 1126
             }
1127 1127
         }
1128 1128
         unset($r);
1129 1129
 
1130 1130
         fwrite(
1131 1131
             $f,
1132
-            "INSERT INTO `" . sql_escape($table) . "` (" . implode(', ', $fields) . ")"
1133
-            . " VALUES (" . implode(', ', $values) . ");\n"
1132
+            "INSERT INTO `".sql_escape($table)."` (".implode(', ', $fields).")"
1133
+            . " VALUES (".implode(', ', $values).");\n"
1134 1134
         );
1135 1135
     }
1136 1136
 }
@@ -1141,14 +1141,14 @@  discard block
 block discarded – undo
1141 1141
     $rsIndex = sql("SHOW INDEX FROM `&1`", $table);
1142 1142
     while ($r = sql_fetch_assoc($rsIndex)) {
1143 1143
         if ($r['Key_name'] == 'PRIMARY') {
1144
-            $primary[] = '`' . sql_escape($r['Column_name']) . '` ASC';
1144
+            $primary[] = '`'.sql_escape($r['Column_name']).'` ASC';
1145 1145
         }
1146 1146
     }
1147 1147
     sql_free_result($rsIndex);
1148 1148
 
1149
-    $sql = "SELECT * FROM `" . sql_escape($table) . "`";
1149
+    $sql = "SELECT * FROM `".sql_escape($table)."`";
1150 1150
     if (count($primary) > 0) {
1151
-        $sql .= ' ORDER BY ' . implode(', ', $primary);
1151
+        $sql .= ' ORDER BY '.implode(', ', $primary);
1152 1152
     }
1153 1153
 
1154 1154
     $rs = sql($sql);
@@ -1194,8 +1194,8 @@  discard block
 block discarded – undo
1194 1194
     $sTableSql = preg_replace("/,\n +?(KEY )?`okapi_syncbase`.+?(,)?\n/", "\\2\n", $sTableSql);
1195 1195
 
1196 1196
     fwrite($f, "SET NAMES 'utf8';\n");
1197
-    fwrite($f, "DROP TABLE IF EXISTS `" . sql_escape($table) . "`;\n");
1198
-    fwrite($f, $sTableSql . " ;\n");
1197
+    fwrite($f, "DROP TABLE IF EXISTS `".sql_escape($table)."`;\n");
1198
+    fwrite($f, $sTableSql." ;\n");
1199 1199
 }
1200 1200
 
1201 1201
 function sql_export_structure_to_file($filename, $table)
Please login to merge, or discard this patch.
htdocs/lib2/search/search.gpx.inc.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
     $gpxHead =
31 31
         '<?xml version="1.0" encoding="utf-8"?>
32
-<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0" creator="' . $server_name . ' - ' . $server_address . '" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0/1 http://www.groundspeak.com/cache/1/0/1/cache.xsd" xmlns="http://www.topografix.com/GPX/1/0">
33
-  <name>Cache listing generated from ' . $server_name . '</name>
34
-  <desc>This is a waypoint file generated from ' . $server_name . '{wpchildren}</desc>
32
+<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0" creator="' . $server_name.' - '.$server_address.'" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0/1 http://www.groundspeak.com/cache/1/0/1/cache.xsd" xmlns="http://www.topografix.com/GPX/1/0">
33
+  <name>Cache listing generated from ' . $server_name.'</name>
34
+  <desc>This is a waypoint file generated from ' . $server_name.'{wpchildren}</desc>
35 35
   <author>Opencaching.de</author>
36
-  <email>' . text_xmlentities($opt['mail']['contact']) . '</email>
37
-  <url>' . $server_domain . '</url>
38
-  <urlname>' . $opt['page']['slogan'] . '</urlname>
36
+  <email>' . text_xmlentities($opt['mail']['contact']).'</email>
37
+  <url>' . $server_domain.'</url>
38
+  <urlname>' . $opt['page']['slogan'].'</urlname>
39 39
   <time>{time}</time>
40 40
   <keywords>cache, geocache, opencaching, waypoint</keywords>
41 41
 ';
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     <time>{time}</time>
46 46
     <name>{waypoint}</name>
47 47
     <desc>{cachename}</desc>
48
-    <src>' . $server_domain . '</src>
49
-    <url>' . $server_address . 'viewcache.php?cacheid={cacheid}</url>
48
+    <src>' . $server_domain.'</src>
49
+    <url>' . $server_address.'viewcache.php?cacheid={cacheid}</url>
50 50
     <urlname>{cachename}</urlname>
51 51
     <sym>{sym}</sym>
52 52
     <type>Geocache|{type}</type>
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     <name>{name}</name>
112 112
     <cmt>{comment}</cmt>
113 113
     <desc>{desc}</desc>
114
-    <url>' . $server_address . 'viewcache.php?cacheid={cacheid}</url>
114
+    <url>' . $server_address.'viewcache.php?cacheid={cacheid}</url>
115 115
     <urlname>{parent} {cachename}</urlname>
116 116
     <sym>{type}</sym>
117 117
     <type>Waypoint|{type}</type>
@@ -251,18 +251,18 @@  discard block
 block discarded – undo
251 251
         } else {
252 252
             // Ocprop:  <groundspeak:encoded_hints>(.*?)<\/groundspeak:encoded_hints>
253 253
             $hint = html_entity_decode(strip_tags($r['hint']), ENT_COMPAT, "UTF-8");
254
-            $thisline = mb_ereg_replace('{hints}', '      <groundspeak:encoded_hints>' . text_xmlentities($hint) . '</groundspeak:encoded_hints>', $thisline);
254
+            $thisline = mb_ereg_replace('{hints}', '      <groundspeak:encoded_hints>'.text_xmlentities($hint).'</groundspeak:encoded_hints>', $thisline);
255 255
         }
256 256
 
257 257
         $thisline = mb_ereg_replace('{shortdesc}', text_xmlentities($r['short_desc']), $thisline);
258 258
 
259 259
         $desc = $r['desc'];
260
-        $desc = str_replace(' src="images/uploads/', ' src="' . $server_address . 'images/uploads/', $desc);
260
+        $desc = str_replace(' src="images/uploads/', ' src="'.$server_address.'images/uploads/', $desc);
261 261
         if ($r['listing_outdated']) {
262
-            $desc = "<p style='color:#c00000'><strong>" .
263
-                $translate->t('This geocache description may be outdated.', '', basename(__FILE__), __LINE__) . '</strong> ' .
264
-                $translate->t('See the log entries for more information.', '', basename(__FILE__), __LINE__) .
265
-                "</p>\n" . $desc;
262
+            $desc = "<p style='color:#c00000'><strong>".
263
+                $translate->t('This geocache description may be outdated.', '', basename(__FILE__), __LINE__).'</strong> '.
264
+                $translate->t('See the log entries for more information.', '', basename(__FILE__), __LINE__).
265
+                "</p>\n".$desc;
266 266
         }
267 267
         $license = getLicenseDisclaimer(
268 268
             $r['userid'],
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
             $sDiffDecimals = '.5';
305 305
         }
306 306
         $r['difficulty'] -= $r['difficulty'] % 2;
307
-        $thisline = mb_ereg_replace('{difficulty}', ($r['difficulty'] / 2) . $sDiffDecimals, $thisline);
307
+        $thisline = mb_ereg_replace('{difficulty}', ($r['difficulty'] / 2).$sDiffDecimals, $thisline);
308 308
 
309 309
         $sTerrDecimals = '';
310 310
         if ($r['terrain'] % 2) {
311 311
             $sTerrDecimals = '.5';
312 312
         }
313 313
         $r['terrain'] -= $r['terrain'] % 2;
314
-        $thisline = mb_ereg_replace('{terrain}', ($r['terrain'] / 2) . $sTerrDecimals, $thisline);
314
+        $thisline = mb_ereg_replace('{terrain}', ($r['terrain'] / 2).$sTerrDecimals, $thisline);
315 315
 
316 316
         $thisline = mb_ereg_replace('{owner}', text_xmlentities($r['username']), $thisline);
317 317
         $thisline = mb_ereg_replace('{userid}', $r['userid'], $thisline);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 $thislog = mb_ereg_replace('{type}', $gpxLogType[3], $thislog);
343 343
                 $thislog = mb_ereg_replace('{text}', text_xmlentities($cacheNote['note']), $thislog);
344 344
 
345
-                $logentries .= $thislog . "\n";
345
+                $logentries .= $thislog."\n";
346 346
             }
347 347
         }
348 348
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                 WHERE
374 374
                     `cache_logs`.`user_id`=`user`.`user_id` AND
375 375
                     `cache_logs`.`cache_id`='&1' AND
376
-                    `user`.`user_id`" . $user_operator . "'&2'
376
+                    `user`.`user_id`" . $user_operator."'&2'
377 377
                 ORDER BY
378 378
                     `cache_logs`.`order_date` DESC,
379 379
                     `cache_logs`.`date_created` DESC,
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                 $thislog = mb_ereg_replace('{username}', text_xmlentities($rLog['username']), $thislog);
391 391
 
392 392
                 if ($rLog['type'] == 3 && $rLog['needs_maintenance'] == 2) {
393
-                    $logtype = 'Needs Maintenance';   // with capital M, other than cache attribute
393
+                    $logtype = 'Needs Maintenance'; // with capital M, other than cache attribute
394 394
                 } elseif (isset($gpxLogType[$rLog['type']])) {
395 395
                     $logtype = $gpxLogType[$rLog['type']];
396 396
                 } else {
@@ -416,16 +416,16 @@  discard block
 block discarded – undo
416 416
                     foreach ($flags as &$flag) {
417 417
                         $ft = $translate->t($flag, '', basename(__FILE__), __LINE__);
418 418
                         if (strstr($flag, 'is ok') == false) {
419
-                            $flag = '<span style="color:#c00000">' . $ft . '</span>';
419
+                            $flag = '<span style="color:#c00000">'.$ft.'</span>';
420 420
                         } else {
421
-                            $flag = '<span style="color:#00c000">' . $ft . '</span>';
421
+                            $flag = '<span style="color:#00c000">'.$ft.'</span>';
422 422
                         }
423 423
                     }
424
-                    $logtext = "<p><i>" . implode(', ', $flags) . "</i></p>\n" . $logtext;
424
+                    $logtext = "<p><i>".implode(', ', $flags)."</i></p>\n".$logtext;
425 425
                 }
426 426
                 $thislog = mb_ereg_replace('{text}', text_xmlentities($logtext), $thislog);
427 427
 
428
-                $logentries .= $thislog . "\n";
428
+                $logentries .= $thislog."\n";
429 429
             }
430 430
         }
431 431
         mysql_free_result($rsLogs);
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
                 $thisattribute = mb_ereg_replace('{attrib_id}', $rAttrib['gc_id'], $gpxAttributes);
452 452
                 $thisattribute = mb_ereg_replace('{attrib_inc}', $rAttrib['gc_inc'], $thisattribute);
453 453
                 $thisattribute = mb_ereg_replace('{attrib_name}', text_xmlentities($rAttrib['gc_name']), $thisattribute);
454
-                $attribentries .= $thisattribute . "\n";
454
+                $attribentries .= $thisattribute."\n";
455 455
                 $gc_ids[$rAttrib['gc_id']] = true;
456 456
             }
457 457
         }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
             $thisattribute = mb_ereg_replace('{attrib_inc}', '1', $thisattribute);
463 463
             $thisattribute = mb_ereg_replace('{attrib_name}', 'Needs maintenance', $thisattribute);
464 464
             // with lowercase m, other than log type
465
-            $attribentries .= $thisattribute . "\n";
465
+            $attribentries .= $thisattribute."\n";
466 466
         }
467 467
 
468 468
         $thisline = mb_ereg_replace('{attributes}', $attribentries, $thisline);
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
             $thiskrety = mb_ereg_replace('{gkref}', sprintf("GK%04X", $rGK['id']), $thiskrety);
490 490
             $thiskrety = mb_ereg_replace('{gkname}', text_xmlentities($rGK['name']), $thiskrety);
491 491
 
492
-            $gkentries .= $thiskrety . "\n";
492
+            $gkentries .= $thiskrety."\n";
493 493
         }
494 494
         mysql_free_result($rsGeokrety);
495 495
         $thisline = mb_ereg_replace('{geokrety}', $gkentries, $thisline);
@@ -497,42 +497,42 @@  discard block
 block discarded – undo
497 497
         // additional waypoints, including personal cache note
498 498
         $childWaypoints = $childwphandler->getChildWps($r['cacheid']);
499 499
         $n = 1;
500
-        $digits = "%0" . strlen(count($childWaypoints)) . "d";
500
+        $digits = "%0".strlen(count($childWaypoints))."d";
501 501
 
502 502
         foreach ($childWaypoints as $childWaypoint) {
503 503
             $thiswp = $gpxWaypoints;
504 504
             $thiswp = mb_ereg_replace('{wp_lat}', sprintf('%01.5f', $childWaypoint['latitude']), $thiswp);
505 505
             $thiswp = mb_ereg_replace('{wp_lon}', sprintf('%01.5f', $childWaypoint['longitude']), $thiswp);
506 506
             $thiswp = mb_ereg_replace('{time}', $time, $thiswp);
507
-            $thiswp = mb_ereg_replace('{name}', $r['waypoint'] . '-' . sprintf($digits, $n), $thiswp);
507
+            $thiswp = mb_ereg_replace('{name}', $r['waypoint'].'-'.sprintf($digits, $n), $thiswp);
508 508
             $thiswp = mb_ereg_replace('{cachename}', text_xmlentities($r['name']), $thiswp);
509 509
             $thiswp = mb_ereg_replace('{comment}', text_xmlentities($childWaypoint['description']), $thiswp);
510 510
             $thiswp = mb_ereg_replace('{desc}', text_xmlentities($childWaypoint['name']), $thiswp);
511 511
             switch ($childWaypoint['type']) {
512 512
                 case 1:
513 513
                     $wp_typename = "Parking Area";
514
-                    break;  // well-known garmin symbols
514
+                    break; // well-known garmin symbols
515 515
                 case 2:
516 516
                     $wp_typename = "Flag, Green";
517
-                    break;   // stage / ref point
517
+                    break; // stage / ref point
518 518
                 case 3:
519 519
                     $wp_typename = "Flag, Blue";
520
-                    break;    // path
520
+                    break; // path
521 521
                 case 4:
522 522
                     $wp_typename = "Circle with X";
523 523
                     break; // final
524 524
                 case 5:
525 525
                     $wp_typename = "Diamond, Green";
526
-                    break;  // point of interest
526
+                    break; // point of interest
527 527
                 default:
528 528
                     $wp_typename = "Flag, Blue";
529
-                    break;  // for the case new types are forgotten here ..
529
+                    break; // for the case new types are forgotten here ..
530 530
             }
531 531
             $thiswp = mb_ereg_replace('{type}', text_xmlentities($wp_typename), $thiswp);
532 532
             $thiswp = mb_ereg_replace('{parent}', $r['waypoint'], $thiswp);
533 533
             $thiswp = mb_ereg_replace('{cacheid}', $r['cacheid'], $thiswp);
534 534
             $waypoints .= $thiswp;
535
-            ++ $n;
535
+            ++$n;
536 536
         }
537 537
 
538 538
         if ($cacheNote && !empty($cacheNote['latitude']) && !empty($cacheNote['longitude'])) {
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             $thiswp = mb_ereg_replace('{wp_lat}', sprintf('%01.5f', $cacheNote['latitude']), $thiswp);
541 541
             $thiswp = mb_ereg_replace('{wp_lon}', sprintf('%01.5f', $cacheNote['longitude']), $thiswp);
542 542
             $thiswp = mb_ereg_replace('{time}', $time, $thiswp);
543
-            $thiswp = mb_ereg_replace('{name}', $r['waypoint'] . 'NOTE', $thiswp);
543
+            $thiswp = mb_ereg_replace('{name}', $r['waypoint'].'NOTE', $thiswp);
544 544
             $thiswp = mb_ereg_replace('{cachename}', text_xmlentities($r['name']), $thiswp);
545 545
             $thiswp = mb_ereg_replace('{comment}', text_xmlentities($cacheNote['note']), $thiswp);
546 546
             $thiswp = mb_ereg_replace('{desc}', text_xmlentities($cache_note_text), $thiswp);
@@ -620,11 +620,11 @@  discard block
 block discarded – undo
620 620
         $cacheid
621 621
     );
622 622
     while ($r = sql_fetch_array($rs)) {
623
-        $retval .= '<div style="float:left; padding:8px"><a href="' . $r['url'] . '" target="_blank">' .
624
-            '<img src="' . $server_address . 'thumbs.php?type=2&uuid=' . $r["uuid"] . '" />' .
625
-            '</a><br />' . $r['title'];
623
+        $retval .= '<div style="float:left; padding:8px"><a href="'.$r['url'].'" target="_blank">'.
624
+            '<img src="'.$server_address.'thumbs.php?type=2&uuid='.$r["uuid"].'" />'.
625
+            '</a><br />'.$r['title'];
626 626
         if ($r['spoiler']) {
627
-            $retval .= ' (' . _('click on spoiler to display') . ')';
627
+            $retval .= ' ('._('click on spoiler to display').')';
628 628
         }
629 629
         $retval .= "</div>";
630 630
     }
Please login to merge, or discard this patch.
htdocs/lib2/search/search.txt.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 
117 117
         if ($r['html'] == 0) {
118 118
             $thisline = mb_ereg_replace('{htmlwarn}', '', $thisline);
119
-            $thisline = mb_ereg_replace('{desc}', decodeEntities(strip_tags($r['desc'])) . $license, $thisline);
119
+            $thisline = mb_ereg_replace('{desc}', decodeEntities(strip_tags($r['desc'])).$license, $thisline);
120 120
         } else {
121 121
             $thisline = mb_ereg_replace('{htmlwarn}', " ($converted_from_html)", $thisline);
122
-            $thisline = mb_ereg_replace('{desc}', html2txt($r['desc']) . $license, $thisline);
122
+            $thisline = mb_ereg_replace('{desc}', html2txt($r['desc']).$license, $thisline);
123 123
         }
124 124
 
125 125
         $thisline = mb_ereg_replace('{type}', $r['type'], $thisline);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 $thislog = mb_ereg_replace('{text}', html2txt($rLog['text']), $thislog);
198 198
             }
199 199
 
200
-            $logentries .= $thislog . "\n";
200
+            $logentries .= $thislog."\n";
201 201
         }
202 202
         $thisline = mb_ereg_replace('{logs}', $logentries, $thisline);
203 203
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         if (!$bUseZip) {
206 206
             echo $thisline;
207 207
         } else {
208
-            $phpzip->add_data($r['waypoint'] . '.txt', $thisline);
208
+            $phpzip->add_data($r['waypoint'].'.txt', $thisline);
209 209
         }
210 210
     }
211 211
     mysql_free_result($rs);
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/ftsearch.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     $str = '';
189 189
 
190 190
     ftsearch_load_ignores();
191
-    for ($i = count($astr) - 1; $i >= 0; $i --) {
191
+    for ($i = count($astr) - 1; $i >= 0; $i--) {
192 192
         // ignore?
193 193
         if (array_search(mb_strtolower($astr[$i]), $ftsearch_ignores) !== false) {
194 194
             unset($astr[$i]);
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
     }
238 238
 
239 239
     // doppelte chars ersetzen
240
-    for ($c = ord('a'); $c <= ord('z'); $c ++) {
240
+    for ($c = ord('a'); $c <= ord('z'); $c++) {
241 241
         $old_str = '';
242 242
         while ($old_str != $str) {
243 243
             $old_str = $str;
244
-            $str = mb_ereg_replace(chr($c) . chr($c), chr($c), $str);
244
+            $str = mb_ereg_replace(chr($c).chr($c), chr($c), $str);
245 245
         }
246 246
         $old_str = '';
247 247
     }
Please login to merge, or discard this patch.