@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $urlstr = "$urlstr&{$var['name']}={$var['value']}"; |
69 | 69 | } |
70 | 70 | if (strlen($urlstr) > 0) { |
71 | - $urlstr = '?' . substr($urlstr, 1); |
|
71 | + $urlstr = '?'.substr($urlstr, 1); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | } |
91 | 91 | // Now, return entire link URL :-) |
92 | 92 | if (empty($module)) { |
93 | - echo XOOPS_URL . "/{$page}" . $urlstr; |
|
93 | + echo XOOPS_URL."/{$page}".$urlstr; |
|
94 | 94 | } else { |
95 | - echo XOOPS_URL . "/modules/{$module}/{$page}" . $urlstr; |
|
95 | + echo XOOPS_URL."/modules/{$module}/{$page}".$urlstr; |
|
96 | 96 | } |
97 | 97 | } |
@@ -73,13 +73,13 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | //$output .= "\$_smarty_tpl_vars = \$this->_tpl_vars;\n"; |
76 | - $_params = "array('smarty_include_tpl_file' => " . $include_file . ", 'smarty_include_vars' => array(" . implode(',', (array)$arg_list) . '))'; |
|
76 | + $_params = "array('smarty_include_tpl_file' => ".$include_file.", 'smarty_include_vars' => array(".implode(',', (array)$arg_list).'))'; |
|
77 | 77 | $output .= "\$this->_smarty_include($_params);\n"; |
78 | 78 | //"\$this->_tpl_vars = \$_smarty_tpl_vars;\n" . |
79 | 79 | //"unset(\$_smarty_tpl_vars);\n"; |
80 | 80 | |
81 | 81 | if (isset($assign_var)) { |
82 | - $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n"; |
|
82 | + $output .= "\$this->assign(".$assign_var.", ob_get_contents()); ob_end_clean();\n"; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | //$output .= ''; |
@@ -28,14 +28,14 @@ |
||
28 | 28 | // if ( $icons == '' ) $icons = 'default'; |
29 | 29 | |
30 | 30 | if (file_exists($xoops->path('Frameworks/moduleclasses/icons/bookmarks/index.html'))) { |
31 | - $url = $xoops->url('Frameworks/moduleclasses/icons/bookmarks/' . $argStr); |
|
31 | + $url = $xoops->url('Frameworks/moduleclasses/icons/bookmarks/'.$argStr); |
|
32 | 32 | } else { |
33 | - if (file_exists($xoops->path('modules/system/images/icons/default/' . $argStr))) { |
|
34 | - $url = $xoops->url('modules/system/images/icons/default/' . $argStr); |
|
33 | + if (file_exists($xoops->path('modules/system/images/icons/default/'.$argStr))) { |
|
34 | + $url = $xoops->url('modules/system/images/icons/default/'.$argStr); |
|
35 | 35 | } else { |
36 | 36 | $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png'); |
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | - return "\necho '" . addslashes($url) . "';"; |
|
40 | + return "\necho '".addslashes($url)."';"; |
|
41 | 41 | } |
@@ -25,14 +25,14 @@ |
||
25 | 25 | global $xoops, $xoTheme; |
26 | 26 | |
27 | 27 | if (file_exists($xoops->path('Frameworks/moduleclasses/icons/32/index.html'))) { |
28 | - $url = $xoops->url('Frameworks/moduleclasses/icons/32/' . $argStr); |
|
28 | + $url = $xoops->url('Frameworks/moduleclasses/icons/32/'.$argStr); |
|
29 | 29 | } else { |
30 | - if (file_exists($xoops->path('modules/system/images/icons/default/' . $argStr))) { |
|
31 | - $url = $xoops->url('modules/system/images/icons/default/' . $argStr); |
|
30 | + if (file_exists($xoops->path('modules/system/images/icons/default/'.$argStr))) { |
|
31 | + $url = $xoops->url('modules/system/images/icons/default/'.$argStr); |
|
32 | 32 | } else { |
33 | 33 | $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png'); |
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
37 | - return "\necho '" . addslashes($url) . "';"; |
|
37 | + return "\necho '".addslashes($url)."';"; |
|
38 | 38 | } |
@@ -126,10 +126,10 @@ |
||
126 | 126 | break; |
127 | 127 | } |
128 | 128 | // First, check for an overloaded version within the theme folder |
129 | - $filepath = $directory . "/{$theme}/modules/{$module}/{$path}{$tpl_name}"; |
|
129 | + $filepath = $directory."/{$theme}/modules/{$module}/{$path}{$tpl_name}"; |
|
130 | 130 | if (!file_exists($filepath)) { |
131 | 131 | // If no custom version exists, get the tpl from its default location |
132 | - $filepath = XOOPS_ROOT_PATH . "/modules/{$module}/templates/{$path}{$tpl_name}"; |
|
132 | + $filepath = XOOPS_ROOT_PATH."/modules/{$module}/templates/{$path}{$tpl_name}"; |
|
133 | 133 | if (!file_exists($filepath)) { |
134 | 134 | return $cache[$tpl_name] = $tplobj; |
135 | 135 | } |
@@ -38,5 +38,5 @@ |
||
38 | 38 | global $xoops, $xoTheme; |
39 | 39 | $path = (isset($xoTheme) && is_object($xoTheme)) ? $xoTheme->resourcePath($argStr) : $argStr; |
40 | 40 | |
41 | - return "\necho '" . addslashes($xoops->url($path)) . "';"; |
|
41 | + return "\necho '".addslashes($xoops->url($path))."';"; |
|
42 | 42 | } |
@@ -36,14 +36,14 @@ |
||
36 | 36 | |
37 | 37 | //TODO Remove this hardocded strings |
38 | 38 | if ($currentPage > 1) { |
39 | - $str .= '<a href="' . $xoops->url(str_replace('%s', $offset - $pageSize, $url)) . '">Previous</a>'; |
|
39 | + $str .= '<a href="'.$xoops->url(str_replace('%s', $offset - $pageSize, $url)).'">Previous</a>'; |
|
40 | 40 | } |
41 | 41 | for ($i = $minPage; $i <= $maxPage; ++$i) { |
42 | 42 | $tgt = htmlspecialchars($xoops->url(str_replace('%s', ($i - 1) * $pageSize, $url)), ENT_QUOTES); |
43 | 43 | $str .= "<a href='$tgt'>$i</a>"; |
44 | 44 | } |
45 | 45 | if ($currentPage < $lastPage) { |
46 | - $str .= '<a href="' . $xoops->url(str_replace('%s', $offset + $pageSize, $url)) . '">Next</a>'; |
|
46 | + $str .= '<a href="'.$xoops->url(str_replace('%s', $offset + $pageSize, $url)).'">Next</a>'; |
|
47 | 47 | } |
48 | 48 | $class = @!empty($class) ? htmlspecialchars($class, ENT_QUOTES) : 'pagenav'; |
49 | 49 |
@@ -27,29 +27,29 @@ |
||
27 | 27 | { |
28 | 28 | $_replace = array("\n" => '<i>\n</i>', "\r" => '<i>\r</i>', "\t" => '<i>\t</i>'); |
29 | 29 | if (is_array($var)) { |
30 | - $results = '<b>Array (' . count($var) . ')</b>'; |
|
30 | + $results = '<b>Array ('.count($var).')</b>'; |
|
31 | 31 | foreach ($var as $curr_key => $curr_val) { |
32 | 32 | $return = smarty_modifier_debug_print_var($curr_val, $depth + 1, $length); |
33 | - $results .= '<br>' . str_repeat(' ', $depth * 2) . '<b>' . strtr($curr_key, $_replace) . "</b> => {$return}"; |
|
33 | + $results .= '<br>'.str_repeat(' ', $depth * 2).'<b>'.strtr($curr_key, $_replace)."</b> => {$return}"; |
|
34 | 34 | } |
35 | 35 | } elseif (is_object($var)) { |
36 | 36 | $object_vars = get_object_vars($var); |
37 | - $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>'; |
|
37 | + $results = '<b>'.get_class($var).' Object ('.count($object_vars).')</b>'; |
|
38 | 38 | foreach ($object_vars as $curr_key => $curr_val) { |
39 | 39 | if (is_object($curr_val)) { |
40 | - $return = '[object ' . get_class($curr_val) . ']'; |
|
40 | + $return = '[object '.get_class($curr_val).']'; |
|
41 | 41 | } else { |
42 | 42 | $return = smarty_modifier_debug_print_var($curr_val, $depth + 1, $length); |
43 | 43 | } |
44 | - $results .= '<br>' . str_repeat(' ', $depth * 2) . "<b>{$curr_key}</b> => {$return}"; |
|
44 | + $results .= '<br>'.str_repeat(' ', $depth * 2)."<b>{$curr_key}</b> => {$return}"; |
|
45 | 45 | } |
46 | 46 | } elseif (is_resource($var)) { |
47 | - $results = '<i>' . (string)$var . '</i>'; |
|
47 | + $results = '<i>'.(string)$var.'</i>'; |
|
48 | 48 | } elseif (empty($var) && $var != '0') { |
49 | 49 | $results = '<i>empty</i>'; |
50 | 50 | } else { |
51 | 51 | if (strlen($var) > $length) { |
52 | - $results = substr($var, 0, $length - 3) . '...'; |
|
52 | + $results = substr($var, 0, $length - 3).'...'; |
|
53 | 53 | } else { |
54 | 54 | $results = $var; |
55 | 55 | } |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | */ |
24 | 24 | function smarty_modifier_truncateHtml($string, $count = 80, $etc = '…') |
25 | 25 | { |
26 | - if($count <= 0) { |
|
26 | + if ($count <= 0) { |
|
27 | 27 | return ''; |
28 | 28 | } |
29 | 29 | return BaseStringHelper::truncateWords($string, $count, $etc, true); |
30 | 30 | } |
31 | 31 | |
32 | 32 | if (!class_exists('\HTMLPurifier_Bootstrap', false)) { |
33 | - require_once XOOPS_PATH . '/modules/protector/library/HTMLPurifier/Bootstrap.php'; |
|
33 | + require_once XOOPS_PATH.'/modules/protector/library/HTMLPurifier/Bootstrap.php'; |
|
34 | 34 | HTMLPurifier_Bootstrap::registerAutoload(); |
35 | 35 | } |
36 | 36 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if (mb_strlen($string, $encoding) > $length) { |
164 | - return rtrim(mb_substr($string, 0, $length, $encoding)) . $suffix; |
|
164 | + return rtrim(mb_substr($string, 0, $length, $encoding)).$suffix; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | return $string; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | $words = preg_split('/(\s+)/u', trim($string), null, PREG_SPLIT_DELIM_CAPTURE); |
188 | 188 | if (count($words) / 2 > $count) { |
189 | - return implode('', array_slice($words, 0, ($count * 2) - 1)) . $suffix; |
|
189 | + return implode('', array_slice($words, 0, ($count * 2) - 1)).$suffix; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | return $string; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | } elseif ($token instanceof \HTMLPurifier_Token_Text && $totalCount <= $count) { //Text |
221 | 221 | if (false === $encoding) { |
222 | 222 | preg_match('/^(\s*)/um', $token->data, $prefixSpace) ?: $prefixSpace = array('', ''); |
223 | - $token->data = $prefixSpace[1] . self::truncateWords(ltrim($token->data), $count - $totalCount, ''); |
|
223 | + $token->data = $prefixSpace[1].self::truncateWords(ltrim($token->data), $count - $totalCount, ''); |
|
224 | 224 | $currentCount = self::countWords($token->data); |
225 | 225 | } else { |
226 | 226 | $token->data = self::truncate($token->data, $count - $totalCount, '', $encoding); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | $context = new \HTMLPurifier_Context(); |
251 | 251 | $generator = new \HTMLPurifier_Generator($config, $context); |
252 | - return $generator->generateFromTokens($truncated) . ($totalCount >= $count ? $suffix : ''); |
|
252 | + return $generator->generateFromTokens($truncated).($totalCount >= $count ? $suffix : ''); |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | if ($trim === true) { |
324 | 324 | $trim = 'trim'; |
325 | 325 | } elseif (!is_callable($trim)) { |
326 | - $trim = function ($v) use ($trim) { |
|
326 | + $trim = function($v) use ($trim) { |
|
327 | 327 | return trim($v, $trim); |
328 | 328 | }; |
329 | 329 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | } |
332 | 332 | if ($skipEmpty) { |
333 | 333 | // Wrapped with array_values to make array keys sequential after empty values removing |
334 | - $result = array_values(array_filter($result, function ($value) { |
|
334 | + $result = array_values(array_filter($result, function($value) { |
|
335 | 335 | return $value !== ''; |
336 | 336 | })); |
337 | 337 | } |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | |
473 | 473 | $pattern = strtr(preg_quote($pattern, '#'), $replacements); |
474 | - $pattern = '#^' . $pattern . '$#us'; |
|
474 | + $pattern = '#^'.$pattern.'$#us'; |
|
475 | 475 | |
476 | 476 | if (isset($options['caseSensitive']) && !$options['caseSensitive']) { |
477 | 477 | $pattern .= 'i'; |