Completed
Pull Request — master (#616)
by Richard
13:56
created
htdocs/class/captcha/xoopscaptchamethod.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,12 +75,13 @@
 block discarded – undo
75 75
      */
76 76
     public function loadConfig($name = '')
77 77
     {
78
-        if (!is_object($this->handler))
79
-            $this->config = array();
80
-        else
81
-            $this->config = empty($name)
78
+        if (!is_object($this->handler)) {
79
+                    $this->config = array();
80
+        } else {
81
+                    $this->config = empty($name)
82 82
                 ? $this->handler->config
83 83
                 : array_merge($this->handler->config, $this->handler->loadConfig($name));
84
+        }
84 85
     }
85 86
 
86 87
     /**
Please login to merge, or discard this patch.
htdocs/class/captcha/recaptcha/recaptchalib.php 2 patches
Indentation   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,7 +105,6 @@  discard block
 block discarded – undo
105 105
  * @param string $pubkey A public key for reCAPTCHA
106 106
  * @param string $error The error given by reCAPTCHA (optional, default is null)
107 107
  * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
108
-
109 108
  * @return string - The HTML to be embedded in the user's form.
110 109
  */
111 110
 function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
@@ -172,13 +171,13 @@  discard block
 block discarded – undo
172 171
     }
173 172
 
174 173
     $response = _recaptcha_http_post(RECAPTCHA_VERIFY_SERVER,
175
-		"/recaptcha/api/verify",
176
-		array(
177
-			   'privatekey' => $privkey,
178
-			   'remoteip' => $remoteip,
179
-			   'challenge' => $challenge,
180
-			   'response' => $response
181
-		   ) + $extra_params);
174
+        "/recaptcha/api/verify",
175
+        array(
176
+                'privatekey' => $privkey,
177
+                'remoteip' => $remoteip,
178
+                'challenge' => $challenge,
179
+                'response' => $response
180
+            ) + $extra_params);
182 181
 
183 182
     $answers = explode("\n", $response [1]);
184 183
     $recaptcha_response = new ReCaptchaResponse();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 {
51 51
     $req = "";
52 52
     foreach ($data as $key => $value) {
53
-        $req .= $key . '=' . urlencode(stripslashes($value)) . '&';
53
+        $req .= $key.'='.urlencode(stripslashes($value)).'&';
54 54
     }
55 55
 
56 56
     // Cut the last '&'
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     $http_request = "POST $path HTTP/1.0\r\n";
77 77
     $http_request .= "Host: $host\r\n";
78 78
     $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
79
-    $http_request .= "Content-Length: " . strlen($req) . "\r\n";
79
+    $http_request .= "Content-Length: ".strlen($req)."\r\n";
80 80
     $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
81 81
     $http_request .= "\r\n";
82 82
     $http_request .= $req;
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
     $errorpart = "";
124 124
     if ($error) {
125
-        $errorpart = "&error=" . $error;
125
+        $errorpart = "&error=".$error;
126 126
     }
127
-    return '<script type="text/javascript" src="' . $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
127
+    return '<script type="text/javascript" src="'.$server.'/challenge?k='.$pubkey.$errorpart.'"></script>
128 128
 
129 129
     <noscript>
130
-        <iframe src="' . $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
130
+        <iframe src="' . $server.'/noscript?k='.$pubkey.$errorpart.'" height="300" width="500" frameborder="0"></iframe><br/>
131 131
         <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
132 132
         <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
133 133
     </noscript>';
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
  */
204 204
 function recaptcha_get_signup_url($domain = null, $appname = null)
205 205
 {
206
-    return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode(
206
+    return "https://www.google.com/recaptcha/admin/create?"._recaptcha_qsencode(
207 207
         array('domains' => $domain, 'app' => $appname));
208 208
 }
209 209
 
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
 function recaptcha_mailhide_url($pubkey, $privkey, $email)
257 257
 {
258 258
     if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
259
-        die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
259
+        die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, "."you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
260 260
     }
261 261
 
262 262
     $ky = pack('H*', $privkey);
263 263
     $cryptmail = _recaptcha_aes_encrypt($email, $ky);
264 264
 
265
-    return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64($cryptmail);
265
+    return "http://www.google.com/recaptcha/mailhide/d?k=".$pubkey."&c="._recaptcha_mailhide_urlbase64($cryptmail);
266 266
 }
267 267
 
268 268
 /**
@@ -305,5 +305,5 @@  discard block
 block discarded – undo
305 305
     $emailparts = _recaptcha_mailhide_email_parts($email);
306 306
     $url = recaptcha_mailhide_url($pubkey, $privkey, $email);
307 307
 
308
-    return htmlentities($emailparts[0]) . "<a href='" . htmlentities($url) . "' onclick=\"window.open('" . htmlentities($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities($emailparts [1]);
308
+    return htmlentities($emailparts[0])."<a href='".htmlentities($url)."' onclick=\"window.open('".htmlentities($url)."', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@".htmlentities($emailparts [1]);
309 309
 }
Please login to merge, or discard this patch.
htdocs/class/captcha/image.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function render()
65 65
     {
66
-		$xoops_url = \XoopsBaseConfig::get('url');
66
+        $xoops_url = \XoopsBaseConfig::get('url');
67 67
         $js = "<script type='text/javascript'>
68 68
                 function xoops_captcha_refresh(imgId)
69 69
                 {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function loadImage()
90 90
     {
91
-		$xoops_url = \XoopsBaseConfig::get('url');
91
+        $xoops_url = \XoopsBaseConfig::get('url');
92 92
         return '<img id="' . ($this->config["name"]) . '" src="' . $xoops_url . '/class/captcha/image/scripts/image.php" onclick=\'this.src="' . $xoops_url . '/class/captcha/image/scripts/image.php?refresh="+Math.random()' . '\' style="cursor: pointer; vertical-align: middle;" alt="" />';
93 93
     }
94 94
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
             return false;
41 41
         } else {
42 42
             $required_functions = array(
43
-                'imagecreatetruecolor' ,
44
-                'imagecolorallocate' ,
45
-                'imagefilledrectangle' ,
46
-                'imagejpeg' ,
47
-                'imagedestroy' ,
43
+                'imagecreatetruecolor',
44
+                'imagecolorallocate',
45
+                'imagefilledrectangle',
46
+                'imagejpeg',
47
+                'imagedestroy',
48 48
                 'imageftbbox');
49 49
             foreach ($required_functions as $func) {
50 50
                 if (!function_exists($func)) {
51
-                    trigger_error('Function ' . $func . ' is not defined', E_USER_WARNING);
51
+                    trigger_error('Function '.$func.' is not defined', E_USER_WARNING);
52 52
                     return false;
53 53
                 }
54 54
             }
@@ -67,18 +67,18 @@  discard block
 block discarded – undo
67 67
         $js = "<script type='text/javascript'>
68 68
                 function xoops_captcha_refresh(imgId)
69 69
                 {
70
-                    xoopsGetElementById(imgId).src = '" . $xoops_url . "/class/captcha/image/scripts/image.php?refresh='+Math.random();
70
+                    xoopsGetElementById(imgId).src = '" . $xoops_url."/class/captcha/image/scripts/image.php?refresh='+Math.random();
71 71
                 }
72 72
                 </script>";
73 73
         $image = $this->loadImage();
74
-        $image .= "<br /><a href=\"javascript: xoops_captcha_refresh('" . ($this->config['name']) . "')\">" . XoopsLocale::CLICK_TO_REFRESH_IMAGE_IF_NOT_CLEAR . "</a>";
75
-        $input = '<input type="text" name="' . $this->config['name'] . '" id="' . $this->config['name'] . '" size="' . $this->config['num_chars'] . '" maxlength="' . $this->config['num_chars'] . '" value="" required>';
74
+        $image .= "<br /><a href=\"javascript: xoops_captcha_refresh('".($this->config['name'])."')\">".XoopsLocale::CLICK_TO_REFRESH_IMAGE_IF_NOT_CLEAR."</a>";
75
+        $input = '<input type="text" name="'.$this->config['name'].'" id="'.$this->config['name'].'" size="'.$this->config['num_chars'].'" maxlength="'.$this->config['num_chars'].'" value="" required>';
76 76
         $rule = XoopsLocale::INPUT_LETTERS_IN_THE_IMAGE;
77
-        $rule .= '<br />' . (empty($this->config['casesensitive']) ? XoopsLocale::CODE_IS_CASE_INSENSITIVE : XoopsLocale::CODE_IS_CASE_SENSITIVE);
77
+        $rule .= '<br />'.(empty($this->config['casesensitive']) ? XoopsLocale::CODE_IS_CASE_INSENSITIVE : XoopsLocale::CODE_IS_CASE_SENSITIVE);
78 78
         if (!empty($this->config['maxattempts'])) {
79
-            $rule .= '<br />' . sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
79
+            $rule .= '<br />'.sprintf(XoopsLocale::F_MAXIMUM_ATTEMPTS, $this->config['maxattempts']);
80 80
         }
81
-        return $js . $image . '<br /><br />' . $input . '<br />' . $rule;
81
+        return $js.$image.'<br /><br />'.$input.'<br />'.$rule;
82 82
     }
83 83
 
84 84
     /**
@@ -89,6 +89,6 @@  discard block
 block discarded – undo
89 89
     public function loadImage()
90 90
     {
91 91
 		$xoops_url = \XoopsBaseConfig::get('url');
92
-        return '<img id="' . ($this->config["name"]) . '" src="' . $xoops_url . '/class/captcha/image/scripts/image.php" onclick=\'this.src="' . $xoops_url . '/class/captcha/image/scripts/image.php?refresh="+Math.random()' . '\' style="cursor: pointer; vertical-align: middle;" alt="" />';
92
+        return '<img id="'.($this->config["name"]).'" src="'.$xoops_url.'/class/captcha/image/scripts/image.php" onclick=\'this.src="'.$xoops_url.'/class/captcha/image/scripts/image.php?refresh="+Math.random()'.'\' style="cursor: pointer; vertical-align: middle;" alt="" />';
93 93
     }
94 94
 }
Please login to merge, or discard this patch.
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.