Completed
Push — master ( 182b8c...09455a )
by Thomas
07:02
created
htdocs/thumbs.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9 9
 
10 10
 $login->verify();
11 11
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             ) == 0
42 42
         ) {
43 43
             if ($debug == 1) {
44
-                die('Debug: line ' . __LINE__);
44
+                die('Debug: line '.__LINE__);
45 45
             } else {
46 46
                 $tpl->redirect(thumbpath('extern', 1));
47 47
             }
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
             ) == 0
61 61
         ) {
62 62
             if ($debug == 1) {
63
-                die('Debug: line ' . __LINE__);
63
+                die('Debug: line '.__LINE__);
64 64
             } else {
65 65
                 $tpl->redirect(thumbpath('extern', 2));
66 66
             }
67 67
         }
68 68
     } else {
69 69
         if ($debug == 1) {
70
-            die('Debug: line ' . __LINE__);
70
+            die('Debug: line '.__LINE__);
71 71
         } else {
72 72
             $tpl->redirect(thumbpath('intern', $default_object_type));
73 73
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     if ($r['local'] == 0) {
77 77
         if ($debug == 1) {
78
-            die('Debug: line ' . __LINE__);
78
+            die('Debug: line '.__LINE__);
79 79
         } else {
80 80
             $tpl->redirect(thumbpath('extern', $r['object_type']));
81 81
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     if (($r['spoiler'] == 1) && ($showspoiler != 1)) {
85 85
         if ($debug == 1) {
86
-            die('Debug: line ' . __LINE__);
86
+            die('Debug: line '.__LINE__);
87 87
         } else {
88 88
             $tpl->redirect(thumbpath('spoiler', $r['object_type']));
89 89
         }
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
     $imgurl = $r['url'];
93 93
     $urlparts = mb_split('/', $imgurl);
94 94
 
95
-    if (!file_exists($opt['logic']['pictures']['dir'] . '/' . $urlparts[count($urlparts) - 1])) {
95
+    if (!file_exists($opt['logic']['pictures']['dir'].'/'.$urlparts[count($urlparts) - 1])) {
96 96
         if ($debug == 1) {
97
-            die('Debug: line ' . __LINE__);
97
+            die('Debug: line '.__LINE__);
98 98
         } else {
99 99
             $tpl->redirect(thumbpath('intern', $r['object_type']));
100 100
         }
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
     }
108 108
 
109 109
     if (!file_exists(
110
-        $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr(
110
+        $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr(
111 111
             $urlparts[count($urlparts) - 1],
112 112
             0,
113 113
             1
114
-        ) . '/' . mb_substr($urlparts[count($urlparts) - 1], 1, 1) . '/' . $urlparts[count($urlparts) - 1]
114
+        ).'/'.mb_substr($urlparts[count($urlparts) - 1], 1, 1).'/'.$urlparts[count($urlparts) - 1]
115 115
     )
116 116
     ) {
117 117
         $bGenerate = true;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     if ($bGenerate) {
121 121
         if ($r['unknown_format'] == 1) {
122 122
             if ($debug == 1) {
123
-                die('Debug: line ' . __LINE__);
123
+                die('Debug: line '.__LINE__);
124 124
             } else {
125 125
                 $tpl->redirect(thumbpath('format', $r['object_type']));
126 126
             }
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
         $filenameparts = mb_split('\\.', $filename);
132 132
         $extension = mb_strtolower($filenameparts[count($filenameparts) - 1]);
133 133
 
134
-        if (mb_strpos(';' . $opt['logic']['pictures']['extensions'] . ';', ';' . $extension . ';') === false) {
134
+        if (mb_strpos(';'.$opt['logic']['pictures']['extensions'].';', ';'.$extension.';') === false) {
135 135
             sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']);
136 136
 
137 137
             if ($debug == 1) {
138
-                die('Debug: line ' . __LINE__);
138
+                die('Debug: line '.__LINE__);
139 139
             } else {
140 140
                 $tpl->redirect(thumbpath('format', $r['object_type']));
141 141
             }
@@ -146,20 +146,20 @@  discard block
 block discarded – undo
146 146
         }
147 147
         switch ($extension) {
148 148
             case 'jpg':
149
-                $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'] . '/' . $filename);
149
+                $im = imagecreatefromjpeg($opt['logic']['pictures']['dir'].'/'.$filename);
150 150
                 break;
151 151
 
152 152
             case 'gif':
153
-                $im = imagecreatefromgif($opt['logic']['pictures']['dir'] . '/' . $filename);
153
+                $im = imagecreatefromgif($opt['logic']['pictures']['dir'].'/'.$filename);
154 154
                 break;
155 155
 
156 156
             case 'png':
157
-                $im = imagecreatefrompng($opt['logic']['pictures']['dir'] . '/' . $filename);
157
+                $im = imagecreatefrompng($opt['logic']['pictures']['dir'].'/'.$filename);
158 158
                 break;
159 159
 
160 160
             case 'bmp':
161
-                require $opt['rootpath'] . 'lib2/imagebmp.inc.php';
162
-                $im = imagecreatefrombmp($opt['logic']['pictures']['dir'] . '/' . $filename);
161
+                require $opt['rootpath'].'lib2/imagebmp.inc.php';
162
+                $im = imagecreatefrombmp($opt['logic']['pictures']['dir'].'/'.$filename);
163 163
                 break;
164 164
         }
165 165
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             sql("UPDATE `pictures` SET `unknown_format`=1 WHERE `uuid`='&1'", $r['uuid']);
168 168
 
169 169
             if ($debug == 1) {
170
-                die('Debug: line ' . __LINE__);
170
+                die('Debug: line '.__LINE__);
171 171
             } else {
172 172
                 $tpl->redirect(thumbpath('format', $r['object_type']));
173 173
             }
@@ -204,15 +204,15 @@  discard block
 block discarded – undo
204 204
         imagecopyresampled($thumbimage, $im, 0, 0, 0, 0, $thumbwidth, $thumbheight, $imwidth, $imheight);
205 205
 
206 206
         // Create directory
207
-        if (!file_exists($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1))) {
208
-            mkdir($opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1));
207
+        if (!file_exists($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1))) {
208
+            mkdir($opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1));
209 209
         }
210 210
         if (!file_exists(
211
-            $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr($filename, 1, 1)
211
+            $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr($filename, 1, 1)
212 212
         )
213 213
         ) {
214 214
             mkdir(
215
-                $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
215
+                $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
216 216
                     $filename,
217 217
                     1,
218 218
                     1
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             );
221 221
         }
222 222
 
223
-        $savedir = $opt['logic']['pictures']['thumb_dir'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
223
+        $savedir = $opt['logic']['pictures']['thumb_dir'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
224 224
                 $filename,
225 225
                 1,
226 226
                 1
@@ -228,42 +228,42 @@  discard block
 block discarded – undo
228 228
 
229 229
         switch ($extension) {
230 230
             case 'jpg':
231
-                imagejpeg($thumbimage, $savedir . '/' . $filename);
231
+                imagejpeg($thumbimage, $savedir.'/'.$filename);
232 232
                 break;
233 233
 
234 234
             case 'gif':
235
-                imagegif($thumbimage, $savedir . '/' . $filename);
235
+                imagegif($thumbimage, $savedir.'/'.$filename);
236 236
                 break;
237 237
 
238 238
             case 'png':
239
-                imagepng($thumbimage, $savedir . '/' . $filename);
239
+                imagepng($thumbimage, $savedir.'/'.$filename);
240 240
                 break;
241 241
 
242 242
             case 'bmp':
243
-                imagebmp($thumbimage, $savedir . '/' . $filename);
243
+                imagebmp($thumbimage, $savedir.'/'.$filename);
244 244
                 break;
245 245
         }
246 246
 
247 247
         sql(
248 248
             "UPDATE `pictures` SET `thumb_last_generated`=NOW(), `thumb_url`='&1' WHERE `uuid`='&2'",
249
-            $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
249
+            $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
250 250
                 $filename,
251 251
                 1,
252 252
                 1
253
-            ) . '/' . $filename,
253
+            ).'/'.$filename,
254 254
             $r['uuid']
255 255
         );
256 256
 
257 257
         if ($debug == 1) {
258
-            die($opt['logic']['pictures']['thumb_url'] . '/' . $filename);
258
+            die($opt['logic']['pictures']['thumb_url'].'/'.$filename);
259 259
         } else {
260 260
             $tpl->redirect(
261 261
                 use_current_protocol(
262
-                    $opt['logic']['pictures']['thumb_url'] . '/' . mb_substr($filename, 0, 1) . '/' . mb_substr(
262
+                    $opt['logic']['pictures']['thumb_url'].'/'.mb_substr($filename, 0, 1).'/'.mb_substr(
263 263
                         $filename,
264 264
                         1,
265 265
                         1
266
-                    ) . '/' . $filename
266
+                    ).'/'.$filename
267 267
                 )
268 268
             );
269 269
         }
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     }
277 277
 } else {
278 278
     if ($debug == 1) {
279
-        die('Debug: line ' . __LINE__);
279
+        die('Debug: line '.__LINE__);
280 280
     } else {
281 281
         $tpl->redirect(thumbpath('404', $default_object_type));
282 282
     }
@@ -291,18 +291,18 @@  discard block
 block discarded – undo
291 291
         || ($object_type != 1 && $object_type != 2)
292 292
     ) {
293 293
         if ($debug == 1) {
294
-            die('Debug: line ' . __LINE__);
294
+            die('Debug: line '.__LINE__);
295 295
         } else {
296 296
             $name = 'intern';
297 297
             $object_type = $default_object_type;
298 298
         }
299 299
     }
300 300
 
301
-    $imgdir = 'resource2/' . $opt['template']['style'] . '/images/thumb/';
302
-    $filename = 'thumb' . $name . '_' . $object_type . '.gif';
303
-    $thumbpath = $imgdir . strtolower($opt['template']['locale']) . '/' . $filename;
301
+    $imgdir = 'resource2/'.$opt['template']['style'].'/images/thumb/';
302
+    $filename = 'thumb'.$name.'_'.$object_type.'.gif';
303
+    $thumbpath = $imgdir.strtolower($opt['template']['locale']).'/'.$filename;
304 304
     if (!file_exists($thumbpath)) {
305
-        $thumbpath = $imgdir . 'en/' . $filename;
305
+        $thumbpath = $imgdir.'en/'.$filename;
306 306
     }
307 307
 
308 308
     return $thumbpath;
Please login to merge, or discard this patch.
htdocs/util/stats/rank.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,4 +8,4 @@
 block discarded – undo
8 8
  *  downward compatibility
9 9
  ***************************************************************************/
10 10
 
11
-require_once __DIR__ . '/../../util2/stats/rank.php';
11
+require_once __DIR__.'/../../util2/stats/rank.php';
Please login to merge, or discard this patch.
htdocs/util/attributes/top.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 header('Content-type: text/html; charset=utf-8');
9 9
 
10
-$rootpath = __DIR__ . '/../../';
11
-require_once $rootpath . 'lib/common.inc.php';
10
+$rootpath = __DIR__.'/../../';
11
+require_once $rootpath.'lib/common.inc.php';
12 12
 
13 13
 $wp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
14 14
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     $attrs_set = isset($_REQUEST['cache_attribs']) ? $_REQUEST['cache_attribs'] : '';
17 17
     $attrs = mb_split(';', $attrs_set);
18 18
 
19
-    $cache_id = sqlValue("SELECT `cache_id` FROM `caches` WHERE `wp_oc`='" . sql_escape($wp) . "'", 0);
19
+    $cache_id = sqlValue("SELECT `cache_id` FROM `caches` WHERE `wp_oc`='".sql_escape($wp)."'", 0);
20 20
     if ($cache_id == 0) {
21 21
         die('cache_id unknown');
22 22
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     if ($attr_js != '') {
47 47
         $attr_js .= ',';
48 48
     }
49
-    $attr_js .= "new Array(" . $r['id'] . ", " . (isset($attrs[$r['id']]) ? 1 : 0) . ", '../../" . $r['icon_undef'] . "', '../../" . $r['icon_large'] . "')";
49
+    $attr_js .= "new Array(".$r['id'].", ".(isset($attrs[$r['id']]) ? 1 : 0).", '../../".$r['icon_undef']."', '../../".$r['icon_large']."')";
50 50
 }
51 51
 mysql_free_result($rs);
52 52
 ?>
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     <?php
100 100
     $rs = sql("SELECT `id`, `icon_large`, `icon_undef` FROM `cache_attrib`");
101 101
     while ($r = sql_fetch_assoc($rs)) {
102
-        echo '<img id="attr' . $r['id'] . '" onmousedown="toggleAttr(' . $r['id'] . ')" src="../../';
102
+        echo '<img id="attr'.$r['id'].'" onmousedown="toggleAttr('.$r['id'].')" src="../../';
103 103
 
104 104
         if (isset($attrs[$r['id']])) {
105 105
             echo $r['icon_large'];
Please login to merge, or discard this patch.
htdocs/util/attributes/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 header('Content-type: text/html; charset=utf-8');
9 9
 
10
-$rootpath = __DIR__ . '/../../';
11
-require_once $rootpath . 'lib/common.inc.php';
10
+$rootpath = __DIR__.'/../../';
11
+require_once $rootpath.'lib/common.inc.php';
12 12
 
13 13
 ?>
14 14
 <html>
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     AND ISNULL(`caches_attributes`.`cache_id`) ORDER BY `caches`.`wp_oc`'
42 42
 );
43 43
 while ($rCache = sql_fetch_assoc($rsCaches)) {
44
-    echo '<a href="javascript:select(\'' . $rCache['wp_oc'] . '\')">' . $rCache['wp_oc'] . '<br />';
44
+    echo '<a href="javascript:select(\''.$rCache['wp_oc'].'\')">'.$rCache['wp_oc'].'<br />';
45 45
 }
46 46
 mysql_free_result($rsCaches);
47 47
 ?>
Please login to merge, or discard this patch.
htdocs/util/google-earth/caches.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,4 +5,4 @@
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require_once __DIR__ . '/../../util2/google-earth/caches.php';
8
+require_once __DIR__.'/../../util2/google-earth/caches.php';
Please login to merge, or discard this patch.
htdocs/util/notification/settings-dist.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
     $maildomain = 'opencaching.de';
10 10
 }
11 11
 
12
-$mailfrom = 'noreply@' . $maildomain;
12
+$mailfrom = 'noreply@'.$maildomain;
13 13
 
14 14
 $debug = false;
15 15
 $debug_mailto = '[email protected]';
16 16
 
17
-$notifypid = $rootpath . 'cache/notify.pid';
17
+$notifypid = $rootpath.'cache/notify.pid';
Please login to merge, or discard this patch.
htdocs/util/watchlist/settings-dist.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
     $maildomain = 'opencaching.de';
6 6
 }
7 7
 
8
-$mailfrom = 'noreply@' . $maildomain;
8
+$mailfrom = 'noreply@'.$maildomain;
9 9
 
10 10
 $debug = false;
11 11
 $debug_mailto = '[email protected]';
12 12
 
13
-$watchpid = $rootpath . 'cache/watch.pid';
13
+$watchpid = $rootpath.'cache/watch.pid';
Please login to merge, or discard this patch.
htdocs/util/change_owner/cache.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 header('Content-type: text/html; charset=utf-8');
12 12
 
13
-$rootpath = __DIR__ . '/../../';
14
-require_once $rootpath . 'lib/common.inc.php';
15
-require_once $rootpath . 'lib/eventhandler.inc.php';
13
+$rootpath = __DIR__.'/../../';
14
+require_once $rootpath.'lib/common.inc.php';
15
+require_once $rootpath.'lib/eventhandler.inc.php';
16 16
 
17 17
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
18 18
 
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
     echo 'Besitzer geändert';
55 55
 
56 56
     // logentry($module, $eventid, $userid, $objectid1, $objectid2, $logtext, $details)
57
-    logentry('approving', 4, 0, $cacheid, 0, 'Owner changed ' . $cacheid, '');
57
+    logentry('approving', 4, 0, $cacheid, 0, 'Owner changed '.$cacheid, '');
58 58
 
59 59
     exit;
60 60
 } elseif ($action == 'showcache') {
61 61
     $wp = isset($_REQUEST['waypoint']) ? $_REQUEST['waypoint'] : 0;
62 62
     $newusername = isset($_REQUEST['newusername']) ? $_REQUEST['newusername'] : 0;
63 63
 
64
-    $cacheid = sqlValue("SELECT cache_id FROM caches WHERE wp_oc='" . sql_escape($wp) . "'", 0);
65
-    $userid = sqlValue("SELECT user_id FROM user WHERE username='" . sql_escape($newusername) . "'", '');
64
+    $cacheid = sqlValue("SELECT cache_id FROM caches WHERE wp_oc='".sql_escape($wp)."'", 0);
65
+    $userid = sqlValue("SELECT user_id FROM user WHERE username='".sql_escape($newusername)."'", '');
66 66
 
67 67
     if ($cacheid == 0) {
68 68
         die('Cache nicht gefunden!');
Please login to merge, or discard this patch.
htdocs/oconly81.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
  *  Unicode Reminder メモ
6 6
  ***************************************************************************/
7 7
 
8
-require __DIR__ . '/lib2/web.inc.php';
9
-require __DIR__ . '/lib2/logic/oconly81.inc.php';
8
+require __DIR__.'/lib2/web.inc.php';
9
+require __DIR__.'/lib2/logic/oconly81.inc.php';
10 10
 
11 11
 $showall = (@$_REQUEST['showall'] == 1);
12 12
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     INNER JOIN &oconly81 ON &oconly81.`user_id`=`user`.`user_id`
47 47
     GROUP BY `user`.`user_id`
48 48
     ORDER BY `count` DESC, `username` ASC " .
49
-    ($showall ? "" : "LIMIT " . sql_escape($opt['logic']['oconly81']['default_maxusers'] + 1))
49
+    ($showall ? "" : "LIMIT ".sql_escape($opt['logic']['oconly81']['default_maxusers'] + 1))
50 50
 );
51 51
 
52 52
 $tpl->assign_rs('users', $rs);
Please login to merge, or discard this patch.