Completed
Push — master ( 716a76...3f8338 )
by Richard
21s queued 12s
created
htdocs/class/captcha/recaptcha.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         include_once __DIR__ . '/recaptcha/recaptchalib.php';
67 67
         if (!empty($_POST['recaptcha_response_field'])) {
68 68
             $resp = recaptcha_check_answer($this->config['private_key'], $_SERVER['REMOTE_ADDR'],
69
-				$_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);
69
+                $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);
70 70
             if (!$resp->is_valid) {
71 71
                 $this->handler->message[] = $resp->error;
72 72
             } else {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function render()
44 44
     {
45
-        include_once __DIR__ . '/recaptcha/recaptchalib.php';
45
+        include_once __DIR__.'/recaptcha/recaptchalib.php';
46 46
         $form = "<script type=\"text/javascript\">
47 47
             var RecaptchaOptions = {
48
-            theme : '" . (empty($this->config['theme']) ? '' : $this->config['theme']) . "',
49
-            lang : '" . (empty($this->config['lang']) ? '' : $this->config['lang']) . "'
48
+            theme : '" . (empty($this->config['theme']) ? '' : $this->config['theme'])."',
49
+            lang : '" . (empty($this->config['lang']) ? '' : $this->config['lang'])."'
50 50
             };
51 51
             </script>";
52 52
         $public_key = empty($this->config['public_key']) ? '' : $this->config['public_key'];
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function verify($sessionName = null)
64 64
     {
65 65
         $is_valid = false;
66
-        include_once __DIR__ . '/recaptcha/recaptchalib.php';
66
+        include_once __DIR__.'/recaptcha/recaptchalib.php';
67 67
         if (!empty($_POST['recaptcha_response_field'])) {
68 68
             $resp = recaptcha_check_answer($this->config['private_key'], $_SERVER['REMOTE_ADDR'],
69 69
 				$_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);
Please login to merge, or discard this patch.
htdocs/class/captcha/text.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     public function render()
34 34
     {
35 35
         $form = $this->loadText() . '&nbsp;&nbsp; <input type="text" name="' . $this->config['name']
36
-			. '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
-			. '" maxlength="' . $this->config['num_chars'] . '" value="" />';
36
+            . '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
+            . '" maxlength="' . $this->config['num_chars'] . '" value="" />';
38 38
         $form .= '<br />' . XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
39 39
         if (!empty($this->config['maxattempts'])) {
40 40
             $form .= '<br />' . sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function render()
34 34
     {
35
-        $form = $this->loadText() . '&nbsp;&nbsp; <input type="text" name="' . $this->config['name']
36
-			. '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars']
37
-			. '" maxlength="' . $this->config['num_chars'] . '" value="" />';
38
-        $form .= '<br />' . XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
35
+        $form = $this->loadText().'&nbsp;&nbsp; <input type="text" name="'.$this->config['name']
36
+			. '" id="'.$this->config['name'].'" size="'.$this->config['num_chars']
37
+			. '" maxlength="'.$this->config['num_chars'].'" value="" />';
38
+        $form .= '<br />'.XoopsLocale::INPUT_RESULT_FROM_EXPRESSION;
39 39
         if (!empty($this->config['maxattempts'])) {
40
-            $form .= '<br />' . sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
40
+            $form .= '<br />'.sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
41 41
         }
42 42
         return $form;
43 43
     }
@@ -58,6 +58,6 @@  discard block
 block discarded – undo
58 58
             $expression = "{$val_a} + {$val_b} = ?";
59 59
             $this->code = $val_a + $val_b;
60 60
         }
61
-        return '<span style="font-style: normal; font-weight: bold; font-size: 100%; font-color: #333; border: 1px solid #333; padding: 1px 5px;">' . $expression . '</span>';
61
+        return '<span style="font-style: normal; font-weight: bold; font-size: 100%; font-color: #333; border: 1px solid #333; padding: 1px 5px;">'.$expression.'</span>';
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
htdocs/class/captcha/image/scripts/imageclass.php 2 patches
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -297,15 +297,15 @@
 block discarded – undo
297 297
         if ($RandImage = $this->loadBackground()) {
298 298
             $ImageType = @getimagesize($RandImage);
299 299
             switch (@$ImageType[2]) {
300
-            case 1:
301
-                $BackgroundImage = imagecreatefromgif($RandImage);
302
-                break;
303
-            case 2:
304
-                $BackgroundImage = imagecreatefromjpeg($RandImage);
305
-                break;
306
-            case 3:
307
-                $BackgroundImage = imagecreatefrompng($RandImage);
308
-                break;
300
+                case 1:
301
+                    $BackgroundImage = imagecreatefromgif($RandImage);
302
+                    break;
303
+                case 2:
304
+                    $BackgroundImage = imagecreatefromjpeg($RandImage);
305
+                    break;
306
+                case 3:
307
+                    $BackgroundImage = imagecreatefrompng($RandImage);
308
+                    break;
309 309
             }
310 310
         }
311 311
         if (isset($BackgroundImage) && !empty($BackgroundImage)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         if ($this->invalid) {
142 142
             header("Content-type: image/gif");
143
-            readfile($this->xoops_root_path . "/images/subject/icon2.gif");
143
+            readfile($this->xoops_root_path."/images/subject/icon2.gif");
144 144
             return false;
145 145
         }
146 146
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             return $items;
166 166
         }
167 167
         ;
168
-        $file_path = $this->xoops_root_path . "/class/captcha/image/{$name}";
168
+        $file_path = $this->xoops_root_path."/class/captcha/image/{$name}";
169 169
         $files = \Xoops\Core\Lists\File::getList($file_path);
170 170
         foreach ($files as $item) {
171 171
             if (empty($extension) || preg_match("/(\.{$extension})$/i", $item)) {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     public function loadFont()
237 237
     {
238 238
         $fonts = $this->getList("fonts", "ttf");
239
-        $this->font = $this->xoops_root_path . "/class/captcha/image/fonts/" . $fonts[array_rand($fonts)];
239
+        $this->font = $this->xoops_root_path."/class/captcha/image/fonts/".$fonts[array_rand($fonts)];
240 240
     }
241 241
 
242 242
     /**
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
     {
283 283
         $RandBackground = null;
284 284
         if ($backgrounds = $this->getList("backgrounds", "(gif|jpg|png)")) {
285
-            $RandBackground = $this->xoops_root_path . "/class/captcha/image/backgrounds/" . $backgrounds[array_rand($backgrounds)];
285
+            $RandBackground = $this->xoops_root_path."/class/captcha/image/backgrounds/".$backgrounds[array_rand($backgrounds)];
286 286
         }
287 287
         return $RandBackground;
288 288
     }
Please login to merge, or discard this patch.
htdocs/class/captcha/image/scripts/image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  * @since     2.6.0
25 25
  */
26 26
 
27
-require dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php';
27
+require dirname(dirname(dirname(dirname(__DIR__)))).'/mainfile.php';
28 28
 
29 29
 require_once 'imageclass.php';
30 30
 
Please login to merge, or discard this patch.
htdocs/class/XoopsBaseConfig.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
     final private function __construct($config)
39 39
     {
40 40
         if (!class_exists('XoopsLoad', false)) {
41
-            include __DIR__ . '/xoopsload.php';
41
+            include __DIR__.'/xoopsload.php';
42 42
         }
43 43
         if (is_string($config)) {
44 44
             $yamlString = file_get_contents($config);
45 45
             if ($yamlString === false) {
46 46
                 throw new \Exception('XoopsBaseConfig failed to load configuration.');
47 47
             }
48
-            $loaderPath = $this->extractLibPath($yamlString) . '/vendor/autoload.php';
48
+            $loaderPath = $this->extractLibPath($yamlString).'/vendor/autoload.php';
49 49
             if (file_exists($loaderPath)) {
50 50
                 include_once $loaderPath;
51 51
             }
@@ -231,11 +231,11 @@  discard block
 block discarded – undo
231 231
             XOOPS_URL :
232 232
             ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === "on") ? 'https://' : 'http://')
233 233
             . $_SERVER['SERVER_NAME']
234
-            . (($_SERVER['SERVER_PORT'] != '80') ? ':' . $_SERVER['SERVER_PORT'] : '');
234
+            . (($_SERVER['SERVER_PORT'] != '80') ? ':'.$_SERVER['SERVER_PORT'] : '');
235 235
 
236
-        $parts = parse_url($url . '/');
236
+        $parts = parse_url($url.'/');
237 237
         $host = isset($parts['host']) ? $parts['host'] : $_SERVER['SERVER_NAME'];
238
-        $host = ($host==='localhost') ? '' : $host;
238
+        $host = ($host === 'localhost') ? '' : $host;
239 239
         $urlpath = isset($parts['path']) ? $parts['path'] : '/';
240 240
 
241 241
         $libpath = self::defineDefault('XOOPS_PATH');
@@ -248,21 +248,21 @@  discard block
 block discarded – undo
248 248
             'trust-path' => $libpath,
249 249
             'url' => $url,
250 250
             'prot' => self::defineDefault('XOOPS_PROT'),
251
-            'asset-path' => $path . '/assets',
252
-            'asset-url' => $url . '/assets',
253
-            'themes-path' => $path .'/themes',
254
-            'themes-url' => $url . '/themes',
255
-            'adminthemes-path' => $path . '/modules/system/themes',
256
-            'adminthemes-url' => $url . '/modules/system/themes',
257
-            'media-path' => $path . '/media',
258
-            'media-url' => $url . '/media',
259
-            'uploads-path' => $path . '/uploads',
260
-            'uploads-url' => $url . '/uploads',
251
+            'asset-path' => $path.'/assets',
252
+            'asset-url' => $url.'/assets',
253
+            'themes-path' => $path.'/themes',
254
+            'themes-url' => $url.'/themes',
255
+            'adminthemes-path' => $path.'/modules/system/themes',
256
+            'adminthemes-url' => $url.'/modules/system/themes',
257
+            'media-path' => $path.'/media',
258
+            'media-url' => $url.'/media',
259
+            'uploads-path' => $path.'/uploads',
260
+            'uploads-url' => $url.'/uploads',
261 261
             'cookie-domain' => $host,
262 262
             'cookie-path' => $urlpath,
263
-            'smarty-cache' => $varpath . '/caches/smarty_cache',
264
-            'smarty-compile' => $varpath . '/caches/smarty_compile',
265
-            'smarty-xoops-plugins' => $libpath . '/smarty/xoops_plugins',
263
+            'smarty-cache' => $varpath.'/caches/smarty_cache',
264
+            'smarty-compile' => $varpath.'/caches/smarty_compile',
265
+            'smarty-xoops-plugins' => $libpath.'/smarty/xoops_plugins',
266 266
             'db-type' => self::defineDefault('XOOPS_DB_TYPE'),
267 267
             'db-charset' => 'utf8',
268 268
             'db-prefix' => self::defineDefault('XOOPS_DB_PREFIX'),
Please login to merge, or discard this patch.
htdocs/class/pagenav.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
         $this->current = (int)($current_start);
69 69
         $this->extra = $extra_arg;
70 70
         if ($extra_arg != '' && (substr($extra_arg, - 5) !== '&amp;' || substr($extra_arg, - 1) !== '&')) {
71
-            $this->extra = '&amp;' . $extra_arg;
71
+            $this->extra = '&amp;'.$extra_arg;
72 72
         }
73
-        $this->url = $_SERVER['PHP_SELF'] . '?' . trim($start_name) . '=';
73
+        $this->url = $_SERVER['PHP_SELF'].'?'.trim($start_name).'=';
74 74
     }
75 75
 
76 76
     /**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 $prev = $this->current - $this->perpage;
99 99
                 if ($prev >= 0) {
100 100
                     $xoops->tpl()->assign('prev_text', $prev_text);
101
-                    $xoops->tpl()->assign('prev_url', $this->url . $prev . $this->extra);
101
+                    $xoops->tpl()->assign('prev_url', $this->url.$prev.$this->extra);
102 102
                 }
103 103
                 $last = 0;
104 104
                 $last_text = '';
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                             $nav['active'] = 0;
121 121
                             $last = 1;
122 122
                             $last_text = $counter;
123
-                            $last_url = $this->url . (($counter - 1) * $this->perpage) . $this->extra;
123
+                            $last_url = $this->url.(($counter - 1) * $this->perpage).$this->extra;
124 124
                         } else {
125 125
                             $nav['text'] = $counter;
126
-                            $nav['url'] = $this->url . (($counter - 1) * $this->perpage) . $this->extra;
126
+                            $nav['url'] = $this->url.(($counter - 1) * $this->perpage).$this->extra;
127 127
                             $nav['active'] = 1;
128 128
                         }
129 129
                         if ($counter == 1 && $current_page > 1 + $offset) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                             $nav['active'] = 0;
133 133
                             $first = 1;
134 134
                             $first_text = $counter;
135
-                            $first_url = $this->url . (($counter - 1) * $this->perpage) . $this->extra;
135
+                            $first_url = $this->url.(($counter - 1) * $this->perpage).$this->extra;
136 136
                         }
137 137
                     }
138 138
                     $xoops->tpl()->appendByRef('xo_nav', $nav);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 $next = $this->current + $this->perpage;
150 150
                 if ($this->total > $next) {
151 151
                     $xoops->tpl()->assign('next_text', $next_text);
152
-                    $xoops->tpl()->assign('next_url', $this->url . $next . $this->extra);
152
+                    $xoops->tpl()->assign('next_url', $this->url.$next.$this->extra);
153 153
                 }
154 154
             }
155 155
         }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         }
167 167
         $xoops->tpl()->assign('size', $size);
168 168
         
169
-        $xoops->tpl()->assign('align', ' pagination-' . $align);
169
+        $xoops->tpl()->assign('align', ' pagination-'.$align);
170 170
         $xoops->tpl()->assign('pagination_nav', true);
171 171
         $ret = $xoops->tpl()->fetch('module:system/system_pagenav.tpl');
172 172
         $xoops->tpl()->assign('xo_nav');
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             $current_page = (int)(floor(($this->current + $this->perpage) / $this->perpage));
194 194
             while ($counter <= $total_pages) {
195 195
                 $select['text'] = $counter;
196
-                $select['value'] = $this->url . (($counter - 1) * $this->perpage) . $this->extra;
196
+                $select['value'] = $this->url.(($counter - 1) * $this->perpage).$this->extra;
197 197
                 if ($counter == $current_page) {
198 198
                     $select['selected'] = 1;
199 199
                 } else {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $xoops->tpl()->assign('onchange', "location=this.options[this.options.selectedIndex].value;");
208 208
         $xoops->tpl()->assign('pagination_select', true);
209 209
         $xoops->tpl()->assign('showbutton', $showbutton);
210
-        $xoops->tpl()->assign('align', ' pagination-' . $align);
210
+        $xoops->tpl()->assign('align', ' pagination-'.$align);
211 211
         $ret = $xoops->tpl()->fetch('module:system/system_pagenav.tpl');
212 212
         $xoops->tpl()->assign('xo_select');
213 213
         return $ret;
Please login to merge, or discard this patch.
htdocs/class/xoopsmailer.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -231,18 +231,18 @@  discard block
 block discarded – undo
231 231
     {
232 232
         $xoops = Xoops::getInstance();
233 233
         if (!$path = $this->templatedir) {
234
-            $path = \XoopsBaseConfig::get('root-path') . "/locale/";
234
+            $path = \XoopsBaseConfig::get('root-path')."/locale/";
235 235
         } elseif (false === strpos($path, '/')) {
236
-            $path = \XoopsBaseConfig::get('root-path') . "/modules/" . $path . "/locale/";
236
+            $path = \XoopsBaseConfig::get('root-path')."/modules/".$path."/locale/";
237 237
         } elseif (substr($path, -1, 1) !== "/") {
238 238
             $path .= "/";
239 239
         }
240
-        if (XoopsLoad::fileExists($path . $xoops->getConfig('locale') . "/templates/" . $this->template)) {
241
-            return $path . $xoops->getConfig('locale') . "/templates/" . $this->template;
242
-        } elseif (XoopsLoad::fileExists($path . "en_US/templates/" . $this->template)) {
243
-            return $path . "en_US/templates/" . $this->template;
244
-        } elseif (XoopsLoad::fileExists($path . $this->template)) {
245
-            return $path . $this->template;
240
+        if (XoopsLoad::fileExists($path.$xoops->getConfig('locale')."/templates/".$this->template)) {
241
+            return $path.$xoops->getConfig('locale')."/templates/".$this->template;
242
+        } elseif (XoopsLoad::fileExists($path."en_US/templates/".$this->template)) {
243
+            return $path."en_US/templates/".$this->template;
244
+        } elseif (XoopsLoad::fileExists($path.$this->template)) {
245
+            return $path.$this->template;
246 246
         } else {
247 247
             return false;
248 248
         }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
         // for sending mail only
354 354
         if ($this->isMail || !empty($this->toEmails)) {
355 355
             if (!empty($this->priority)) {
356
-                $this->headers[] = "X-Priority: " . $this->priority;
356
+                $this->headers[] = "X-Priority: ".$this->priority;
357 357
             }
358 358
             // $this->headers[] = "X-Mailer: PHP/".phpversion();
359 359
             // $this->headers[] = "Return-Path: ".$this->fromEmail;
@@ -367,14 +367,14 @@  discard block
 block discarded – undo
367 367
 
368 368
         $this->assign('X_ADMINMAIL', $xoops->getConfig('adminmail'));
369 369
         $this->assign('X_SITENAME', $xoops->getConfig('sitename'));
370
-        $this->assign('X_SITEURL', \XoopsBaseConfig::get('url') . "/");
370
+        $this->assign('X_SITEURL', \XoopsBaseConfig::get('url')."/");
371 371
         // TODO: also X_ADMINNAME??
372 372
         // TODO: X_SIGNATURE, X_DISCLAIMER ?? - these are probably best
373 373
         // done as includes if mail templates ever get this sophisticated
374 374
         // replace tags with actual values
375 375
         foreach ($this->assignedTags as $k => $v) {
376
-            $this->body = str_replace("{" . $k . "}", $v, $this->body);
377
-            $this->subject = str_replace("{" . $k . "}", $v, $this->subject);
376
+            $this->body = str_replace("{".$k."}", $v, $this->body);
377
+            $this->subject = str_replace("{".$k."}", $v, $this->subject);
378 378
         }
379 379
         $this->body = str_replace("\r\n", "\n", $this->body);
380 380
         $this->body = str_replace("\r", "\n", $this->body);
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             $text = str_replace("{X_UID}", $user->getVar("uid"), $this->body);
403 403
             $text = str_replace("{X_UEMAIL}", $user->getVar("email"), $text);
404 404
             $text = str_replace("{X_UNAME}", $user->getVar("uname"), $text);
405
-            $text = str_replace("{X_UACTLINK}", \XoopsBaseConfig::get('url') . "/register.php?op=actv&id=" . $user->getVar("uid") . "&actkey=" . $user->getVar('actkey'), $text);
405
+            $text = str_replace("{X_UACTLINK}", \XoopsBaseConfig::get('url')."/register.php?op=actv&id=".$user->getVar("uid")."&actkey=".$user->getVar('actkey'), $text);
406 406
             // send mail
407 407
             if ($this->isMail) {
408 408
                 if (!$this->sendMail($user->getVar("email"), $subject, $text, $headers)) {
@@ -509,9 +509,9 @@  discard block
 block discarded – undo
509 509
         } else {
510 510
             $ret = "";
511 511
             if (!empty($this->errors)) {
512
-                $ret = "<h4>" . XoopsLocale::ERRORS . "</h4>";
512
+                $ret = "<h4>".XoopsLocale::ERRORS."</h4>";
513 513
                 foreach ($this->errors as $error) {
514
-                    $ret .= $error . "<br />";
514
+                    $ret .= $error."<br />";
515 515
                 }
516 516
             }
517 517
             return $ret;
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
             $ret = "";
528 528
             if (!empty($this->success)) {
529 529
                 foreach ($this->success as $suc) {
530
-                    $ret .= $suc . "<br />";
530
+                    $ret .= $suc."<br />";
531 531
                 }
532 532
             }
533 533
             return $ret;
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
      */
564 564
     public function addHeaders($value)
565 565
     {
566
-        $this->headers[] = trim($value) . $this->LE;
566
+        $this->headers[] = trim($value).$this->LE;
567 567
     }
568 568
 
569 569
     /**
Please login to merge, or discard this patch.
htdocs/class/class.tar.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 // Increment number of files
207 207
                 $this->numFiles++;
208 208
                 // Create us a new file in our array
209
-                $activeFile =& $this->files[];
209
+                $activeFile = & $this->files[];
210 210
                 // Asign Values
211 211
                 $activeFile["name"] = $file_name;
212 212
                 $activeFile["mode"] = $file_mode;
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                 // Increment number of directories
223 223
                 $this->numDirectories++;
224 224
                 // Create a new directory in our array
225
-                $activeDir =& $this->directories[];
225
+                $activeDir = & $this->directories[];
226 226
                 // Assign values
227 227
                 $activeDir["name"] = $file_name;
228 228
                 $activeDir["mode"] = $file_mode;
@@ -288,16 +288,16 @@  discard block
 block discarded – undo
288 288
                 // Generate tar header for this directory
289 289
                 // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
290 290
                 $header .= str_pad($information["name"], 100, chr(0));
291
-                $header .= str_pad(decoct($information["mode"]), 7, "0", STR_PAD_LEFT) . chr(0);
292
-                $header .= str_pad(decoct($information["user_id"]), 7, "0", STR_PAD_LEFT) . chr(0);
293
-                $header .= str_pad(decoct($information["group_id"]), 7, "0", STR_PAD_LEFT) . chr(0);
294
-                $header .= str_pad(decoct(0), 11, "0", STR_PAD_LEFT) . chr(0);
295
-                $header .= str_pad(decoct($information["time"]), 11, "0", STR_PAD_LEFT) . chr(0);
291
+                $header .= str_pad(decoct($information["mode"]), 7, "0", STR_PAD_LEFT).chr(0);
292
+                $header .= str_pad(decoct($information["user_id"]), 7, "0", STR_PAD_LEFT).chr(0);
293
+                $header .= str_pad(decoct($information["group_id"]), 7, "0", STR_PAD_LEFT).chr(0);
294
+                $header .= str_pad(decoct(0), 11, "0", STR_PAD_LEFT).chr(0);
295
+                $header .= str_pad(decoct($information["time"]), 11, "0", STR_PAD_LEFT).chr(0);
296 296
                 $header .= str_repeat(" ", 8);
297 297
                 $header .= "5";
298 298
                 $header .= str_repeat(chr(0), 100);
299 299
                 $header .= str_pad("ustar", 6, chr(32));
300
-                $header .= chr(32) . chr(0);
300
+                $header .= chr(32).chr(0);
301 301
                 $header .= str_pad("", 32, chr(0));
302 302
                 $header .= str_pad("", 32, chr(0));
303 303
                 $header .= str_repeat(chr(0), 8);
@@ -323,16 +323,16 @@  discard block
 block discarded – undo
323 323
                 // Generate the TAR header for this file
324 324
                 // Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
325 325
                 $header .= str_pad($information["name"], 100, chr(0));
326
-                $header .= str_pad(decoct($information["mode"]), 7, "0", STR_PAD_LEFT) . chr(0);
327
-                $header .= str_pad(decoct($information["user_id"]), 7, "0", STR_PAD_LEFT) . chr(0);
328
-                $header .= str_pad(decoct($information["group_id"]), 7, "0", STR_PAD_LEFT) . chr(0);
329
-                $header .= str_pad(decoct($information["size"]), 11, "0", STR_PAD_LEFT) . chr(0);
330
-                $header .= str_pad(decoct($information["time"]), 11, "0", STR_PAD_LEFT) . chr(0);
326
+                $header .= str_pad(decoct($information["mode"]), 7, "0", STR_PAD_LEFT).chr(0);
327
+                $header .= str_pad(decoct($information["user_id"]), 7, "0", STR_PAD_LEFT).chr(0);
328
+                $header .= str_pad(decoct($information["group_id"]), 7, "0", STR_PAD_LEFT).chr(0);
329
+                $header .= str_pad(decoct($information["size"]), 11, "0", STR_PAD_LEFT).chr(0);
330
+                $header .= str_pad(decoct($information["time"]), 11, "0", STR_PAD_LEFT).chr(0);
331 331
                 $header .= str_repeat(" ", 8);
332 332
                 $header .= "0";
333 333
                 $header .= str_repeat(chr(0), 100);
334 334
                 $header .= str_pad("ustar", 6, chr(32));
335
-                $header .= chr(32) . chr(0);
335
+                $header .= chr(32).chr(0);
336 336
                 $header .= str_pad($information["user_name"], 32, chr(0)); // How do I get a file's user name from PHP?
337 337
                 $header .= str_pad($information["group_name"], 32, chr(0)); // How do I get a file's group name from PHP?
338 338
                 $header .= str_repeat(chr(0), 8);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 // Pad file contents to byte count divisible by 512
350 350
                 $file_contents = str_pad($information["file"], (ceil($information["size"] / 512) * 512), chr(0));
351 351
                 // Add new tar formatted data to tar file contents
352
-                $this->tar_file .= $header . $file_contents;
352
+                $this->tar_file .= $header.$file_contents;
353 353
             }
354 354
         }
355 355
         // Add 512 bytes of NULLs to designate EOF
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
         $file_information = stat($dirname);
488 488
         // Add directory to processed data
489 489
         $this->numDirectories++;
490
-        $activeDir =& $this->directories[];
490
+        $activeDir = & $this->directories[];
491 491
         $activeDir['name'] = $dirname;
492 492
         $activeDir['mode'] = $file_information['mode'];
493 493
         $activeDir['time'] = $file_information['time'];
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
         fclose($fp);
528 528
         // Add file to processed data
529 529
         $this->numFiles++;
530
-        $activeFile =& $this->files[];
530
+        $activeFile = & $this->files[];
531 531
         $activeFile['name'] = $filename;
532 532
         $activeFile['mode'] = $file_information['mode'];
533 533
         $activeFile['user_id'] = $file_information['uid'];
Please login to merge, or discard this patch.
htdocs/index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
  * @version         $Id$
25 25
  */
26 26
 
27
-$mainfile = __DIR__ . '/mainfile.php';
27
+$mainfile = __DIR__.'/mainfile.php';
28 28
 if (file_exists($mainfile)) {
29 29
     include $mainfile;
30
-} elseif (file_exists(__DIR__ . '/install/index.php')) {
30
+} elseif (file_exists(__DIR__.'/install/index.php')) {
31 31
     header('Location: install/index.php');
32 32
     exit;
33 33
 }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $xoops->module = $xoops->getModuleByDirname($xoops->getConfig('startpage'));
45 45
     if (!$xoops->isModule() || !$xoops->module->getVar('isactive')) {
46 46
         $xoops->header();
47
-        echo "<h4>" . XoopsLocale::E_NO_MODULE . "</h4>";
47
+        echo "<h4>".XoopsLocale::E_NO_MODULE."</h4>";
48 48
         $xoops->footer();
49 49
     }
50 50
     $moduleperm_handler = $xoops->getHandlerGroupPermission();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $xoops->userIsAdmin = $xoops->user->isAdmin($xoops->module->getVar('mid'));
56 56
     } else {
57 57
         if (!$moduleperm_handler->checkRight('module_read', $xoops->module->getVar('mid'), FixedGroups::ANONYMOUS)) {
58
-            $xoops->redirect(\XoopsBaseConfig::get('url') . "/user.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
58
+            $xoops->redirect(\XoopsBaseConfig::get('url')."/user.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
59 59
         }
60 60
     }
61 61
     if ($xoops->module->getVar('hasconfig') == 1
@@ -65,22 +65,22 @@  discard block
 block discarded – undo
65 65
         $xoops->moduleConfig = $xoops->getModuleConfigs();
66 66
     }
67 67
 
68
-    chdir('modules/' . $xoops->getConfig('startpage') . '/');
68
+    chdir('modules/'.$xoops->getConfig('startpage').'/');
69 69
     $xoops->loadLanguage('main', $xoops->module->getVar('dirname', 'n'));
70 70
     $parsed = parse_url(\XoopsBaseConfig::get('url'));
71
-    $url = isset($parsed['scheme']) ? $parsed['scheme'] . '://' : 'http://';
71
+    $url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
72 72
     if (isset($parsed['host'])) {
73 73
         $url .= $parsed['host'];
74 74
         if (isset($parsed['port'])) {
75
-            $url .= ':' . $parsed['port'];
75
+            $url .= ':'.$parsed['port'];
76 76
         }
77 77
     } else {
78 78
         $url .= $_SERVER['HTTP_HOST'];
79 79
     }
80 80
 
81 81
     $_SERVER['REQUEST_URI'] =
82
-        substr(\XoopsBaseConfig::get('url'), strlen($url)) . '/modules/' . $xoops->getConfig('startpage') . '/index.php';
83
-    include $xoops->path('modules/' . $xoops->getConfig('startpage') . '/index.php');
82
+        substr(\XoopsBaseConfig::get('url'), strlen($url)).'/modules/'.$xoops->getConfig('startpage').'/index.php';
83
+    include $xoops->path('modules/'.$xoops->getConfig('startpage').'/index.php');
84 84
     exit();
85 85
 } else {
86 86
     $xoops->setOption('show_cblock', 1);
Please login to merge, or discard this patch.