Completed
Pull Request — master (#324)
by Mirko
07:45
created
htdocs/lib/cookie.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
     {
19 19
         global $opt;
20 20
 
21
-        if (isset($_COOKIE[$opt['cookie']['name'] . 'data'])) {
21
+        if (isset($_COOKIE[$opt['cookie']['name'].'data'])) {
22 22
             //get the cookievars-array
23
-            $decoded = base64_decode($_COOKIE[$opt['cookie']['name'] . 'data']);
23
+            $decoded = base64_decode($_COOKIE[$opt['cookie']['name'].'data']);
24 24
 
25 25
             if ($decoded !== false) {
26 26
                 $this->values = @unserialize($decoded);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         if ($this->changed == true) {
67 67
             if (count($this->values) == 0) {
68 68
                 setcookie(
69
-                    $opt['cookie']['name'] . 'data',
69
+                    $opt['cookie']['name'].'data',
70 70
                     false,
71 71
                     time() + 31536000,
72 72
                     $opt['cookie']['path'],
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 );
76 76
             } else {
77 77
                 setcookie(
78
-                    $opt['cookie']['name'] . 'data',
78
+                    $opt['cookie']['name'].'data',
79 79
                     base64_encode(serialize($this->values)),
80 80
                     time() + 31536000,
81 81
                     $opt['cookie']['path'],
Please login to merge, or discard this patch.
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/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/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.
htdocs/lib/logic.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     return sqlValue(
16 16
         "SELECT IFNULL(`stt`.`text`, `cache_type`.`en`)
17 17
          FROM `cache_type`
18
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_type`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
19
-         WHERE `cache_type`.`id`='" . sql_escape($cachetype) . "'",
18
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_type`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
19
+         WHERE `cache_type`.`id`='" . sql_escape($cachetype)."'",
20 20
         ''
21 21
     );
22 22
 }
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
     return sqlValue(
27 27
         "SELECT IFNULL(`stt`.`text`, `cache_size`.`en`)
28 28
          FROM `cache_size`
29
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_size`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
30
-         WHERE `cache_size`.`id`='" . sql_escape($cachesize) . "'",
29
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`cache_size`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
30
+         WHERE `cache_size`.`id`='" . sql_escape($cachesize)."'",
31 31
         ''
32 32
     );
33 33
 }
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     return sqlValue(
38 38
         "SELECT IFNULL(`stt`.`text`, `log_types`.`en`)
39 39
          FROM `log_types`
40
-         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`log_types`.`trans_id` AND `stt`.`lang`='" . sql_escape($language) . "'
41
-         WHERE `log_types`.`id`='" . sql_escape($logtype) . "'",
40
+         LEFT JOIN `sys_trans_text` `stt` ON `stt`.`trans_id`=`log_types`.`trans_id` AND `stt`.`lang`='" . sql_escape($language)."'
41
+         WHERE `log_types`.`id`='" . sql_escape($logtype)."'",
42 42
         ''
43 43
     );
44 44
 }
Please login to merge, or discard this patch.