Completed
Pull Request — master (#313)
by Thomas
18:52 queued 11:36
created
htdocs/lib/consts.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
  * named consts
15 15
  ****************************************************************************/
16 16
 
17
-require_once __DIR__ . '/consts-common.inc.php';
17
+require_once __DIR__.'/consts-common.inc.php';
18 18
 
19 19
 // for cachelists
20 20
 define('cachelist_type_ignore', 1);
Please login to merge, or discard this patch.
htdocs/lib/common.inc.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 if (!isset($rootpath)) {
36 36
     $rootpath = './';
37 37
 }
38
-require_once $rootpath . 'lib/clicompatbase.inc.php';
38
+require_once $rootpath.'lib/clicompatbase.inc.php';
39 39
 
40 40
 // enforce http or https?
41 41
 if (isset($opt['gui']) && $opt['gui'] == GUI_HTML) {
42 42
     if ($opt['page']['https']['mode'] == HTTPS_DISABLED) {
43 43
         if ($opt['page']['https']['active']) {
44
-            header('Location: http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
44
+            header('Location: http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
45 45
         }
46 46
         $opt['page']['force_https_login'] = false;
47 47
     } else {
48 48
         if ($opt['page']['https']['mode'] == HTTPS_ENFORCED) {
49 49
             if (!$opt['page']['https']['active']) {
50
-                header('Location: https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
50
+                header('Location: https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
51 51
             }
52 52
             $opt['page']['force_https_login'] = true;
53 53
         }
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 load_domain_settings();
59 59
 
60 60
 // load HTML specific includes
61
-require_once $rootpath . 'lib/cookie.class.php';
61
+require_once $rootpath.'lib/cookie.class.php';
62 62
 
63 63
 //site in service?
64 64
 if ($site_in_service == false) {
65 65
     header('Content-type: text/html; charset=utf-8');
66
-    $page_content = read_file($rootpath . 'html/outofservice.tpl.php');
66
+    $page_content = read_file($rootpath.'html/outofservice.tpl.php');
67 67
     die($page_content);
68 68
 }
69 69
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 }
85 85
 
86 86
 //are there files for this language?
87
-if (!file_exists($rootpath . 'lang/' . $lang . '/')) {
87
+if (!file_exists($rootpath.'lang/'.$lang.'/')) {
88 88
     die('Critical Error: The specified language does not exist!');
89 89
 }
90 90
 
@@ -97,22 +97,22 @@  discard block
 block discarded – undo
97 97
 }
98 98
 
99 99
 //does the style exist?
100
-if (!file_exists($rootpath . 'lang/' . $lang . '/' . $style . '/')) {
100
+if (!file_exists($rootpath.'lang/'.$lang.'/'.$style.'/')) {
101 101
     $style = 'ocstyle';
102 102
 }
103 103
 
104
-if (!file_exists($rootpath . 'lang/' . $lang . '/' . $style . '/')) {
104
+if (!file_exists($rootpath.'lang/'.$lang.'/'.$style.'/')) {
105 105
     die('Critical Error: The specified style does not exist!');
106 106
 }
107 107
 
108 108
 //set up the language path
109 109
 if (!isset($langpath)) {
110
-    $langpath = $rootpath . 'lang/' . $lang;
110
+    $langpath = $rootpath.'lang/'.$lang;
111 111
 }
112 112
 
113 113
 //set up the style path
114 114
 if (!isset($stylepath)) {
115
-    $stylepath = $langpath . '/' . $style;
115
+    $stylepath = $langpath.'/'.$style;
116 116
 }
117 117
 
118 118
 //load gettext translation
@@ -121,14 +121,14 @@  discard block
 block discarded – undo
121 121
 //open a databse connection
122 122
 db_connect();
123 123
 
124
-require $opt['rootpath'] . 'lib/auth.inc.php';
125
-require_once $opt['rootpath'] . 'lib2/translate.class.php';
124
+require $opt['rootpath'].'lib/auth.inc.php';
125
+require_once $opt['rootpath'].'lib2/translate.class.php';
126 126
 
127 127
 //load language specific strings
128
-require_once $langpath . '/expressions.inc.php';
128
+require_once $langpath.'/expressions.inc.php';
129 129
 
130 130
 //set up the defaults for the main template
131
-require_once $stylepath . '/varset.inc.php';
131
+require_once $stylepath.'/varset.inc.php';
132 132
 
133 133
 if ($dblink === false) {
134 134
     //error while connecting to the database
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         tpl_set_var('loginbox', $sLoggedOut);
157 157
         tpl_set_var(
158 158
             'login_url',
159
-            ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '') . 'login.php'
159
+            ($opt['page']['https']['force_login'] ? $opt['page']['absolute_https_url'] : '').'login.php'
160 160
         );
161 161
     } else {
162 162
         //user logged in
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 $ocpropping = isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], "Ocprop/") !== false;
171 171
 
172 172
 // zeitmessung
173
-require_once $rootpath . 'lib/bench.inc.php';
173
+require_once $rootpath.'lib/bench.inc.php';
174 174
 $bScriptExecution = new Cbench;
175 175
 $bScriptExecution->start();
176 176
 
@@ -334,12 +334,12 @@  discard block
 block discarded – undo
334 334
     // country dropdown
335 335
     global $tpl_usercountries;
336 336
 
337
-    tpl_set_var('screen_css_time', filemtime($opt['rootpath'] . "resource2/" . $style . "/css/style_screen.css"));
337
+    tpl_set_var('screen_css_time', filemtime($opt['rootpath']."resource2/".$style."/css/style_screen.css"));
338 338
     tpl_set_var(
339 339
         'screen_msie_css_time',
340
-        filemtime($opt['rootpath'] . "resource2/" . $style . "/css/style_screen_msie.css")
340
+        filemtime($opt['rootpath']."resource2/".$style."/css/style_screen_msie.css")
341 341
     );
342
-    tpl_set_var('print_css_time', filemtime($opt['rootpath'] . "resource2/" . $style . "/css/style_print.css"));
342
+    tpl_set_var('print_css_time', filemtime($opt['rootpath']."resource2/".$style."/css/style_print.css"));
343 343
 
344 344
     if (isset($bScriptExecution)) {
345 345
         $bScriptExecution->Stop();
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
         $ltext = mb_ereg_replace('%1', $lurl, $ltext);
377 377
         $ltext = mb_ereg_replace('{site}', $opt['page']['sitename'], $ltext);
378 378
 
379
-        $ld = '<p class="sidebar-maintitle">' . $translate->t('Datalicense', '', '', 0) . '</p>' .
380
-            '<div style="margin:20px 0 16px 0; width:100%; text-align:center;">' . $ltext . '</div>';
379
+        $ld = '<p class="sidebar-maintitle">'.$translate->t('Datalicense', '', '', 0).'</p>'.
380
+            '<div style="margin:20px 0 16px 0; width:100%; text-align:center;">'.$ltext.'</div>';
381 381
         tpl_set_var('license_disclaimer', $ld);
382 382
     } else {
383 383
         tpl_set_var('license_disclaimer', '');
@@ -425,25 +425,25 @@  discard block
 block discarded – undo
425 425
     sql_free_result($rsUserCountries);
426 426
 
427 427
     //include language specific expressions, so that they are available in the template code
428
-    include $langpath . '/expressions.inc.php';
428
+    include $langpath.'/expressions.inc.php';
429 429
 
430 430
     //load main template
431 431
     tpl_set_var('backgroundimage', '<div id="bg1">&nbsp;</div><div id="bg2">&nbsp;</div>');
432 432
     tpl_set_var('bodystyle', '');
433 433
 
434 434
     if (isset($_REQUEST['print']) && $_REQUEST['print'] == 'y') {
435
-        $sCode = read_file($stylepath . '/main_print.tpl.php');
435
+        $sCode = read_file($stylepath.'/main_print.tpl.php');
436 436
     } else {
437 437
         if (isset($_REQUEST['popup']) && $_REQUEST['popup'] == 'y') {
438
-            $sCode = read_file($stylepath . '/popup.tpl.php');
438
+            $sCode = read_file($stylepath.'/popup.tpl.php');
439 439
         } else {
440
-            $sCode = read_file($stylepath . '/main.tpl.php');
440
+            $sCode = read_file($stylepath.'/main.tpl.php');
441 441
         }
442 442
     }
443
-    $sCode = '?>' . $sCode;
443
+    $sCode = '?>'.$sCode;
444 444
 
445 445
     //does template exist?
446
-    if (!file_exists($stylepath . '/' . $tplname . '.tpl.php')) {
446
+    if (!file_exists($stylepath.'/'.$tplname.'.tpl.php')) {
447 447
         //set up the error template
448 448
         $error = true;
449 449
         tpl_set_var('error_msg', htmlspecialchars($error_pagenotexist, ENT_COMPAT, 'UTF-8'));
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     }
453 453
 
454 454
     //read the template
455
-    $sTemplate = read_file($stylepath . '/' . $tplname . '.tpl.php');
455
+    $sTemplate = read_file($stylepath.'/'.$tplname.'.tpl.php');
456 456
     $sCode = mb_ereg_replace('{template}', $sTemplate, $sCode);
457 457
 
458 458
     //process translations
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     // Date in the past
493 493
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
494 494
     // always modified
495
-    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
495
+    header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
496 496
 }
497 497
 
498 498
 //redirect to another site to display, i.e. to view a cache after logging
@@ -504,9 +504,9 @@  discard block
 block discarded – undo
504 504
     http_write_no_cache();
505 505
 
506 506
     if (!preg_match('/^https?:/i', $page)) {
507
-        header("Location: " . $absolute_server_URI . $page);
507
+        header("Location: ".$absolute_server_URI.$page);
508 508
     } else {
509
-        header("Location: " . $page);
509
+        header("Location: ".$page);
510 510
     }
511 511
 
512 512
     exit;
@@ -522,17 +522,17 @@  discard block
 block discarded – undo
522 522
     if (is_array($vars)) {
523 523
         foreach ($vars as $varname => $varvalue) {
524 524
             if ($no_eval_vars[$varname] == false) {
525
-                $str = mb_ereg_replace('{' . $varname . '}', $varvalue, $str);
525
+                $str = mb_ereg_replace('{'.$varname.'}', $varvalue, $str);
526 526
             } else {
527
-                $replave_var_name = 'tpl_replace_var_' . $varname;
527
+                $replave_var_name = 'tpl_replace_var_'.$varname;
528 528
 
529 529
                 global $$replave_var_name;
530 530
                 $$replave_var_name = $varvalue;
531 531
 
532 532
                 //replace using php-echo
533 533
                 $str = mb_ereg_replace(
534
-                    '{' . $varname . '}',
535
-                    '<?php global $' . $replave_var_name . '; echo $tpl_replace_var_' . $varname . '; ?>',
534
+                    '{'.$varname.'}',
535
+                    '<?php global $'.$replave_var_name.'; echo $tpl_replace_var_'.$varname.'; ?>',
536 536
                     $str
537 537
                 );
538 538
             }
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     }
566 566
     $opt['template']['locale'] = $locale;
567 567
 
568
-    bindtextdomain('messages', $rootpath . '/cache2/translate');
568
+    bindtextdomain('messages', $rootpath.'/cache2/translate');
569 569
     set_php_locale();
570 570
     textdomain('messages');
571 571
 }
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
     $sResultCode = '';
604 604
     $nCurrentPos = 0;
605 605
     while ($nCurrentPos < mb_strlen($sCode)) {
606
-        $nStartOf = mb_strpos($sCode, '{' . 't}', $nCurrentPos);
606
+        $nStartOf = mb_strpos($sCode, '{'.'t}', $nCurrentPos);
607 607
         if ($nStartOf === false) {
608 608
             $sResultCode .= mb_substr($sCode, $nCurrentPos, mb_strlen($sCode) - $nCurrentPos);
609 609
             $nCurrentPos = mb_strlen($sCode);
@@ -633,8 +633,8 @@  discard block
 block discarded – undo
633 633
 
634 634
     $str = $translate->t($str, '', basename(__FILE__), __LINE__);
635 635
     $args = func_get_args();
636
-    for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex --) {
637
-        $str = str_replace('%' . $nIndex, $args[$nIndex], $str);
636
+    for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex--) {
637
+        $str = str_replace('%'.$nIndex, $args[$nIndex], $str);
638 638
     }
639 639
 
640 640
     return $str;
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 
667 667
     // user specified a country?
668 668
     if (isset($usr) && ($usr !== false)) {
669
-        $sCountry = sqlValue("SELECT `country` FROM `user` WHERE `user_id`='" . ($usr['userid'] + 0) . "'", null);
669
+        $sCountry = sqlValue("SELECT `country` FROM `user` WHERE `user_id`='".($usr['userid'] + 0)."'", null);
670 670
         if ($sCountry != null) {
671 671
             return $sCountry;
672 672
         }
@@ -732,14 +732,14 @@  discard block
 block discarded – undo
732 732
     mysql_free_result($rs);
733 733
 
734 734
     $imgtitle = $translate->t('Instructions', '', basename(__FILE__), __LINE__);
735
-    $imgtitle = "alt='" . $imgtitle . "' title='" . $imgtitle . "'";
735
+    $imgtitle = "alt='".$imgtitle."' title='".$imgtitle."'";
736 736
 
737 737
     if (substr($helppage, 0, 1) == "!") {
738
-        return "<a class='nooutline' href='" . substr($helppage, 1) . "' " . $imgtitle . " target='_blank'>";
738
+        return "<a class='nooutline' href='".substr($helppage, 1)."' ".$imgtitle." target='_blank'>";
739 739
     } else {
740 740
         if ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki'])) {
741
-            return "<a class='nooutline' href='" . $opt['locale'][$help_locale]['helpwiki'] .
742
-            str_replace(' ', '_', $helppage) . "' " . $imgtitle . " target='_blank'>";
741
+            return "<a class='nooutline' href='".$opt['locale'][$help_locale]['helpwiki'].
742
+            str_replace(' ', '_', $helppage)."' ".$imgtitle." target='_blank'>";
743 743
         }
744 744
     }
745 745
 
Please login to merge, or discard this patch.
htdocs/lib/login.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
  *
19 19
  ***************************************************************************/
20 20
 
21
-define('LOGIN_UNKNOWN_ERROR', - 1);     // unkown error occured
22
-define('LOGIN_OK', 0);            // login succeeded
23
-define('LOGIN_BADUSERPW', 1);     // bad username or password
21
+define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured
22
+define('LOGIN_OK', 0); // login succeeded
23
+define('LOGIN_BADUSERPW', 1); // bad username or password
24 24
 define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time
25 25
 define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked
26 26
 define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty
27
-define('LOGIN_LOGOUT_OK', 5);          // logout was successfull
27
+define('LOGIN_LOGOUT_OK', 5); // logout was successfull
28 28
 
29 29
 // login times in seconds
30 30
 define('LOGIN_TIME', 60 * 60);
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 
205 205
         // check the number of logins in the last hour ...
206 206
         $logins_count = sqlValue(
207
-            "SELECT COUNT(*) `count` FROM `sys_logins` WHERE `remote_addr`='" . sql_escape(
207
+            "SELECT COUNT(*) `count` FROM `sys_logins` WHERE `remote_addr`='".sql_escape(
208 208
                 $_SERVER['REMOTE_ADDR']
209
-            ) . "' AND `date_created`>'" . sql_escape(date('Y-m-d H:i:s', time() - 3600)) . "'",
209
+            )."' AND `date_created`>'".sql_escape(date('Y-m-d H:i:s', time() - 3600))."'",
210 210
             0
211 211
         );
212 212
         if ($logins_count > $opt['page']['max_logins_per_hour']) {
Please login to merge, or discard this patch.
htdocs/lib/eventhandler.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     $userid = $userid + 0;
22 22
 
23 23
     // data changed - delete statpic of user, if exists - will be recreated on next request
24
-    if (file_exists('./images/statpics/statpic' . $userid . '.jpg')) {
25
-        unlink('./images/statpics/statpic' . $userid . '.jpg');
24
+    if (file_exists('./images/statpics/statpic'.$userid.'.jpg')) {
25
+        unlink('./images/statpics/statpic'.$userid.'.jpg');
26 26
     }
27 27
 }
28 28
 
Please login to merge, or discard this patch.
htdocs/lib/settings-dist.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $style = 'ocstyle';
32 32
 
33 33
 // include common settings of lib1 and lib2
34
-require_once $rootpath . 'config2/settings-dist-common.inc.php';
34
+require_once $rootpath.'config2/settings-dist-common.inc.php';
35 35
 
36 36
 //id of the node; see list in config2/settings-dist.inc.php
37 37
 $oc_nodeid = 0;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 // sql debugging
128 128
 $sql_allow_debug = 0;
129
-$sql_debug_cryptkey = 'this is my very, very secret \'secret key\'';  // min. 24 chars
129
+$sql_debug_cryptkey = 'this is my very, very secret \'secret key\''; // min. 24 chars
130 130
 
131 131
 // replacements for sql()
132 132
 $sql_replacements['db'] = $dbname;
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 
149 149
 /* default locale
150 150
  */
151
-$opt['template']['default']['locale'] = 'DE';   // can be overwritten by $opt['domain'][<domain>]['locale']
151
+$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale']
152 152
 
153 153
 // include all locale settings
154
-require_once $rootpath . 'config2/locale.inc.php';
154
+require_once $rootpath.'config2/locale.inc.php';
155 155
 
156 156
 /* replicated slave databases
157 157
  * use same config as in config2/settings.inc.php (!)
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         'menustring' => t('Geokrety'),
199 199
         'siteid' => 'geokrety',
200 200
         'visible' => true,
201
-        'filename' => 'http://geokrety.org/index.php?lang=' . (isset($locale) ? strtolower($locale) : 'de')
201
+        'filename' => 'http://geokrety.org/index.php?lang='.(isset($locale) ? strtolower($locale) : 'de')
202 202
     ];
203 203
 
204 204
     $menu[] = [
Please login to merge, or discard this patch.
htdocs/lib/sqldebugger.inc.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * Unicode Reminder メモ
10 10
  ****************************************************************************/
11 11
 
12
-require_once $opt['rootpath'] . 'lib/bench.inc.php';
12
+require_once $opt['rootpath'].'lib/bench.inc.php';
13 13
 
14 14
 $sqldbg_cmdNo = 0;
15 15
 $sqldbg_sumTimes = 0;
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
     global $sqldbg_cmdNo;
156 156
     global $sqldbg_sumTimes;
157 157
 
158
-    $sqldbg_cmdNo ++;
158
+    $sqldbg_cmdNo++;
159 159
 
160
-    echo '<p class="sqlno"><span class="white">/*</span> SQL command ' . $sqldbg_cmdNo . ' ';
160
+    echo '<p class="sqlno"><span class="white">/*</span> SQL command '.$sqldbg_cmdNo.' ';
161 161
     if ($bSlave) {
162 162
         echo '<span class="slave_title">(slave)</span>';
163 163
     }
@@ -224,19 +224,19 @@  discard block
 block discarded – undo
224 224
         $bFirstLine = true;
225 225
         $nLine = 0;
226 226
         $rs = mysql_query($sqlexplain, $dblink);
227
-        echo '<div class="selrows">Number of selected rows: ' . mysql_num_rows($rs) . '</div>';
227
+        echo '<div class="selrows">Number of selected rows: '.mysql_num_rows($rs).'</div>';
228 228
 
229 229
         echo '<table class="firstresultrow" border="1">';
230 230
 
231 231
         while ($r = sql_fetch_assoc($rs)) {
232 232
             $usebr = true;
233
-            $nLine ++;
233
+            $nLine++;
234 234
             if ($bFirstLine == true) {
235
-                echo '<tr>' . "\n";
235
+                echo '<tr>'."\n";
236 236
                 foreach ($r as $field => $value) {
237
-                    echo '<th>' . htmlspecialchars($field, ENT_COMPAT, 'UTF-8') . '</th>' . "\n";
237
+                    echo '<th>'.htmlspecialchars($field, ENT_COMPAT, 'UTF-8').'</th>'."\n";
238 238
                 }
239
-                echo '</tr>' . "\n";
239
+                echo '</tr>'."\n";
240 240
             }
241 241
 
242 242
             if ($bFirstLine) {
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
             }
247 247
 
248 248
             foreach ($r as $value) {
249
-                echo '<td>' . htmlspecialchars(($value != null) ? $value : 'NULL', ENT_COMPAT, 'UTF-8') . '</td>';
249
+                echo '<td>'.htmlspecialchars(($value != null) ? $value : 'NULL', ENT_COMPAT, 'UTF-8').'</td>';
250 250
             }
251
-            echo '</tr>' . "\n";
251
+            echo '</tr>'."\n";
252 252
 
253 253
             if ($nLine == 25) {
254 254
                 break;
@@ -261,27 +261,27 @@  discard block
 block discarded – undo
261 261
         echo '<table class="explain" border="1">';
262 262
 
263 263
         $bFirstLine = true;
264
-        $rs = mysql_query('EXPLAIN EXTENDED ' . $sqlexplain);
264
+        $rs = mysql_query('EXPLAIN EXTENDED '.$sqlexplain);
265 265
         while ($r = sql_fetch_assoc($rs)) {
266 266
             if ($bFirstLine == true) {
267 267
                 echo '<tr>';
268 268
                 foreach ($r as $field => $value) {
269
-                    echo '<th>' . htmlspecialchars($field, ENT_COMPAT, 'UTF-8') . '</th>';
269
+                    echo '<th>'.htmlspecialchars($field, ENT_COMPAT, 'UTF-8').'</th>';
270 270
                 }
271
-                echo '</tr>' . "\n";
271
+                echo '</tr>'."\n";
272 272
 
273 273
                 $bFirstLine = false;
274 274
             }
275 275
 
276 276
             echo '<tr>';
277 277
             foreach ($r as $value) {
278
-                echo '<td>' . htmlspecialchars(
278
+                echo '<td>'.htmlspecialchars(
279 279
                         ($value != null) ? mb_ereg_replace('\*/', '* /', $value) : 'NULL',
280 280
                         ENT_COMPAT,
281 281
                         'UTF-8'
282
-                    ) . '</td>';
282
+                    ).'</td>';
283 283
             }
284
-            echo '</tr>' . "\n";
284
+            echo '</tr>'."\n";
285 285
         }
286 286
         echo '</table>';
287 287
         $usebr = true;
@@ -303,14 +303,14 @@  discard block
 block discarded – undo
303 303
         echo '<table>';
304 304
         $rs = mysql_query('SHOW WARNINGS', $dblink);
305 305
         while ($r = sql_fetch_assoc($rs)) {
306
-            echo '<tr><td>' . htmlspecialchars($r['Message'], ENT_COMPAT, 'UTF-8') . '</td></tr>';
306
+            echo '<tr><td>'.htmlspecialchars($r['Message'], ENT_COMPAT, 'UTF-8').'</td></tr>';
307 307
         }
308 308
         echo '</table>';
309 309
         echo '</div>';
310 310
     }
311 311
 
312
-    echo '<div class="runtime">Runtime: ' . sprintf('%01.5f', $bSqlExecution->Diff()) . ' sek.</div>';
313
-    echo '<div class="affectedrows">Number of affected rows: ' . mysql_affected_rows($dblink) . '</div>';
312
+    echo '<div class="runtime">Runtime: '.sprintf('%01.5f', $bSqlExecution->Diff()).' sek.</div>';
313
+    echo '<div class="affectedrows">Number of affected rows: '.mysql_affected_rows($dblink).'</div>';
314 314
 
315 315
     echo '<div class="white">*/</div></div>';
316 316
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     global $sqldbg_sumTimes;
323 323
 
324 324
     echo '<span class="white">/*</span><div class="allruntime"><hr>';
325
-    echo 'Runtime sum: ' . sprintf('%01.5f', $sqldbg_sumTimes) . ' sek.<span class="white">*/</span></div>';
325
+    echo 'Runtime sum: '.sprintf('%01.5f', $sqldbg_sumTimes).' sek.<span class="white">*/</span></div>';
326 326
 
327 327
     echo '</body></html>';
328 328
     exit;
@@ -347,13 +347,13 @@  discard block
 block discarded – undo
347 347
         return '';
348 348
     }
349 349
 
350
-    return 'SELECT * ' . mb_substr($sql, $start);
350
+    return 'SELECT * '.mb_substr($sql, $start);
351 351
 }
352 352
 
353 353
 function sqldbg_insert_nocache($sql)
354 354
 {
355 355
     if (mb_strtoupper(mb_substr($sql, 0, 7)) == 'SELECT ') {
356
-        $sql = 'SELECT SQL_NO_CACHE ' . mb_substr($sql, 7);
356
+        $sql = 'SELECT SQL_NO_CACHE '.mb_substr($sql, 7);
357 357
     }
358 358
 
359 359
     return $sql;
Please login to merge, or discard this patch.
htdocs/lib/auth.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * Dont include this file by hand - it will be included from common.inc.php
17 17
  ****************************************************************************/
18 18
 
19
-require $opt['rootpath'] . 'lib/login.class.php';
19
+require $opt['rootpath'].'lib/login.class.php';
20 20
 
21 21
 $autherr = 0;
22 22
 define('AUTHERR_NOERROR', 0);
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     if ($login->userid != 0) {
37 37
         //set up $usr array
38 38
         $usr['userid'] = $login->userid;
39
-        $usr['email'] = sqlValue("SELECT `email` FROM `user` WHERE `user_id`='" . sql_escape($login->userid) . "'", '');
39
+        $usr['email'] = sqlValue("SELECT `email` FROM `user` WHERE `user_id`='".sql_escape($login->userid)."'", '');
40 40
         $usr['username'] = $login->username;
41 41
         $usr['admin'] = $login->admin;
42 42
     } else {
Please login to merge, or discard this patch.
htdocs/lib/settings-dev.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 //relative path to the root directory
21 21
 if (!isset($rootpath)) {
22
-    $rootpath = dirname(__FILE__) . '/../';
22
+    $rootpath = dirname(__FILE__).'/../';
23 23
 }
24 24
 
25 25
 //default used language
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $style = 'ocstyle';
37 37
 
38 38
 // include common settings of lib1 and lib2
39
-require_once $rootpath . 'config2/settings-dist-common.inc.php';
39
+require_once $rootpath.'config2/settings-dist-common.inc.php';
40 40
 
41 41
 //id of the node; see config2/settings-dist.inc.php
42 42
 $oc_nodeid = 4;
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
     $maildomain = 'local.opencaching.de';
75 75
 }
76 76
 if (!isset($emailaddr)) {
77
-    $emailaddr = 'root@' . $maildomain;
77
+    $emailaddr = 'root@'.$maildomain;
78 78
 }
79 79
 if (!isset($opt['mail']['contact'])) {
80
-    $opt['mail']['contact'] = 'contact@' . $maildomain;
80
+    $opt['mail']['contact'] = 'contact@'.$maildomain;
81 81
 }
82 82
 
83 83
 // news settings
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 // safemode_zip-binary
108 108
 $safemode_zip = '/var/www/bin/phpzip.php';
109
-$zip_basedir = $dev_basepath . ($dev_codepath == '*' ? '' : $dev_codepath . 'htdocs/') . 'download/zip/';
109
+$zip_basedir = $dev_basepath.($dev_codepath == '*' ? '' : $dev_codepath.'htdocs/').'download/zip/';
110 110
 $zip_wwwdir = 'download/zip/';
111 111
 
112 112
 $googlemap_key = "<key>";
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
 /* maximum number of failed logins per hour before that IP address is blocked
118 118
  * (used to prevent brute-force-attacks)
119 119
  */
120
-$opt['page']['max_logins_per_hour'] = 1000;    // for development ...
120
+$opt['page']['max_logins_per_hour'] = 1000; // for development ...
121 121
 $opt['page']['headoverlay'] = 'oc_head_alpha3';
122 122
 
123 123
 // data license
124
-$opt['logic']['license']['disclaimer'] = true;   // also in lib2/settings-dist.inc.php
125
-$opt['logic']['license']['terms'] = $absolute_server_URI . 'articles.php?page=impressum#datalicense';
124
+$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php
125
+$opt['logic']['license']['terms'] = $absolute_server_URI.'articles.php?page=impressum#datalicense';
126 126
 
127 127
 $opt['logic']['admin']['listingadmin_notification'] = 'root';
128 128
 
129 129
 // include all locale settings
130
-require_once $rootpath . 'config2/locale.inc.php';
130
+require_once $rootpath.'config2/locale.inc.php';
131 131
 
132 132
 /* replicated slave databases
133 133
  * use same config as in config2/settings.inc.php (!)
Please login to merge, or discard this patch.
htdocs/lib/settings-sample-vagrant.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
 // database names
20 20
 $dbname = 'opencaching';
21
-$tmpdbname = 'octmp';   // empty db with CREATE and DROP privileges
21
+$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges
22 22
 
23 23
 // common developer system settings
24 24
 require 'settings-dev.inc.php';
Please login to merge, or discard this patch.