@@ -34,13 +34,13 @@ discard block |
||
34 | 34 | */ |
35 | 35 | class FilterInput |
36 | 36 | { |
37 | - protected $tagsArray; // default is empty array |
|
38 | - protected $attrArray; // default is empty array |
|
37 | + protected $tagsArray; // default is empty array |
|
38 | + protected $attrArray; // default is empty array |
|
39 | 39 | |
40 | - protected $tagsMethod; // default is 0 |
|
41 | - protected $attrMethod; // default is 0 |
|
40 | + protected $tagsMethod; // default is 0 |
|
41 | + protected $attrMethod; // default is 0 |
|
42 | 42 | |
43 | - protected $xssAuto; // default is 1 |
|
43 | + protected $xssAuto; // default is 1 |
|
44 | 44 | protected $tagBlacklist = array( |
45 | 45 | 'applet', |
46 | 46 | 'body', |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | $attrArray[$i] = strtolower($attrArray[$i]); |
95 | 95 | } |
96 | 96 | // assign to member vars |
97 | - $this->tagsArray = (array) $tagsArray; |
|
98 | - $this->attrArray = (array) $attrArray; |
|
97 | + $this->tagsArray = (array)$tagsArray; |
|
98 | + $this->attrArray = (array)$attrArray; |
|
99 | 99 | $this->tagsMethod = $tagsMethod; |
100 | 100 | $this->attrMethod = $attrMethod; |
101 | 101 | $this->xssAuto = $xssAuto; |
@@ -213,61 +213,61 @@ discard block |
||
213 | 213 | case 'INT': |
214 | 214 | case 'INTEGER': |
215 | 215 | // Only use the first integer value |
216 | - preg_match('/-?\d+/', (string) $source, $matches); |
|
217 | - $result = @ (int) $matches[0]; |
|
216 | + preg_match('/-?\d+/', (string)$source, $matches); |
|
217 | + $result = @ (int)$matches[0]; |
|
218 | 218 | break; |
219 | 219 | |
220 | 220 | case 'FLOAT': |
221 | 221 | case 'DOUBLE': |
222 | 222 | // Only use the first floating point value |
223 | - preg_match('/-?\d+(\.\d+)?/', (string) $source, $matches); |
|
224 | - $result = @ (float) $matches[0]; |
|
223 | + preg_match('/-?\d+(\.\d+)?/', (string)$source, $matches); |
|
224 | + $result = @ (float)$matches[0]; |
|
225 | 225 | break; |
226 | 226 | |
227 | 227 | case 'BOOL': |
228 | 228 | case 'BOOLEAN': |
229 | - $result = (bool) $source; |
|
229 | + $result = (bool)$source; |
|
230 | 230 | break; |
231 | 231 | |
232 | 232 | case 'WORD': |
233 | - $result = (string) preg_replace('/[^A-Z_]/i', '', $source); |
|
233 | + $result = (string)preg_replace('/[^A-Z_]/i', '', $source); |
|
234 | 234 | break; |
235 | 235 | |
236 | 236 | case 'ALPHANUM': |
237 | 237 | case 'ALNUM': |
238 | - $result = (string) preg_replace('/[^A-Z0-9]/i', '', $source); |
|
238 | + $result = (string)preg_replace('/[^A-Z0-9]/i', '', $source); |
|
239 | 239 | break; |
240 | 240 | |
241 | 241 | case 'CMD': |
242 | - $result = (string) preg_replace('/[^A-Z0-9_\.-]/i', '', $source); |
|
242 | + $result = (string)preg_replace('/[^A-Z0-9_\.-]/i', '', $source); |
|
243 | 243 | $result = strtolower($result); |
244 | 244 | break; |
245 | 245 | |
246 | 246 | case 'BASE64': |
247 | - $result = (string) preg_replace('/[^A-Z0-9\/+=]/i', '', $source); |
|
247 | + $result = (string)preg_replace('/[^A-Z0-9\/+=]/i', '', $source); |
|
248 | 248 | break; |
249 | 249 | |
250 | 250 | case 'STRING': |
251 | - $result = (string) $this->process($source); |
|
251 | + $result = (string)$this->process($source); |
|
252 | 252 | break; |
253 | 253 | |
254 | 254 | case 'ARRAY': |
255 | - $result = (array) $this->process($source); |
|
255 | + $result = (array)$this->process($source); |
|
256 | 256 | break; |
257 | 257 | |
258 | 258 | case 'PATH': |
259 | - $source = trim((string) $source); |
|
259 | + $source = trim((string)$source); |
|
260 | 260 | $pattern = '/^([-_\.\/A-Z0-9=&%?~]+)(.*)$/i'; |
261 | 261 | preg_match($pattern, $source, $matches); |
262 | - $result = @ (string) $matches[1]; |
|
262 | + $result = @ (string)$matches[1]; |
|
263 | 263 | break; |
264 | 264 | |
265 | 265 | case 'USERNAME': |
266 | - $result = (string) preg_replace('/[\x00-\x1F\x7F<>"\'%&]/', '', $source); |
|
266 | + $result = (string)preg_replace('/[\x00-\x1F\x7F<>"\'%&]/', '', $source); |
|
267 | 267 | break; |
268 | 268 | |
269 | 269 | case 'WEBURL': |
270 | - $result = (string) $this->process($source); |
|
270 | + $result = (string)$this->process($source); |
|
271 | 271 | // allow only relative, http or https |
272 | 272 | $urlparts = parse_url($result); |
273 | 273 | if (!empty($urlparts['scheme']) |
@@ -282,17 +282,17 @@ discard block |
||
282 | 282 | break; |
283 | 283 | |
284 | 284 | case 'EMAIL': |
285 | - $result = (string) $source; |
|
286 | - if (!filter_var((string) $source, FILTER_VALIDATE_EMAIL)) { |
|
285 | + $result = (string)$source; |
|
286 | + if (!filter_var((string)$source, FILTER_VALIDATE_EMAIL)) { |
|
287 | 287 | $result = ''; |
288 | 288 | } |
289 | 289 | break; |
290 | 290 | |
291 | 291 | case 'IP': |
292 | - $result = (string) $source; |
|
292 | + $result = (string)$source; |
|
293 | 293 | // this may be too restrictive. |
294 | 294 | // Should the FILTER_FLAG_NO_PRIV_RANGE flag be excluded? |
295 | - if (!filter_var((string) $source, FILTER_VALIDATE_IP)) { |
|
295 | + if (!filter_var((string)$source, FILTER_VALIDATE_IP)) { |
|
296 | 296 | $result = ''; |
297 | 297 | } |
298 | 298 | break; |
@@ -425,20 +425,20 @@ discard block |
||
425 | 425 | // reconstruct tag with allowed attributes |
426 | 426 | if (!$isCloseTag) { |
427 | 427 | $attrSet = $this->filterAttr($attrSet); |
428 | - $preTag .= '<' . $tagName; |
|
428 | + $preTag .= '<'.$tagName; |
|
429 | 429 | $attrSetCount = count($attrSet); |
430 | 430 | for ($i = 0; $i < $attrSetCount; ++$i) { |
431 | - $preTag .= ' ' . $attrSet[$i]; |
|
431 | + $preTag .= ' '.$attrSet[$i]; |
|
432 | 432 | } |
433 | 433 | // reformat single tags to XHTML |
434 | - if (strpos($fromTagOpen, "</" . $tagName)) { |
|
434 | + if (strpos($fromTagOpen, "</".$tagName)) { |
|
435 | 435 | $preTag .= '>'; |
436 | 436 | } else { |
437 | 437 | $preTag .= ' />'; |
438 | 438 | } |
439 | 439 | } else { |
440 | 440 | // just the tagname |
441 | - $preTag .= '</' . $tagName . '>'; |
|
441 | + $preTag .= '</'.$tagName.'>'; |
|
442 | 442 | } |
443 | 443 | } |
444 | 444 | // find next tag's start |
@@ -515,13 +515,13 @@ discard block |
||
515 | 515 | if ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod)) { |
516 | 516 | if ($attrSubSet[1]) { |
517 | 517 | // attr has value |
518 | - $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"'; |
|
518 | + $newSet[] = $attrSubSet[0].'="'.$attrSubSet[1].'"'; |
|
519 | 519 | } elseif ($attrSubSet[1] == "0") { |
520 | 520 | // attr has decimal zero as value |
521 | - $newSet[] = $attrSubSet[0] . '="0"'; |
|
521 | + $newSet[] = $attrSubSet[0].'="0"'; |
|
522 | 522 | } else { |
523 | 523 | // reformat single attributes to XHTML |
524 | - $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[0] . '"'; |
|
524 | + $newSet[] = $attrSubSet[0].'="'.$attrSubSet[0].'"'; |
|
525 | 525 | } |
526 | 526 | } |
527 | 527 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | // convert decimal |
545 | 545 | $source = preg_replace_callback( |
546 | 546 | '/&#(\d+);/m', |
547 | - function ($matches) { |
|
547 | + function($matches) { |
|
548 | 548 | return chr($matches[1]); |
549 | 549 | }, |
550 | 550 | $source |
@@ -552,8 +552,8 @@ discard block |
||
552 | 552 | // convert hex notation |
553 | 553 | $source = preg_replace_callback( |
554 | 554 | '/&#x([a-f0-9]+);/mi', |
555 | - function ($matches) { |
|
556 | - return chr('0x' . $matches[1]); |
|
555 | + function($matches) { |
|
556 | + return chr('0x'.$matches[1]); |
|
557 | 557 | }, |
558 | 558 | $source |
559 | 559 | ); |
@@ -595,37 +595,37 @@ discard block |
||
595 | 595 | $name = $input[0]; |
596 | 596 | $type = isset($input[1]) ? $input[1] : 'string'; |
597 | 597 | $default = isset($input[2]) ? |
598 | - (($require && $require==$name) ? '': $input[2]) : ''; |
|
598 | + (($require && $require == $name) ? '' : $input[2]) : ''; |
|
599 | 599 | $trim = isset($input[3]) ? $input[3] : true; |
600 | 600 | $maxlen = isset($input[4]) ? $input[4] : 0; |
601 | 601 | $value = $default; |
602 | 602 | switch ($source) { |
603 | 603 | case 'get': |
604 | 604 | if (isset($_GET[$name])) { |
605 | - $value=$_GET[$name]; |
|
605 | + $value = $_GET[$name]; |
|
606 | 606 | } |
607 | 607 | break; |
608 | 608 | case 'post': |
609 | 609 | if (isset($_POST[$name])) { |
610 | - $value=$_POST[$name]; |
|
610 | + $value = $_POST[$name]; |
|
611 | 611 | } |
612 | 612 | break; |
613 | 613 | case 'cookie': |
614 | 614 | if (isset($_COOKIE[$name])) { |
615 | - $value=$_COOKIE[$name]; |
|
615 | + $value = $_COOKIE[$name]; |
|
616 | 616 | } |
617 | 617 | break; |
618 | 618 | } |
619 | 619 | if ($trim) { |
620 | 620 | $value = trim($value); |
621 | 621 | } |
622 | - if ($maxlen>0) { |
|
622 | + if ($maxlen > 0) { |
|
623 | 623 | if (function_exists('mb_strlen')) { |
624 | - if (mb_strlen($value)>$maxlen) { |
|
625 | - $value=mb_substr($value, 0, $maxlen); |
|
624 | + if (mb_strlen($value) > $maxlen) { |
|
625 | + $value = mb_substr($value, 0, $maxlen); |
|
626 | 626 | } |
627 | 627 | } else { |
628 | - $value=substr($value, 0, $maxlen); |
|
628 | + $value = substr($value, 0, $maxlen); |
|
629 | 629 | } |
630 | 630 | if ($trim) { |
631 | 631 | $value = trim($value); |
@@ -56,8 +56,8 @@ |
||
56 | 56 | $language = 'english'; |
57 | 57 | } |
58 | 58 | } |
59 | - $path = \XoopsBaseConfig::get('root-path') . '/' . ((empty($domain) || 'global' === $domain) ? '' |
|
60 | - : "modules/{$domain}/") . 'language'; |
|
59 | + $path = \XoopsBaseConfig::get('root-path').'/'.((empty($domain) || 'global' === $domain) ? '' |
|
60 | + : "modules/{$domain}/").'language'; |
|
61 | 61 | if (!$ret = static::loadFile("{$path}/{$language}/{$name}.php")) { |
62 | 62 | $ret = static::loadFile("{$path}/english/{$name}.php"); |
63 | 63 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function init() |
41 | 41 | { |
42 | - $this->prefix = $this->module->getVar('dirname') . '_'; |
|
42 | + $this->prefix = $this->module->getVar('dirname').'_'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | protected function prefix($name) |
53 | 53 | { |
54 | - $prefixedName = $this->prefix . $name; |
|
54 | + $prefixedName = $this->prefix.$name; |
|
55 | 55 | |
56 | 56 | return $prefixedName; |
57 | 57 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function setDebug($bool = true) |
92 | 92 | { |
93 | - $this->debug = (bool) $bool; |
|
93 | + $this->debug = (bool)$bool; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -127,6 +127,6 @@ discard block |
||
127 | 127 | if (!is_string($value)) { |
128 | 128 | $value = json_encode($value); |
129 | 129 | } |
130 | - return (string) $value; |
|
130 | + return (string)$value; |
|
131 | 131 | } |
132 | 132 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | **/ |
67 | 67 | public function checkPermission($gperm_name, $gperm_itemid, $trueifadmin = true) |
68 | 68 | { |
69 | - $gperm_itemid = (int) $gperm_itemid; |
|
69 | + $gperm_itemid = (int)$gperm_itemid; |
|
70 | 70 | $gperm_groupid = \Xoops::getInstance()->getUserGroups(); |
71 | 71 | |
72 | 72 | return $this->permissionHandler->checkRight( |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $gperm_itemid, |
75 | 75 | $gperm_groupid, |
76 | 76 | $this->mid, |
77 | - (bool) $trueifadmin |
|
77 | + (bool)$trueifadmin |
|
78 | 78 | ); |
79 | 79 | } |
80 | 80 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | $message = '', |
99 | 99 | $trueifadmin = true |
100 | 100 | ) { |
101 | - $gperm_itemid = (int) $gperm_itemid; |
|
101 | + $gperm_itemid = (int)$gperm_itemid; |
|
102 | 102 | $gperm_groupid = \Xoops::getInstance()->getUserGroups(); |
103 | 103 | $permission = $this->permissionHandler->checkRight( |
104 | 104 | $gperm_name, |
105 | 105 | $gperm_itemid, |
106 | 106 | $gperm_groupid, |
107 | 107 | $this->mid, |
108 | - (bool) $trueifadmin |
|
108 | + (bool)$trueifadmin |
|
109 | 109 | ); |
110 | 110 | if (!$permission) { |
111 | 111 | $helper = Helper::getHelper($this->dirname); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | **/ |
124 | 124 | public function getGroupsForItem($gperm_name, $gperm_itemid) |
125 | 125 | { |
126 | - $gperm_itemid = (int) $gperm_itemid; |
|
126 | + $gperm_itemid = (int)$gperm_itemid; |
|
127 | 127 | return $this->permissionHandler->getGroupIds($gperm_name, $gperm_itemid, $this->mid); |
128 | 128 | } |
129 | 129 | |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | **/ |
139 | 139 | public function savePermissionForItem($gperm_name, $gperm_itemid, $groups) |
140 | 140 | { |
141 | - $gperm_itemid = (int) $gperm_itemid; |
|
141 | + $gperm_itemid = (int)$gperm_itemid; |
|
142 | 142 | foreach ($groups as $index => $group) { |
143 | - $groups[$index] = (int) $group; |
|
143 | + $groups[$index] = (int)$group; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | $result = true; |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function deletePermissionForItem($gperm_name, $gperm_itemid) |
175 | 175 | { |
176 | - $gperm_itemid = (int) $gperm_itemid; |
|
176 | + $gperm_itemid = (int)$gperm_itemid; |
|
177 | 177 | if (!is_array($gperm_name)) { |
178 | - $gperm_name = (array) $gperm_name; |
|
178 | + $gperm_name = (array)$gperm_name; |
|
179 | 179 | } |
180 | 180 | $return = true; |
181 | 181 | foreach ($gperm_name as $pname) { |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | if (empty($name)) { |
212 | 212 | $name = $this->defaultFieldName($gperm_name, $gperm_itemid); |
213 | 213 | } |
214 | - $gperm_itemid = (int) $gperm_itemid; |
|
214 | + $gperm_itemid = (int)$gperm_itemid; |
|
215 | 215 | $value = $this->getGroupsForItem($gperm_name, $gperm_itemid); |
216 | 216 | $element = new SelectGroup( |
217 | 217 | $caption, |
@@ -236,9 +236,9 @@ discard block |
||
236 | 236 | */ |
237 | 237 | public function defaultFieldName($gperm_name, $gperm_itemid) |
238 | 238 | { |
239 | - $gperm_itemid = (int) $gperm_itemid; |
|
240 | - $name = $this->module->getVar('dirname') . '_' . |
|
241 | - $gperm_name . '_' . $gperm_itemid; |
|
239 | + $gperm_itemid = (int)$gperm_itemid; |
|
240 | + $name = $this->module->getVar('dirname').'_'. |
|
241 | + $gperm_name.'_'.$gperm_itemid; |
|
242 | 242 | |
243 | 243 | return $name; |
244 | 244 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return $default; |
104 | 104 | } |
105 | 105 | |
106 | - $this->addLog("Getting config '{$name}' : " . $this->serializeForHelperLog($this->configs[$name])); |
|
106 | + $this->addLog("Getting config '{$name}' : ".$this->serializeForHelperLog($this->configs[$name])); |
|
107 | 107 | |
108 | 108 | return $this->configs[$name]; |
109 | 109 | } |
@@ -183,15 +183,15 @@ discard block |
||
183 | 183 | */ |
184 | 184 | protected function initHandler($name) |
185 | 185 | { |
186 | - $this->addLog('INIT ' . $name . ' HANDLER'); |
|
186 | + $this->addLog('INIT '.$name.' HANDLER'); |
|
187 | 187 | |
188 | 188 | if (!isset($this->handlers[$name])) { |
189 | - $hnd_file = XOOPS_ROOT_PATH . "/modules/{$this->dirname}/class/{$name}.php"; |
|
189 | + $hnd_file = XOOPS_ROOT_PATH."/modules/{$this->dirname}/class/{$name}.php"; |
|
190 | 190 | if (file_exists($hnd_file)) { |
191 | 191 | include_once $hnd_file; |
192 | 192 | } |
193 | 193 | $class = ucfirst(strtolower($this->dirname)) |
194 | - . ucfirst(strtolower($name)) . 'Handler'; |
|
194 | + . ucfirst(strtolower($name)).'Handler'; |
|
195 | 195 | if (class_exists($class)) { |
196 | 196 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
197 | 197 | $this->handlers[$name] = new $class($db); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | */ |
255 | 255 | public function url($url = '') |
256 | 256 | { |
257 | - return XOOPS_URL . '/modules/' . $this->dirname . '/' . $url; |
|
257 | + return XOOPS_URL.'/modules/'.$this->dirname.'/'.$url; |
|
258 | 258 | } |
259 | 259 | |
260 | 260 | /** |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function path($path = '') |
268 | 268 | { |
269 | - return XOOPS_ROOT_PATH . '/modules/' . $this->dirname . '/' . $path; |
|
269 | + return XOOPS_ROOT_PATH.'/modules/'.$this->dirname.'/'.$path; |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function init() |
46 | 46 | { |
47 | - $this->prefix = 'module/' . $this->module->getVar('dirname'); |
|
47 | + $this->prefix = 'module/'.$this->module->getVar('dirname'); |
|
48 | 48 | $this->cache = \Xoops::getInstance()->cache(); |
49 | 49 | } |
50 | 50 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | protected function prefix($name) |
59 | 59 | { |
60 | - return $this->prefix . '/'. $name; |
|
60 | + return $this->prefix.'/'.$name; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -276,10 +276,10 @@ discard block |
||
276 | 276 | */ |
277 | 277 | public function addConfigError($value = '') |
278 | 278 | { |
279 | - $path = XOOPS_URL . '/Frameworks/moduleclasses/icons/16/'; |
|
279 | + $path = XOOPS_URL.'/Frameworks/moduleclasses/icons/16/'; |
|
280 | 280 | $line = ""; |
281 | 281 | $line .= "<span style='color : red; font-weight : bold;'>"; |
282 | - $line .= "<img src='" . $path . "0.png' >"; |
|
282 | + $line .= "<img src='".$path."0.png' >"; |
|
283 | 283 | $line .= $value; |
284 | 284 | $line .= "</span>"; |
285 | 285 | $value = $line; |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function addConfigAccept($value = '') |
299 | 299 | { |
300 | - $path = XOOPS_URL . '/Frameworks/moduleclasses/icons/16/'; |
|
300 | + $path = XOOPS_URL.'/Frameworks/moduleclasses/icons/16/'; |
|
301 | 301 | $line = ""; |
302 | 302 | $line .= "<span style='color : green;'>"; |
303 | - $line .= "<img src='" . $path . "1.png' >"; |
|
303 | + $line .= "<img src='".$path."1.png' >"; |
|
304 | 304 | $line .= $value; |
305 | 305 | $line .= "</span>"; |
306 | 306 | $value = $line; |
@@ -318,10 +318,10 @@ discard block |
||
318 | 318 | */ |
319 | 319 | public function addConfigWarning($value = '') |
320 | 320 | { |
321 | - $path = XOOPS_URL . '/Frameworks/moduleclasses/icons/16/'; |
|
321 | + $path = XOOPS_URL.'/Frameworks/moduleclasses/icons/16/'; |
|
322 | 322 | $line = ""; |
323 | 323 | $line .= "<span style='color : orange; font-weight : bold;'>"; |
324 | - $line .= "<img src='" . $path . "warning.png' >"; |
|
324 | + $line .= "<img src='".$path."warning.png' >"; |
|
325 | 325 | $line .= $value; |
326 | 326 | $line .= "</span>"; |
327 | 327 | $value = $line; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | } else { |
404 | 404 | $path = '../../Frameworks/moduleclasses/icons/32/'; |
405 | 405 | |
406 | - return($path . $image); |
|
406 | + return($path.$image); |
|
407 | 407 | } |
408 | 408 | } |
409 | 409 | |
@@ -439,12 +439,12 @@ discard block |
||
439 | 439 | } |
440 | 440 | |
441 | 441 | if (static::isXng()) { |
442 | - $path = '/media/xoops/images/icons/' . $path; |
|
442 | + $path = '/media/xoops/images/icons/'.$path; |
|
443 | 443 | } else { |
444 | - $path = '/Frameworks/moduleclasses/icons/' . $path; |
|
444 | + $path = '/Frameworks/moduleclasses/icons/'.$path; |
|
445 | 445 | } |
446 | 446 | |
447 | - return(XOOPS_URL . $path . $name); |
|
447 | + return(XOOPS_URL.$path.$name); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | /** |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | public static function getString($name, $default = '', $hash = 'default', $mask = 0) |
235 | 235 | { |
236 | 236 | // Cast to string, in case static::MASK_ALLOW_RAW was specified for mask |
237 | - return (string) static::getVar($name, $default, $hash, 'string', $mask); |
|
237 | + return (string)static::getVar($name, $default, $hash, 'string', $mask); |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | */ |
263 | 263 | public static function getText($name, $default = '', $hash = 'default') |
264 | 264 | { |
265 | - return (string) static::getVar($name, $default, $hash, 'string', static::MASK_ALLOW_RAW); |
|
265 | + return (string)static::getVar($name, $default, $hash, 'string', static::MASK_ALLOW_RAW); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | */ |
277 | 277 | public static function getUrl($name, $default = '', $hash = 'default') |
278 | 278 | { |
279 | - return (string) static::getVar($name, $default, $hash, 'weburl'); |
|
279 | + return (string)static::getVar($name, $default, $hash, 'weburl'); |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | */ |
291 | 291 | public static function getPath($name, $default = '', $hash = 'default') |
292 | 292 | { |
293 | - return (string) static::getVar($name, $default, $hash, 'path'); |
|
293 | + return (string)static::getVar($name, $default, $hash, 'path'); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | /** |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public static function getEmail($name, $default = '', $hash = 'default') |
306 | 306 | { |
307 | - $ret = (string) static::getVar($name, $default, $hash, 'email'); |
|
307 | + $ret = (string)static::getVar($name, $default, $hash, 'email'); |
|
308 | 308 | return empty($ret) ? $default : $ret; |
309 | 309 | } |
310 | 310 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | */ |
320 | 320 | public static function getIP($name, $default = '', $hash = 'default') |
321 | 321 | { |
322 | - $ret = (string) static::getVar($name, $default, $hash, 'ip'); |
|
322 | + $ret = (string)static::getVar($name, $default, $hash, 'ip'); |
|
323 | 323 | return empty($ret) ? $default : $ret; |
324 | 324 | } |
325 | 325 |