@@ -468,7 +468,7 @@ |
||
468 | 468 | * @return void |
469 | 469 | * |
470 | 470 | * @deprecated |
471 | - */ |
|
471 | + */ |
|
472 | 472 | public function __call($method, $args) |
473 | 473 | { |
474 | 474 | $this->deprecatedMessage(); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // if an error occurs before a locale is established, |
102 | 102 | // we still need messages, so check and deal with it |
103 | 103 | |
104 | - $msg = ': ' . sprintf( |
|
104 | + $msg = ': '.sprintf( |
|
105 | 105 | (class_exists('\XoopsLocale', false) ? \XoopsLocale::EF_LOGGER_FILELINE : "%s in file %s line %s"), |
106 | 106 | $this->sanitizePath($errorString), |
107 | 107 | $this->sanitizePath($errorFile), |
@@ -110,23 +110,23 @@ discard block |
||
110 | 110 | |
111 | 111 | switch ($errorNumber) { |
112 | 112 | case E_USER_NOTICE: |
113 | - $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_ERROR : '*Error:') . $msg; |
|
113 | + $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_ERROR : '*Error:').$msg; |
|
114 | 114 | $this->log(LogLevel::NOTICE, $msg); |
115 | 115 | break; |
116 | 116 | case E_NOTICE: |
117 | - $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_NOTICE : '*Notice:') . $msg; |
|
117 | + $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_NOTICE : '*Notice:').$msg; |
|
118 | 118 | $this->log(LogLevel::NOTICE, $msg); |
119 | 119 | break; |
120 | 120 | case E_WARNING: |
121 | - $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_WARNING : '*Warning:') . $msg; |
|
121 | + $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_WARNING : '*Warning:').$msg; |
|
122 | 122 | $this->log(LogLevel::WARNING, $msg); |
123 | 123 | break; |
124 | 124 | case E_STRICT: |
125 | - $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_STRICT : '*Strict:') . $msg; |
|
125 | + $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_STRICT : '*Strict:').$msg; |
|
126 | 126 | $this->log(LogLevel::WARNING, $msg); |
127 | 127 | break; |
128 | 128 | case E_USER_ERROR: |
129 | - $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_ERROR : '*Error:') . $msg; |
|
129 | + $msg = (class_exists('\XoopsLocale', false) ? \XoopsLocale::E_LOGGER_ERROR : '*Error:').$msg; |
|
130 | 130 | @$this->log(LogLevel::CRITICAL, $msg); |
131 | 131 | break; |
132 | 132 | case E_USER_DEPRECATED: |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | \Xoops::getInstance()->events()->triggerEvent('core.deprecated', array($msg)); |
135 | 135 | break; |
136 | 136 | default: |
137 | - $msg = $this->getReadableErrorType($errorNumber) . $msg; |
|
137 | + $msg = $this->getReadableErrorType($errorNumber).$msg; |
|
138 | 138 | $this->log(LogLevel::ERROR, $msg); |
139 | 139 | break; |
140 | 140 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | } else { |
160 | - echo "<div style='color:#f0f0f0;background-color:#f0f0f0'>" . _XOOPS_FATAL_BACKTRACE . ":<br />"; |
|
160 | + echo "<div style='color:#f0f0f0;background-color:#f0f0f0'>"._XOOPS_FATAL_BACKTRACE.":<br />"; |
|
161 | 161 | foreach ($trace as $step) { |
162 | 162 | if (isset($step['file'])) { |
163 | 163 | printf("%s (%d)\n<br />", $this->sanitizePath($step['file']), $step['line']); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | */ |
240 | 240 | private function reportFatalError($msg) |
241 | 241 | { |
242 | - $msg=$this->sanitizePath($msg); |
|
242 | + $msg = $this->sanitizePath($msg); |
|
243 | 243 | if ('cli' === php_sapi_name()) { |
244 | 244 | fprintf(STDERR, "\nError : %s\n", $msg); |
245 | 245 | } else { |
@@ -262,18 +262,18 @@ discard block |
||
262 | 262 | public function sanitizePath($message) |
263 | 263 | { |
264 | 264 | $cleaners = [ |
265 | - ['\\', '/',], |
|
266 | - [\XoopsBaseConfig::get('var-path'), 'VAR',], |
|
267 | - [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('var-path'))), 'VAR',], |
|
268 | - [\XoopsBaseConfig::get('lib-path'), 'LIB',], |
|
269 | - [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('lib-path'))), 'LIB',], |
|
270 | - [\XoopsBaseConfig::get('root-path'), 'ROOT',], |
|
271 | - [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('root-path'))), 'ROOT',], |
|
272 | - [\XoopsBaseConfig::get('db-name') . '.', '',], |
|
273 | - [\XoopsBaseConfig::get('db-name'), '',], |
|
274 | - [\XoopsBaseConfig::get('db-prefix') . '_', '',], |
|
275 | - [\XoopsBaseConfig::get('db-user'), '***',], |
|
276 | - [\XoopsBaseConfig::get('db-pass'), '***',], |
|
265 | + ['\\', '/', ], |
|
266 | + [\XoopsBaseConfig::get('var-path'), 'VAR', ], |
|
267 | + [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('var-path'))), 'VAR', ], |
|
268 | + [\XoopsBaseConfig::get('lib-path'), 'LIB', ], |
|
269 | + [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('lib-path'))), 'LIB', ], |
|
270 | + [\XoopsBaseConfig::get('root-path'), 'ROOT', ], |
|
271 | + [str_replace('\\', '/', realpath(\XoopsBaseConfig::get('root-path'))), 'ROOT', ], |
|
272 | + [\XoopsBaseConfig::get('db-name').'.', '', ], |
|
273 | + [\XoopsBaseConfig::get('db-name'), '', ], |
|
274 | + [\XoopsBaseConfig::get('db-prefix').'_', '', ], |
|
275 | + [\XoopsBaseConfig::get('db-user'), '***', ], |
|
276 | + [\XoopsBaseConfig::get('db-pass'), '***', ], |
|
277 | 277 | ]; |
278 | 278 | $stringsToClean = array_column($cleaners, 0); |
279 | 279 | $replacementStings = array_column($cleaners, 1); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | { |
479 | 479 | $this->deprecatedMessage(); |
480 | 480 | // legacy compatibility: turn off logger display for $xoopsLogger->activated = false; usage |
481 | - if ($var==='activated' && !$val) { |
|
481 | + if ($var === 'activated' && !$val) { |
|
482 | 482 | $this->quiet(); |
483 | 483 | } |
484 | 484 |
@@ -410,13 +410,13 @@ discard block |
||
410 | 410 | $this->savedFileName = $this->targetFileName; |
411 | 411 | } else { |
412 | 412 | if (isset($this->prefix)) { |
413 | - $this->savedFileName = uniqid($this->prefix) . '.' . strtolower($matched[1]); |
|
413 | + $this->savedFileName = uniqid($this->prefix).'.'.strtolower($matched[1]); |
|
414 | 414 | } else { |
415 | 415 | $this->savedFileName = strtolower($this->mediaName); |
416 | 416 | } |
417 | 417 | } |
418 | 418 | |
419 | - $this->savedDestination = $this->uploadDir . '/' . $this->savedFileName; |
|
419 | + $this->savedDestination = $this->uploadDir.'/'.$this->savedFileName; |
|
420 | 420 | if (!move_uploaded_file($this->mediaTmpName, $this->savedDestination)) { |
421 | 421 | $this->setErrors(sprintf(\XoopsLocale::EF_FILE_NOT_SAVED_TO, $this->savedDestination)); |
422 | 422 | return false; |
@@ -554,8 +554,8 @@ discard block |
||
554 | 554 | $patterns = array(); |
555 | 555 | $replaces = array(); |
556 | 556 | foreach ($this->extensionsToBeSanitized as $ext) { |
557 | - $patterns[] = "/\." . preg_quote($ext) . "\./i"; |
|
558 | - $replaces[] = "_" . $ext . "."; |
|
557 | + $patterns[] = "/\.".preg_quote($ext)."\./i"; |
|
558 | + $replaces[] = "_".$ext."."; |
|
559 | 559 | } |
560 | 560 | $this->mediaName = preg_replace($patterns, $replaces, $this->mediaName); |
561 | 561 | } |
@@ -587,9 +587,9 @@ discard block |
||
587 | 587 | $ret = ''; |
588 | 588 | if (count($this->errors) > 0) { |
589 | 589 | $ret = '<h4>' |
590 | - . sprintf(\XoopsLocale::EF_ERRORS_RETURNED_WHILE_UPLOADING_FILE, $this->mediaName) . '</h4>'; |
|
590 | + . sprintf(\XoopsLocale::EF_ERRORS_RETURNED_WHILE_UPLOADING_FILE, $this->mediaName).'</h4>'; |
|
591 | 591 | foreach ($this->errors as $error) { |
592 | - $ret .= $error . '<br />'; |
|
592 | + $ret .= $error.'<br />'; |
|
593 | 593 | } |
594 | 594 | } |
595 | 595 | return $ret; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | // Try to get it from the $_SERVER array first |
202 | - if ($res = $this->getEnv('HTTP_' . strtoupper(str_replace('-', '_', $name)))) { |
|
202 | + if ($res = $this->getEnv('HTTP_'.strtoupper(str_replace('-', '_', $name)))) { |
|
203 | 203 | return $res; |
204 | 204 | } |
205 | 205 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function getHost() |
233 | 233 | { |
234 | - return $this->getEnv('HTTP_HOST') ? (string) $this->getEnv('HTTP_HOST') : 'localhost'; |
|
234 | + return $this->getEnv('HTTP_HOST') ? (string)$this->getEnv('HTTP_HOST') : 'localhost'; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | // IIS |
246 | 246 | $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; |
247 | 247 | if (!empty($_SERVER['QUERY_STRING'])) { |
248 | - $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
248 | + $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
249 | 249 | } |
250 | 250 | return $_SERVER['REQUEST_URI']; |
251 | 251 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | public function getDomain() |
283 | 283 | { |
284 | 284 | $host = $this->getHost(); |
285 | - $domain = \Xoops::getInstance()->getBaseDomain($host); |
|
285 | + $domain = \Xoops::getInstance()->getBaseDomain($host); |
|
286 | 286 | return is_null($domain) ? $host : $domain; |
287 | 287 | } |
288 | 288 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | if (empty($regDom) || empty($fullDom)) { |
300 | 300 | return ''; |
301 | 301 | } |
302 | - $regPattern = '/' . $regDom . '$/'; |
|
302 | + $regPattern = '/'.$regDom.'$/'; |
|
303 | 303 | $subdomain = preg_replace($regPattern, '', $fullDom); |
304 | 304 | $subdomain = preg_replace('/\.$/', '', $subdomain); |
305 | 305 | return empty($subdomain) ? '' : $subdomain; |
@@ -354,12 +354,12 @@ discard block |
||
354 | 354 | */ |
355 | 355 | public function getUrl() |
356 | 356 | { |
357 | - $url = $this->getScheme() . "://" . $this->getHost(); |
|
357 | + $url = $this->getScheme()."://".$this->getHost(); |
|
358 | 358 | $port = $this->getEnv('SERVER_PORT'); |
359 | 359 | if (80 != $port) { |
360 | 360 | $url .= ":{$port}"; |
361 | 361 | } |
362 | - return $url . $this->getUri(); |
|
362 | + return $url.$this->getUri(); |
|
363 | 363 | } |
364 | 364 | |
365 | 365 | /** |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | if (is_null($val)) { |
437 | 437 | return $default; |
438 | 438 | } else { |
439 | - return '.' . $val; |
|
439 | + return '.'.$val; |
|
440 | 440 | } |
441 | 441 | break; |
442 | 442 | } |
@@ -512,12 +512,12 @@ discard block |
||
512 | 512 | protected function detectByEnv($detect) |
513 | 513 | { |
514 | 514 | if (isset($detect['value'])) { |
515 | - return (bool) $this->getEnv($detect['env']) == $detect['value']; |
|
515 | + return (bool)$this->getEnv($detect['env']) == $detect['value']; |
|
516 | 516 | } elseif (isset($detect['pattern'])) { |
517 | - return (bool) preg_match($detect['pattern'], $this->getEnv($detect['env'])); |
|
517 | + return (bool)preg_match($detect['pattern'], $this->getEnv($detect['env'])); |
|
518 | 518 | } elseif (isset($detect['options'])) { |
519 | - $pattern = '/' . implode('|', $detect['options']) . '/i'; |
|
520 | - return (bool) preg_match($pattern, $this->getEnv($detect['env'])); |
|
519 | + $pattern = '/'.implode('|', $detect['options']).'/i'; |
|
520 | + return (bool)preg_match($pattern, $this->getEnv($detect['env'])); |
|
521 | 521 | } |
522 | 522 | return false; // can't match a broken rule |
523 | 523 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | if (!isset($mt[1])) { |
619 | 619 | $mt[1] = 1.0; |
620 | 620 | } |
621 | - $types[trim($mt[0])] = (float) $mt[1]; |
|
621 | + $types[trim($mt[0])] = (float)$mt[1]; |
|
622 | 622 | } |
623 | 623 | |
624 | 624 | // sort list based on value |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | if (!isset($l[1])) { |
648 | 648 | $l[1] = 1.0; |
649 | 649 | } |
650 | - $languages[trim($l[0])] = (float) $l[1]; |
|
650 | + $languages[trim($l[0])] = (float)$l[1]; |
|
651 | 651 | } |
652 | 652 | |
653 | 653 | // sort list based on value |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function assign_by_ref($tpl_var, &$value) |
63 | 63 | { |
64 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
64 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
65 | 65 | $this->assignByRef($tpl_var, $value); |
66 | 66 | } |
67 | 67 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function append_by_ref($tpl_var, &$value, $merge = false) |
76 | 76 | { |
77 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
77 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
78 | 78 | $this->appendByRef($tpl_var, $value, $merge); |
79 | 79 | } |
80 | 80 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function clear_assign($tpl_var) |
87 | 87 | { |
88 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
88 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
89 | 89 | $this->clearAssign($tpl_var); |
90 | 90 | } |
91 | 91 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null) |
101 | 101 | { |
102 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
102 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
103 | 103 | $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs); |
104 | 104 | } |
105 | 105 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function unregister_function($function) |
112 | 112 | { |
113 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
113 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
114 | 114 | $this->unregisterPlugin('function', $function); |
115 | 115 | } |
116 | 116 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) |
130 | 130 | { |
131 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
131 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
132 | 132 | settype($allowed, 'array'); |
133 | 133 | settype($smarty_args, 'boolean'); |
134 | 134 | $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function unregister_object($object) |
143 | 143 | { |
144 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
144 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
145 | 145 | $this->unregisterObject($object); |
146 | 146 | } |
147 | 147 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null) |
157 | 157 | { |
158 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
158 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
159 | 159 | $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs); |
160 | 160 | } |
161 | 161 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function unregister_block($block) |
168 | 168 | { |
169 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
169 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
170 | 170 | $this->unregisterPlugin('block', $block); |
171 | 171 | } |
172 | 172 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function register_compiler_function($function, $function_impl, $cacheable = true) |
181 | 181 | { |
182 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
182 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
183 | 183 | $this->registerPlugin('compiler', $function, $function_impl, $cacheable); |
184 | 184 | } |
185 | 185 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | */ |
191 | 191 | public function unregister_compiler_function($function) |
192 | 192 | { |
193 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
193 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
194 | 194 | $this->unregisterPlugin('compiler', $function); |
195 | 195 | } |
196 | 196 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function register_modifier($modifier, $modifier_impl) |
204 | 204 | { |
205 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
205 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
206 | 206 | $this->registerPlugin('modifier', $modifier, $modifier_impl); |
207 | 207 | } |
208 | 208 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public function unregister_modifier($modifier) |
215 | 215 | { |
216 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
216 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
217 | 217 | $this->unregisterPlugin('modifier', $modifier); |
218 | 218 | } |
219 | 219 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | public function register_resource($type, $functions) |
227 | 227 | { |
228 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
228 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
229 | 229 | $this->registerResource($type, $functions); |
230 | 230 | } |
231 | 231 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | public function unregister_resource($type) |
238 | 238 | { |
239 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
239 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
240 | 240 | $this->unregisterResource($type); |
241 | 241 | } |
242 | 242 | |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function register_prefilter($function) |
250 | 250 | { |
251 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
251 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
252 | 252 | $this->registerFilter('pre', $function); |
253 | 253 | } |
254 | 254 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | public function unregister_prefilter($function) |
261 | 261 | { |
262 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
262 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
263 | 263 | $this->unregisterFilter('pre', $function); |
264 | 264 | } |
265 | 265 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public function register_postfilter($function) |
273 | 273 | { |
274 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
274 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
275 | 275 | $this->registerFilter('post', $function); |
276 | 276 | } |
277 | 277 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | */ |
283 | 283 | public function unregister_postfilter($function) |
284 | 284 | { |
285 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
285 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
286 | 286 | $this->unregisterFilter('post', $function); |
287 | 287 | } |
288 | 288 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | public function register_outputfilter($function) |
296 | 296 | { |
297 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
297 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
298 | 298 | $this->registerFilter('output', $function); |
299 | 299 | } |
300 | 300 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public function unregister_outputfilter($function) |
307 | 307 | { |
308 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
308 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
309 | 309 | $this->unregisterFilter('output', $function); |
310 | 310 | } |
311 | 311 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | */ |
318 | 318 | public function load_filter($type, $name) |
319 | 319 | { |
320 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
320 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
321 | 321 | $this->loadFilter($type, $name); |
322 | 322 | } |
323 | 323 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | */ |
334 | 334 | public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) |
335 | 335 | { |
336 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
336 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
337 | 337 | return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time); |
338 | 338 | } |
339 | 339 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | */ |
347 | 347 | public function clear_all_cache($exp_time = null) |
348 | 348 | { |
349 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
349 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
350 | 350 | return $this->clearCache(null, null, null, $exp_time); |
351 | 351 | } |
352 | 352 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | public function is_cached($tpl_file, $cache_id = null, $compile_id = null) |
363 | 363 | { |
364 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
364 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
365 | 365 | return $this->isCached($tpl_file, $cache_id, $compile_id); |
366 | 366 | } |
367 | 367 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | */ |
371 | 371 | public function clear_all_assign() |
372 | 372 | { |
373 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
373 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
374 | 374 | $this->clearAllAssign(); |
375 | 375 | } |
376 | 376 | |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | */ |
388 | 388 | public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) |
389 | 389 | { |
390 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
390 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
391 | 391 | return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time); |
392 | 392 | } |
393 | 393 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | */ |
401 | 401 | public function template_exists($tpl_file) |
402 | 402 | { |
403 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
403 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
404 | 404 | return $this->templateExists($tpl_file); |
405 | 405 | } |
406 | 406 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | */ |
414 | 414 | public function get_template_vars($name = null) |
415 | 415 | { |
416 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
416 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
417 | 417 | return $this->getTemplateVars($name); |
418 | 418 | } |
419 | 419 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | */ |
427 | 427 | public function get_config_vars($name = null) |
428 | 428 | { |
429 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
429 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
430 | 430 | return $this->getConfigVars($name); |
431 | 431 | } |
432 | 432 | |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | */ |
440 | 440 | public function config_load($file, $section = null, $scope = 'global') |
441 | 441 | { |
442 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
442 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
443 | 443 | $this->configLoad($file, $section, $scope); |
444 | 444 | } |
445 | 445 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | */ |
453 | 453 | public function get_registered_object($name) |
454 | 454 | { |
455 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
455 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
456 | 456 | return $this->getRegisteredObject($name); |
457 | 457 | } |
458 | 458 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | */ |
464 | 464 | public function clear_config($var = null) |
465 | 465 | { |
466 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
466 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
467 | 467 | $this->clearConfig($var); |
468 | 468 | } |
469 | 469 | |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | */ |
476 | 476 | public function trigger_error($error_msg, $error_type = E_USER_WARNING) |
477 | 477 | { |
478 | - $this->deprecated(__METHOD__, __FILE__, (__LINE__ + 1)); |
|
478 | + $this->deprecated(__METHOD__, __FILE__, (__LINE__ +1)); |
|
479 | 479 | trigger_error("Smarty error: $error_msg", $error_type); |
480 | 480 | } |
481 | 481 |
@@ -40,11 +40,11 @@ |
||
40 | 40 | $name = strtolower($spec->getName()); |
41 | 41 | $dirname = strtolower($spec->getDirname()); |
42 | 42 | |
43 | - $handlerFile = \XoopsBaseConfig::get('root-path') . "/modules/{$dirname}/class/{$name}.php"; |
|
43 | + $handlerFile = \XoopsBaseConfig::get('root-path')."/modules/{$dirname}/class/{$name}.php"; |
|
44 | 44 | if (\XoopsLoad::fileExists($handlerFile)) { |
45 | 45 | include_once $handlerFile; |
46 | 46 | } |
47 | - $class = ucfirst($dirname) . ucfirst($name) . 'Handler'; |
|
47 | + $class = ucfirst($dirname).ucfirst($name).'Handler'; |
|
48 | 48 | if (class_exists($class, false)) { |
49 | 49 | $handler = new $class($spec->getFactory()->db()); |
50 | 50 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | $name = $this->lookupTable[$specName]; |
68 | - $class = '\Xoops\Core\Kernel\Handlers\Xoops' . $name . 'Handler'; |
|
68 | + $class = '\Xoops\Core\Kernel\Handlers\Xoops'.$name.'Handler'; |
|
69 | 69 | if (class_exists($class)) { |
70 | 70 | $handler = new $class($spec->getFactory()->db()); |
71 | 71 | } |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | public function optional($value) |
106 | 106 | { |
107 | - $this->specOptional = (bool) $value; |
|
107 | + $this->specOptional = (bool)$value; |
|
108 | 108 | return $this; |
109 | 109 | } |
110 | 110 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $foundColon = strpos($name, ':'); |
116 | 116 | if ($foundColon !== false) { |
117 | 117 | $scheme = substr($name, 0, $foundColon); |
118 | - $baseName = substr($name, $foundColon+1); |
|
118 | + $baseName = substr($name, $foundColon + 1); |
|
119 | 119 | $handler = $this->newSpec()->scheme($scheme)->name($baseName)->optional($optional)->build(); |
120 | 120 | return $handler; |
121 | 121 | } |
@@ -55,14 +55,14 @@ |
||
55 | 55 | } |
56 | 56 | if (!$ele->isHidden()) { |
57 | 57 | $ret .= '<div class="form-group">'; |
58 | - $ret .= '<label>' . $ele->getCaption(); |
|
59 | - $ret .= ($ele->isRequired() ? '<span class="caption-required">*</span>' : '') . '</label>'; |
|
58 | + $ret .= '<label>'.$ele->getCaption(); |
|
59 | + $ret .= ($ele->isRequired() ? '<span class="caption-required">*</span>' : '').'</label>'; |
|
60 | 60 | $ret .= $ele->render(); |
61 | - $ret .= '<small class="text-muted">' . $ele->getDescription() . '</small>'; |
|
62 | - $ret .= '<p class="dsc_pattern_vertical">' . $ele->getPatternDescription() . '</p>'; |
|
63 | - $ret .= '</div>' . "\n"; |
|
61 | + $ret .= '<small class="text-muted">'.$ele->getDescription().'</small>'; |
|
62 | + $ret .= '<p class="dsc_pattern_vertical">'.$ele->getPatternDescription().'</p>'; |
|
63 | + $ret .= '</div>'."\n"; |
|
64 | 64 | } else { |
65 | - $ret .= $ele->render(). "\n"; |
|
65 | + $ret .= $ele->render()."\n"; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | return $ret; |