Completed
Push — master ( 598c1e...182b8c )
by Thomas
15:55 queued 08:34
created
htdocs/searchplugin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  *  also used for waypoint search field.
10 10
  ***************************************************************************/
11 11
 
12
-require __DIR__ . '/lib2/web.inc.php';
12
+require __DIR__.'/lib2/web.inc.php';
13 13
 
14 14
 $tpl->name = 'searchplugin';
15 15
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 if (($sourceid == 'waypoint-search') && ($userinput != '')) {
32 32
     $sourceid = 'mozilla-search';
33
-    $userinput = 'wp:' . $userinput;
33
+    $userinput = 'wp:'.$userinput;
34 34
 }
35 35
 
36 36
 if (($sourceid == 'mozilla-search') && ($userinput != '')) {
@@ -56,22 +56,22 @@  discard block
 block discarded – undo
56 56
         $targeturl = 'search.php?showresult=1&expert=0&output=HTML&f_userowner=0&f_userfound=0';
57 57
         switch ($searchto) {
58 58
             case $keyword_name:
59
-                $targeturl .= '&utf8=1&sort=byname&searchbyname=1&f_inactive=1&cachename=' . $searchfor;
59
+                $targeturl .= '&utf8=1&sort=byname&searchbyname=1&f_inactive=1&cachename='.$searchfor;
60 60
                 break;
61 61
             case $keyword_finder:
62
-                $targeturl .= '&utf8=1&sort=byname&searchbyfinder=1&f_inactive=0&finder=' . $searchfor;
62
+                $targeturl .= '&utf8=1&sort=byname&searchbyfinder=1&f_inactive=0&finder='.$searchfor;
63 63
                 break;
64 64
             case $keyword_owner:
65
-                $targeturl .= '&utf8=1&sort=byname&searchbyowner=1&f_inactive=0&owner=' . $searchfor;
65
+                $targeturl .= '&utf8=1&sort=byname&searchbyowner=1&f_inactive=0&owner='.$searchfor;
66 66
                 break;
67 67
             case $keyword_town:
68
-                $targeturl .= '&utf8=1&searchbyort=1&f_inactive=1&ort=' . $searchfor . '&sort=' . $order;
68
+                $targeturl .= '&utf8=1&searchbyort=1&f_inactive=1&ort='.$searchfor.'&sort='.$order;
69 69
                 break;
70 70
             case $keyword_zipcode:
71
-                $targeturl .= '&utf8=1&sort=bydistance&searchbyplz=1&f_inactive=1&plz=' . $searchfor . '&sort=' . $order;
71
+                $targeturl .= '&utf8=1&sort=bydistance&searchbyplz=1&f_inactive=1&plz='.$searchfor.'&sort='.$order;
72 72
                 break;
73 73
             case $keyword_cacheid:
74
-                $targeturl .= '&utf8=1&sort=byname&searchbycacheid=1&f_inactive=1&cacheid=' . $searchfor;
74
+                $targeturl .= '&utf8=1&sort=byname&searchbycacheid=1&f_inactive=1&cacheid='.$searchfor;
75 75
                 break;
76 76
             case $keyword_wp:
77 77
                 $targeturl = 'index.php';
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 }
86 86
 
87 87
                 if ((($target == 'oc') || ($target == 'gc')) && mb_ereg_match(
88
-                        '((' . $opt['logic']['ocprefixes'] . '|gc)([a-z0-9]){4,5}|n([a-f0-9]){5,5})$',
88
+                        '(('.$opt['logic']['ocprefixes'].'|gc)([a-z0-9]){4,5}|n([a-f0-9]){5,5})$',
89 89
                         mb_strtolower($searchfor)
90 90
                     )
91 91
                 ) {
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
                     // get cache_id from DB
98 98
                     // GC/NC waypoints can be duplicates -> return first match with least status number
99 99
                     $rs = sql(
100
-                        "SELECT `cache_id` FROM `caches` INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` WHERE (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1') AND " . $wpfield . "='&2' ORDER BY `caches`.`status`,`caches`.`cache_id` LIMIT 0,1",
100
+                        "SELECT `cache_id` FROM `caches` INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` WHERE (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1') AND ".$wpfield."='&2' ORDER BY `caches`.`status`,`caches`.`cache_id` LIMIT 0,1",
101 101
                         $login->userid,
102 102
                         $searchfor
103 103
                     );
104 104
                     if (sql_num_rows($rs)) {
105 105
                         $record = sql_fetch_array($rs);
106
-                        $targeturl = 'viewcache.php?cacheid=' . $record['cache_id'];
106
+                        $targeturl = 'viewcache.php?cacheid='.$record['cache_id'];
107 107
                         unset($record);
108 108
                     } else {
109 109
                         $tpl->error(ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND, $searchfor);
Please login to merge, or discard this patch.
htdocs/removelog.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
  *  Unicode Reminder メモ
10 10
  ***************************************************************************/
11 11
 
12
-require_once __DIR__ . '/lib/consts.inc.php';
12
+require_once __DIR__.'/lib/consts.inc.php';
13 13
 $opt['gui'] = GUI_HTML;
14
-require_once __DIR__ . '/lib/common.inc.php';
15
-require_once $stylepath . '/lib/icons.inc.php';
16
-require_once __DIR__ . '/lib/recommendation.inc.php';
17
-require_once __DIR__ . '/lib/logic.inc.php';
18
-require_once __DIR__ . '/lib2/edithelper.inc.php';
14
+require_once __DIR__.'/lib/common.inc.php';
15
+require_once $stylepath.'/lib/icons.inc.php';
16
+require_once __DIR__.'/lib/recommendation.inc.php';
17
+require_once __DIR__.'/lib/logic.inc.php';
18
+require_once __DIR__.'/lib2/edithelper.inc.php';
19 19
 
20 20
 //Preprocessing
21 21
 if ($error == false) {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $tplname = 'login';
30 30
 
31 31
         tpl_set_var('username', '');
32
-        tpl_set_var('target', htmlspecialchars('removelog.php?logid=' . urlencode($log_id), ENT_COMPAT, 'UTF-8'));
32
+        tpl_set_var('target', htmlspecialchars('removelog.php?logid='.urlencode($log_id), ENT_COMPAT, 'UTF-8'));
33 33
         tpl_set_var('message', $login_required);
34 34
         tpl_set_var('message_start', '');
35 35
         tpl_set_var('message_end', '');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $log_record = sql_fetch_array($log_rs);
70 70
             mysql_free_result($log_rs);
71 71
 
72
-            require $stylepath . '/removelog.inc.php';
72
+            require $stylepath.'/removelog.inc.php';
73 73
 
74 74
             if ($log_record['node'] != $oc_nodeid) {
75 75
                 tpl_errorMsg('removelog', $error_wrong_node);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                         $message = isset($_POST['logowner_message']) ? $_POST['logowner_message'] : '';
109 109
                         if ($message != '') {
110 110
                             //message to logger
111
-                            $message = $removed_message_title . "\n" . $message . "\n" . $removed_message_end;
111
+                            $message = $removed_message_title."\n".$message."\n".$removed_message_end;
112 112
                         }
113 113
 
114 114
                         $logtext = html2plaintext(
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                         }
167 167
 
168 168
                         sql("DELETE FROM `pictures` WHERE `id`='&1'", $r['id']);
169
-                        $archived = (sqlValue("SELECT `id` FROM `pictures_modified` WHERE `id`=" . $r['id'], 0) > 0);
169
+                        $archived = (sqlValue("SELECT `id` FROM `pictures_modified` WHERE `id`=".$r['id'], 0) > 0);
170 170
                         $fna = mb_split('\\/', $r['url']);
171 171
                         $filename = end($fna);
172 172
                         $path = $opt['logic']['pictures']['dir'];
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
                         }
176 176
 
177 177
                         if ($archived) {
178
-                            @rename($path . $filename, $path . "deleted/" . $filename);
178
+                            @rename($path.$filename, $path."deleted/".$filename);
179 179
                         } else {
180
-                            @unlink($path . $filename);
180
+                            @unlink($path.$filename);
181 181
                         }
182 182
 
183 183
                         $path = $opt['logic']['pictures']['thumb_dir'];
184 184
                         if (mb_substr($path, - 1, 1) != '/') {
185 185
                             $path .= '/';
186 186
                         }
187
-                        $path .= mb_strtoupper(mb_substr($filename, 0, 1)) . '/' .
188
-                            mb_strtoupper(mb_substr($filename, 1, 1)) . '/';
189
-                        @unlink($path . $filename);  // Thumb
187
+                        $path .= mb_strtoupper(mb_substr($filename, 0, 1)).'/'.
188
+                            mb_strtoupper(mb_substr($filename, 1, 1)).'/';
189
+                        @unlink($path.$filename); // Thumb
190 190
 
191 191
                         /* lib2 code would be ...
192 192
                         $rs = sql("SELECT `id` FROM `pictures` WHERE `object_type`=1 AND `object_id`='&1'", $log_id);
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
                     db_slave_exclude();
225 225
 
226 226
                     //call eventhandler
227
-                    require_once $opt['rootpath'] . 'lib/eventhandler.inc.php';
227
+                    require_once $opt['rootpath'].'lib/eventhandler.inc.php';
228 228
                     event_remove_log($log_record['cache_id'], $log_record['log_user_id']);
229 229
 
230 230
                     //cache anzeigen
231
-                    tpl_redirect('viewcache.php?cacheid=' . urlencode($log_record['cache_id']));
231
+                    tpl_redirect('viewcache.php?cacheid='.urlencode($log_record['cache_id']));
232 232
                     exit;
233 233
                 }
234 234
 
@@ -260,17 +260,17 @@  discard block
 block discarded – undo
260 260
                 tpl_set_var('logid', htmlspecialchars($log_id, ENT_COMPAT, 'UTF-8'));
261 261
 
262 262
                 if ($log_record['oc_team_comment']) {
263
-                    $teamimg = '<img src="resource2/ocstyle/images/oclogo/oc-team-comment.png" title="' . t('OC team comment') . '" /> ';
263
+                    $teamimg = '<img src="resource2/ocstyle/images/oclogo/oc-team-comment.png" title="'.t('OC team comment').'" /> ';
264 264
                 } else {
265 265
                     $teamimg = "";
266 266
                 }
267
-                tpl_set_var('logimage', $teamimg . icon_log_type($log_record['icon_small'], ""));
267
+                tpl_set_var('logimage', $teamimg.icon_log_type($log_record['icon_small'], ""));
268 268
 
269 269
                 tpl_set_var(
270 270
                     'date',
271 271
                     htmlspecialchars(strftime($dateformat, strtotime($log_record['log_date'])), ENT_COMPAT, 'UTF-8')
272 272
                 );
273
-                tpl_set_var('time', substr($log_record['log_date'], 11) == "00:00:00" ? "" : ", " . substr($log_record['log_date'], 11, 5));
273
+                tpl_set_var('time', substr($log_record['log_date'], 11) == "00:00:00" ? "" : ", ".substr($log_record['log_date'], 11, 5));
274 274
                 tpl_set_var('userid', htmlspecialchars($log_record['log_user_id'] + 0, ENT_COMPAT, 'UTF-8'));
275 275
                 tpl_set_var('username', htmlspecialchars($log_record['log_username'], ENT_COMPAT, 'UTF-8'));
276 276
                 tpl_set_var('typetext', htmlspecialchars($sLogTypeText, ENT_COMPAT, 'UTF-8'));
Please login to merge, or discard this patch.
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.