Completed
Push — master ( b16e97...cfa47d )
by Thomas
07:53
created
htdocs/lib2/edithelper.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
         $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8');
84 84
     } else {
85 85
         // convert smilies ...
86
-        for ($n = 0; $n < count($smiley['image']); $n ++) {
86
+        for ($n = 0; $n < count($smiley['image']); $n++) {
87 87
             $text = mb_ereg_replace(
88
-                "<img [^>]*?src=[^>]+?" . str_replace('.', '\.', $smiley['file'][$n]) . "[^>]+?>",
89
-                "[s![" . $smiley['text'][$n] . "]!s]",
88
+                "<img [^>]*?src=[^>]+?".str_replace('.', '\.', $smiley['file'][$n])."[^>]+?>",
89
+                "[s![".$smiley['text'][$n]."]!s]",
90 90
                 $text
91 91
             );
92 92
             // the [s[ ]s] is needed to protect the spaces around the smileys
@@ -118,5 +118,5 @@  discard block
 block discarded – undo
118 118
 
119 119
 function editorJsPath()
120 120
 {
121
-    return 'resource2/ocstyle/js/editor.js?ft=' . filemtime('resource2/ocstyle/js/editor.js');
121
+    return 'resource2/ocstyle/js/editor.js?ft='.filemtime('resource2/ocstyle/js/editor.js');
122 122
 }
Please login to merge, or discard this patch.
htdocs/lib2/translateAccess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__ . '/logic/const.inc.php';
8
+require_once __DIR__.'/logic/const.inc.php';
9 9
 
10 10
 class translateAccess
11 11
 {
Please login to merge, or discard this patch.
htdocs/lib2/sqldebugger.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *  This modules gives you a very usefull SQL debugger for MySQL ...
8 8
  ***************************************************************************/
9 9
 
10
-require_once $opt['rootpath'] . 'lib2/bench.inc.php';
10
+require_once $opt['rootpath'].'lib2/bench.inc.php';
11 11
 
12 12
 $sqldebugger = new sqldebugger();
13 13
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $command['mode'] = $db['mode'];
49 49
         $command['slave'] = $bQuerySlave;
50 50
         $command['server'] = $sServer;
51
-        $command['dblink'] = '' . $dblink;
51
+        $command['dblink'] = ''.$dblink;
52 52
 
53 53
         $bUseExplain = false;
54 54
         $sql = trim($sql);
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
                     break;
75 75
                 }
76 76
                 $command['result'][] = $r;
77
-                $c ++;
77
+                $c++;
78 78
             }
79 79
             sql_free_result($rs);
80 80
 
81
-            $rs = mysql_query('EXPLAIN EXTENDED ' . $sqlexplain, $dblink);
81
+            $rs = mysql_query('EXPLAIN EXTENDED '.$sqlexplain, $dblink);
82 82
             while ($r = sql_fetch_assoc($rs)) {
83 83
                 $command['explain'][] = $r;
84 84
             }
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
             return '';
127 127
         }
128 128
 
129
-        return 'SELECT * ' . substr($sql, $start);
129
+        return 'SELECT * '.substr($sql, $start);
130 130
     }
131 131
 
132 132
     public function insert_nocache($sql)
133 133
     {
134 134
         if (strtoupper(substr($sql, 0, 7)) == 'SELECT ') {
135
-            $sql = 'SELECT SQL_NO_CACHE ' . substr($sql, 7);
135
+            $sql = 'SELECT SQL_NO_CACHE '.substr($sql, 7);
136 136
         }
137 137
 
138 138
         return $sql;
Please login to merge, or discard this patch.
htdocs/lib2/rowEditor.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public $sTable;
11 11
     public $sAutoIncrementField = null;
12
-    public $pk;     // (idx:name; type, default, nullable, value, insertfunction)
12
+    public $pk; // (idx:name; type, default, nullable, value, insertfunction)
13 13
     public $fields; // (idx:name; type, default, nullable, value, changed, insertfunction)
14 14
 
15 15
     // status var
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             if ($i == $index) {
255 255
                 return $k;
256 256
             }
257
-            $i ++;
257
+            $i++;
258 258
         }
259 259
     }
260 260
 
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
         $fselect = array();
316 316
         $sql = 'SELECT ';
317 317
         foreach ($this->fields as $k => $field) {
318
-            $fselect[] = '`' . sql_escape($k) . '`';
318
+            $fselect[] = '`'.sql_escape($k).'`';
319 319
         }
320 320
         $sql .= join(', ', $fselect);
321 321
 
322
-        $sql .= ' FROM `' . sql_escape($this->sTable) . '`';
323
-        $sql .= ' WHERE ' . $this->pBuildPK();
322
+        $sql .= ' FROM `'.sql_escape($this->sTable).'`';
323
+        $sql .= ' WHERE '.$this->pBuildPK();
324 324
 
325 325
         return $sql;
326 326
     }
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
         $fwhere = array();
331 331
         foreach ($this->pk as $k => $field) {
332 332
             if ($field['value'] === null) {
333
-                $fwhere[] = 'ISNULL(`' . sql_escape($k) . '`)';
333
+                $fwhere[] = 'ISNULL(`'.sql_escape($k).'`)';
334 334
             } else {
335
-                $fwhere[] = '`' . sql_escape($k) . '`=\'' . sql_escape($field['value']) . '\'';
335
+                $fwhere[] = '`'.sql_escape($k).'`=\''.sql_escape($field['value']).'\'';
336 336
             }
337 337
         }
338 338
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 
463 463
     public function pBuildInsert()
464 464
     {
465
-        $sql = 'INSERT IGNORE INTO `' . sql_escape($this->sTable) . '` (';
465
+        $sql = 'INSERT IGNORE INTO `'.sql_escape($this->sTable).'` (';
466 466
 
467 467
         $sFields = array();
468 468
         $sValues = array();
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                 continue;
481 481
             }
482 482
 
483
-            $sFields[] = '`' . sql_escape($k) . '`';
483
+            $sFields[] = '`'.sql_escape($k).'`';
484 484
 
485 485
             if ((($field['insertfunction'] & RE_INSERT_OVERWRITE) == RE_INSERT_OVERWRITE) || (($field['changed'] == false) && ($field['insertfunction'] != RE_INSERT_NOTHING))) {
486 486
                 if (($field['insertfunction'] & RE_INSERT_NOW) == RE_INSERT_NOW) {
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                 if ($field['value'] === null) {
493 493
                     $sValues[] = 'NULL';
494 494
                 } else {
495
-                    $sValues[] = '\'' . sql_escape($this->pFormatValueSql($field['type'], $field['value'])) . '\'';
495
+                    $sValues[] = '\''.sql_escape($this->pFormatValueSql($field['type'], $field['value'])).'\'';
496 496
                 }
497 497
             }
498 498
         }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
                 continue;
503 503
             }
504 504
 
505
-            $sFields[] = '`' . sql_escape($k) . '`';
505
+            $sFields[] = '`'.sql_escape($k).'`';
506 506
 
507 507
             if ((($field['insertfunction'] & RE_INSERT_OVERWRITE) == RE_INSERT_OVERWRITE) || (($field['changed'] == false) && ($field['insertfunction'] != RE_INSERT_NOTHING))) {
508 508
                 if (($field['insertfunction'] & RE_INSERT_NOW) == RE_INSERT_NOW) {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
                 if ($field['value'] === null) {
515 515
                     $sValues[] = 'NULL';
516 516
                 } else {
517
-                    $sValues[] = '\'' . sql_escape($this->pFormatValueSql($field['type'], $field['value'])) . '\'';
517
+                    $sValues[] = '\''.sql_escape($this->pFormatValueSql($field['type'], $field['value'])).'\'';
518 518
                 }
519 519
             }
520 520
         }
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 
529 529
     public function pBuildUpdate()
530 530
     {
531
-        $sql = 'UPDATE IGNORE `' . sql_escape($this->sTable) . '` SET ';
531
+        $sql = 'UPDATE IGNORE `'.sql_escape($this->sTable).'` SET ';
532 532
 
533 533
         $sSet = '';
534 534
         foreach ($this->fields as $k => $field) {
@@ -538,9 +538,9 @@  discard block
 block discarded – undo
538 538
                 }
539 539
 
540 540
                 if ($field['value'] === null) {
541
-                    $sSet .= '`' . sql_escape($k) . '`=NULL';
541
+                    $sSet .= '`'.sql_escape($k).'`=NULL';
542 542
                 } else {
543
-                    $sSet .= '`' . sql_escape($k) . '`=\'' . sql_escape($this->pFormatValueSql($field['type'], $field['value'])) . '\'';
543
+                    $sSet .= '`'.sql_escape($k).'`=\''.sql_escape($this->pFormatValueSql($field['type'], $field['value'])).'\'';
544 544
                 }
545 545
             }
546 546
         }
@@ -567,12 +567,12 @@  discard block
 block discarded – undo
567 567
         }
568 568
 
569 569
         if ($this->fields[$field]['value'] === null) {
570
-            $sSet = '`' . sql_escape($field) . '`=NULL';
570
+            $sSet = '`'.sql_escape($field).'`=NULL';
571 571
         } else {
572
-            $sSet = '`' . sql_escape($field) . '`=\'' . sql_escape($this->pFormatValueSql($this->fields[$field]['type'], $this->fields[$field]['value'])) . '\'';
572
+            $sSet = '`'.sql_escape($field).'`=\''.sql_escape($this->pFormatValueSql($this->fields[$field]['type'], $this->fields[$field]['value'])).'\'';
573 573
         }
574 574
 
575
-        $sql = 'UPDATE `' . sql_escape($this->sTable) . '` SET ' . $sSet;
575
+        $sql = 'UPDATE `'.sql_escape($this->sTable).'` SET '.$sSet;
576 576
         $sql .= ' WHERE ';
577 577
         $sql .= $this->pBuildPK();
578 578
 
Please login to merge, or discard this patch.
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/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.