@@ -14,30 +14,30 @@ discard block |
||
14 | 14 | * SmartObject library path |
15 | 15 | */ |
16 | 16 | if (!defined('SMARTOBJECT_URL')) { |
17 | - define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/'); |
|
17 | + define('SMARTOBJECT_URL', XOOPS_URL.'/modules/smartobject/'); |
|
18 | 18 | } |
19 | 19 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
20 | - define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/'); |
|
20 | + define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/smartobject/'); |
|
21 | 21 | } |
22 | 22 | if (!defined('SMARTOBJECT_IMAGES_URL')) { |
23 | - define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/'); |
|
23 | + define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL.'assets/images/'); |
|
24 | 24 | } |
25 | 25 | if (!defined('SMARTOBJECT_IMAGES_ROOT_PATH')) { |
26 | - define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/'); |
|
26 | + define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH.'assets/images/'); |
|
27 | 27 | } |
28 | 28 | if (!defined('SMARTOBJECT_IMAGES_ACTIONS_URL')) { |
29 | - define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/'); |
|
29 | + define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL.'assets/images/actions/'); |
|
30 | 30 | } |
31 | 31 | if (!defined('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH')) { |
32 | - define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/'); |
|
32 | + define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH.'assets/images/actions/'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Version of the SmartObject Framework |
37 | 37 | */ |
38 | -require_once SMARTOBJECT_ROOT_PATH . 'include/version.php'; |
|
39 | -require_once SMARTOBJECT_ROOT_PATH . 'include/functions.php'; |
|
40 | -require_once SMARTOBJECT_ROOT_PATH . 'include/xoops_core_common_functions.php'; |
|
38 | +require_once SMARTOBJECT_ROOT_PATH.'include/version.php'; |
|
39 | +require_once SMARTOBJECT_ROOT_PATH.'include/functions.php'; |
|
40 | +require_once SMARTOBJECT_ROOT_PATH.'include/xoops_core_common_functions.php'; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Some constants used by the SmartObjects |
@@ -66,4 +66,4 @@ discard block |
||
66 | 66 | // get previous page |
67 | 67 | $smart_previous_page = smart_getenv('HTTP_REFERER'); |
68 | 68 | |
69 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php'; |
|
69 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartloader.php'; |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | * D.J. |
6 | 6 | */ |
7 | 7 | |
8 | -include dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/mainfile.php'; |
|
8 | +include dirname(dirname(dirname(dirname(dirname(__DIR__))))).'/mainfile.php'; |
|
9 | 9 | error_reporting(0); |
10 | 10 | $xoopsLogger->activated = false; |
11 | 11 | |
12 | -if (empty($_SERVER['HTTP_REFERER']) || !preg_match('/^' . preg_quote(XOOPS_URL, '/') . '/', $_SERVER['HTTP_REFERER'])) { |
|
12 | +if (empty($_SERVER['HTTP_REFERER']) || !preg_match('/^'.preg_quote(XOOPS_URL, '/').'/', $_SERVER['HTTP_REFERER'])) { |
|
13 | 13 | exit(); |
14 | 14 | } |
15 | 15 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if ($this->mode === 'bmp') { |
87 | 87 | $this->config['num_chars'] = 4; |
88 | - $this->code = mt_rand(pow(10, $this->config['num_chars'] - 1), (int)str_pad('9', $this->config['num_chars'], '9')); |
|
88 | + $this->code = mt_rand(pow(10, $this->config['num_chars'] - 1), (int) str_pad('9', $this->config['num_chars'], '9')); |
|
89 | 89 | } else { |
90 | 90 | $this->code = substr(md5(uniqid(mt_rand(), 1)), 0, $this->config['num_chars']); |
91 | 91 | if (!$this->config['casesensitive']) { |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | return; |
101 | 101 | } |
102 | 102 | |
103 | - $_SESSION['XoopsCaptcha_sessioncode'] = (string)$this->code; |
|
104 | - $maxAttempts = (int)(@$_SESSION['XoopsCaptcha_maxattempts']); |
|
103 | + $_SESSION['XoopsCaptcha_sessioncode'] = (string) $this->code; |
|
104 | + $maxAttempts = (int) (@$_SESSION['XoopsCaptcha_maxattempts']); |
|
105 | 105 | |
106 | 106 | // Increase the attempt records on refresh |
107 | 107 | if (!empty($maxAttempts)) { |
108 | - $_SESSION['XoopsCaptcha_attempt_' . $_SESSION['XoopsCaptcha_name']]++; |
|
109 | - if ($_SESSION['XoopsCaptcha_attempt_' . $_SESSION['XoopsCaptcha_name']] > $maxAttempts) { |
|
108 | + $_SESSION['XoopsCaptcha_attempt_'.$_SESSION['XoopsCaptcha_name']]++; |
|
109 | + if ($_SESSION['XoopsCaptcha_attempt_'.$_SESSION['XoopsCaptcha_name']] > $maxAttempts) { |
|
110 | 110 | $this->invalid = true; |
111 | 111 | } |
112 | 112 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | { |
121 | 121 | if ($this->invalid) { |
122 | 122 | header('Content-type: image/gif'); |
123 | - readfile(XOOPS_ROOT_PATH . '/images/subject/icon2.gif'); |
|
123 | + readfile(XOOPS_ROOT_PATH.'/images/subject/icon2.gif'); |
|
124 | 124 | |
125 | 125 | return; |
126 | 126 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | header('Content-type: image/jpeg'); |
191 | 191 | imagejpeg($this->oImage); |
192 | 192 | } else { |
193 | - imagejpeg($this->oImage, XOOPS_ROOT_PATH . '/' . $this->config['imagepath'] . '/' . $file . '.jpg'); |
|
193 | + imagejpeg($this->oImage, XOOPS_ROOT_PATH.'/'.$this->config['imagepath'].'/'.$file.'.jpg'); |
|
194 | 194 | } |
195 | 195 | imagedestroy($this->oImage); |
196 | 196 | } |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | } |
212 | 212 | } |
213 | 213 | */ |
214 | - require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
215 | - $file_path = $this->config['rootpath'] . "/{$name}"; |
|
214 | + require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
215 | + $file_path = $this->config['rootpath']."/{$name}"; |
|
216 | 216 | $files = XoopsLists::getFileListAsArray($file_path); |
217 | 217 | foreach ($files as $item) { |
218 | 218 | if (empty($extension) || preg_match("/(\.{$extension})$/i", $item)) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | public function loadFont() |
230 | 230 | { |
231 | 231 | $fonts = $this->_getList('fonts', 'ttf'); |
232 | - $this->font = $this->config['rootpath'] . '/fonts/' . $fonts[array_rand($fonts)]; |
|
232 | + $this->font = $this->config['rootpath'].'/fonts/'.$fonts[array_rand($fonts)]; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | public function setImageSize() |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | imagedestroy($oImage); |
256 | 256 | |
257 | 257 | $this->height = $MaxCharHeight + 2; |
258 | - $this->spacing = (int)(($this->config['num_chars'] * $MaxCharWidth) / $this->config['num_chars']); |
|
258 | + $this->spacing = (int) (($this->config['num_chars'] * $MaxCharWidth) / $this->config['num_chars']); |
|
259 | 259 | $this->width = ($this->config['num_chars'] * $MaxCharWidth) + ($this->spacing / 2); |
260 | 260 | } |
261 | 261 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | { |
269 | 269 | $RandBackground = null; |
270 | 270 | if ($backgrounds = $this->_getList('backgrounds', '(gif|jpg|png)')) { |
271 | - $RandBackground = $this->config['rootpath'] . '/backgrounds/' . $backgrounds[array_rand($backgrounds)]; |
|
271 | + $RandBackground = $this->config['rootpath'].'/backgrounds/'.$backgrounds[array_rand($backgrounds)]; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | return $RandBackground; |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | } |
439 | 439 | } |
440 | 440 | |
441 | -$config = @include __DIR__ . '/../config.php'; |
|
441 | +$config = @include __DIR__.'/../config.php'; |
|
442 | 442 | $imageHandler = new XoopsCaptchaImageHandler(); |
443 | 443 | $imageHandler->setConfig($config); |
444 | 444 | $imageHandler->loadImage(); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
15 | 15 | |
16 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php'; |
|
16 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
|
17 | 17 | |
18 | 18 | /* |
19 | 19 | * Usage |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $backgroundnum = null |
63 | 63 | ) { |
64 | 64 | if (!class_exists('XoopsCaptcaha')) { |
65 | - require_once SMARTOBJECT_ROOT_PATH . '/include/captcha/captcha.php'; |
|
65 | + require_once SMARTOBJECT_ROOT_PATH.'/include/captcha/captcha.php'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $this->_captchaHandler = XoopsCaptcha::getInstance(); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | public function setCode() |
44 | 44 | { |
45 | - $_SESSION['XoopsCaptcha_sessioncode'] = (string)$this->code; |
|
45 | + $_SESSION['XoopsCaptcha_sessioncode'] = (string) $this->code; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function render() |
52 | 52 | { |
53 | - $form = $this->loadText() . " <input type='text' name='" . $this->config['name'] . "' id='" . $this->config['name'] . "' size='" . $this->config['num_chars'] . "' maxlength='" . $this->config['num_chars'] . "' value=''>"; |
|
53 | + $form = $this->loadText()." <input type='text' name='".$this->config['name']."' id='".$this->config['name']."' size='".$this->config['num_chars']."' maxlength='".$this->config['num_chars']."' value=''>"; |
|
54 | 54 | $rule = constant('XOOPS_CAPTCHA_RULE_TEXT'); |
55 | 55 | if (!empty($rule)) { |
56 | 56 | $form .= " <small>{$rule}</small>"; |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function render() |
47 | 47 | { |
48 | - $form = "<input type='text' name='" . $this->config['name'] . "' id='" . $this->config['name'] . "' size='" . $this->config['num_chars'] . "' maxlength='" . $this->config['num_chars'] . "' value=''> " . $this->loadImage(); |
|
48 | + $form = "<input type='text' name='".$this->config['name']."' id='".$this->config['name']."' size='".$this->config['num_chars']."' maxlength='".$this->config['num_chars']."' value=''> ".$this->loadImage(); |
|
49 | 49 | $rule = htmlspecialchars(XOOPS_CAPTCHA_REFRESH, ENT_QUOTES); |
50 | 50 | if ($this->config['maxattempt']) { |
51 | - $rule .= ' | ' . sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']); |
|
51 | + $rule .= ' | '.sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']); |
|
52 | 52 | } |
53 | 53 | $form .= " <small>{$rule}</small>"; |
54 | 54 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function loadImage() |
62 | 62 | { |
63 | 63 | $rule = $this->config['casesensitive'] ? constant('XOOPS_CAPTCHA_RULE_CASESENSITIVE') : constant('XOOPS_CAPTCHA_RULE_CASEINSENSITIVE'); |
64 | - $ret = "<img id='captcha' src='" . XOOPS_URL . '/' . $this->config['imageurl'] . "' onclick=\"this.src='" . XOOPS_URL . '/' . $this->config['imageurl'] . "?refresh='+Math.random()" . "\" align='absmiddle' style='cursor: pointer;' alt='" . htmlspecialchars($rule, ENT_QUOTES) . "'>"; |
|
64 | + $ret = "<img id='captcha' src='".XOOPS_URL.'/'.$this->config['imageurl']."' onclick=\"this.src='".XOOPS_URL.'/'.$this->config['imageurl']."?refresh='+Math.random()"."\" align='absmiddle' style='cursor: pointer;' alt='".htmlspecialchars($rule, ENT_QUOTES)."'>"; |
|
65 | 65 | |
66 | 66 | return $ret; |
67 | 67 | } |
@@ -44,8 +44,8 @@ |
||
44 | 44 | |
45 | 45 | $language = preg_replace("/[^a-z0-9_\-]/i", '', $GLOBALS['xoopsConfig']['language']); |
46 | 46 | |
47 | -if (!@require_once __DIR__ . "/language/{$language}.php") { |
|
48 | - require_once __DIR__ . '/language/english.php'; |
|
47 | +if (!@require_once __DIR__."/language/{$language}.php") { |
|
48 | + require_once __DIR__.'/language/english.php'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $config; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | function smart_get_css_link($cssfile) |
13 | 13 | { |
14 | - $ret = '<link rel="stylesheet" type="text/css" href="' . $cssfile . '">'; |
|
14 | + $ret = '<link rel="stylesheet" type="text/css" href="'.$cssfile.'">'; |
|
15 | 15 | |
16 | 16 | return $ret; |
17 | 17 | } |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | $seoMode = smart_getModuleModeSEO($moduleName); |
103 | 103 | if ($seoMode === 'rewrite') { |
104 | 104 | $seoModuleName = smart_getModuleNameForSEO($moduleName); |
105 | - $ret = XOOPS_URL . '/' . $seoModuleName . '/'; |
|
105 | + $ret = XOOPS_URL.'/'.$seoModuleName.'/'; |
|
106 | 106 | } elseif ($seoMode === 'pathinfo') { |
107 | - $ret = XOOPS_URL . '/modules/' . $moduleName . '/seo.php/' . $seoModuleName . '/'; |
|
107 | + $ret = XOOPS_URL.'/modules/'.$moduleName.'/seo.php/'.$seoModuleName.'/'; |
|
108 | 108 | } else { |
109 | - $ret = XOOPS_URL . '/modules/' . $moduleName . '/'; |
|
109 | + $ret = XOOPS_URL.'/modules/'.$moduleName.'/'; |
|
110 | 110 | } |
111 | 111 | |
112 | - return '<a href="' . $ret . '">' . $smartModule->getVar('name') . '</a>'; |
|
112 | + return '<a href="'.$ret.'">'.$smartModule->getVar('name').'</a>'; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
@@ -172,11 +172,11 @@ discard block |
||
172 | 172 | /** |
173 | 173 | * include SmartObject admin language file |
174 | 174 | */ |
175 | - $fileName = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/admin.php'; |
|
175 | + $fileName = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/admin.php'; |
|
176 | 176 | if (file_exists($fileName)) { |
177 | 177 | require_once $fileName; |
178 | 178 | } else { |
179 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/admin.php'; |
|
179 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/english/admin.php'; |
|
180 | 180 | } ?> |
181 | 181 | <script type='text/javascript'> |
182 | 182 | <!-- |
@@ -193,9 +193,9 @@ discard block |
||
193 | 193 | /** |
194 | 194 | * Include the admin language constants for the SmartObject Framework |
195 | 195 | */ |
196 | - $admin_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/admin.php'; |
|
196 | + $admin_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/admin.php'; |
|
197 | 197 | if (!file_exists($admin_file)) { |
198 | - $admin_file = SMARTOBJECT_ROOT_PATH . 'language/english/admin.php'; |
|
198 | + $admin_file = SMARTOBJECT_ROOT_PATH.'language/english/admin.php'; |
|
199 | 199 | } |
200 | 200 | require_once $admin_file; |
201 | 201 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | //Verifies that a MySQL table exists |
216 | 216 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
217 | 217 | $realname = $xoopsDB->prefix($table); |
218 | - $sql = 'SHOW TABLES FROM ' . XOOPS_DB_NAME; |
|
218 | + $sql = 'SHOW TABLES FROM '.XOOPS_DB_NAME; |
|
219 | 219 | $ret = $xoopsDB->queryF($sql); |
220 | 220 | while (list($m_table) = $xoopsDB->fetchRow($ret)) { |
221 | 221 | if ($m_table == $realname) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $moduleName = smart_getCurrentModuleName(); |
245 | 245 | } |
246 | 246 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
247 | - $sql = sprintf('SELECT metavalue FROM %s WHERE metakey=%s', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($key)); |
|
247 | + $sql = sprintf('SELECT metavalue FROM %s WHERE metakey=%s', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($key)); |
|
248 | 248 | $ret = $xoopsDB->query($sql); |
249 | 249 | if (!$ret) { |
250 | 250 | $value = false; |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
288 | 288 | $ret = smart_GetMeta($key, $moduleName); |
289 | 289 | if ($ret === '0' || $ret > 0) { |
290 | - $sql = sprintf('UPDATE %s SET metavalue = %s WHERE metakey = %s', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key)); |
|
290 | + $sql = sprintf('UPDATE %s SET metavalue = %s WHERE metakey = %s', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key)); |
|
291 | 291 | } else { |
292 | - $sql = sprintf('INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)', $xoopsDB->prefix($moduleName . '_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value)); |
|
292 | + $sql = sprintf('INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)', $xoopsDB->prefix($moduleName.'_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value)); |
|
293 | 293 | } |
294 | 294 | $ret = $xoopsDB->queryF($sql); |
295 | 295 | if (!$ret) { |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | { |
470 | 470 | static $smartModules; |
471 | 471 | if (isset($smartModules[$moduleName])) { |
472 | - $ret =& $smartModules[$moduleName]; |
|
472 | + $ret = & $smartModules[$moduleName]; |
|
473 | 473 | |
474 | 474 | return $ret; |
475 | 475 | } |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | { |
506 | 506 | static $smartConfigs; |
507 | 507 | if (isset($smartConfigs[$moduleName])) { |
508 | - $ret =& $smartConfigs[$moduleName]; |
|
508 | + $ret = & $smartConfigs[$moduleName]; |
|
509 | 509 | |
510 | 510 | return $ret; |
511 | 511 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | return $ret; |
534 | 534 | } |
535 | 535 | $hModConfig = xoops_getHandler('config'); |
536 | - $smartConfigs[$moduleName] =& $hModConfig->getConfigsByCat(0, $module->getVar('mid')); |
|
536 | + $smartConfigs[$moduleName] = & $hModConfig->getConfigsByCat(0, $module->getVar('mid')); |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | return $smartConfigs[$moduleName]; |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | { |
560 | 560 | $ret = ''; |
561 | 561 | foreach ($errors as $key => $value) { |
562 | - $ret .= '<br> - ' . $value; |
|
562 | + $ret .= '<br> - '.$value; |
|
563 | 563 | } |
564 | 564 | |
565 | 565 | return $ret; |
@@ -579,17 +579,17 @@ discard block |
||
579 | 579 | if (!is_numeric($userid)) { |
580 | 580 | return $userid; |
581 | 581 | } |
582 | - $userid = (int)$userid; |
|
582 | + $userid = (int) $userid; |
|
583 | 583 | if ($userid > 0) { |
584 | 584 | if ($users == array()) { |
585 | 585 | //fetching users |
586 | 586 | $memberHandler = xoops_getHandler('member'); |
587 | - $user =& $memberHandler->getUser($userid); |
|
587 | + $user = & $memberHandler->getUser($userid); |
|
588 | 588 | } else { |
589 | 589 | if (!isset($users[$userid])) { |
590 | 590 | return $GLOBALS['xoopsConfig']['anonymous']; |
591 | 591 | } |
592 | - $user =& $users[$userid]; |
|
592 | + $user = & $users[$userid]; |
|
593 | 593 | } |
594 | 594 | if (is_object($user)) { |
595 | 595 | $ts = MyTextSanitizer:: getInstance(); |
@@ -600,15 +600,15 @@ discard block |
||
600 | 600 | $fullname = $user->getVar('name'); |
601 | 601 | } |
602 | 602 | if (!empty($fullname)) { |
603 | - $linkeduser = "$fullname [<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . $ts->htmlSpecialChars($username) . '</a>]'; |
|
603 | + $linkeduser = "$fullname [<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".$ts->htmlSpecialChars($username).'</a>]'; |
|
604 | 604 | } else { |
605 | - $linkeduser = "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . ucwords($ts->htmlSpecialChars($username)) . '</a>'; |
|
605 | + $linkeduser = "<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".ucwords($ts->htmlSpecialChars($username)).'</a>'; |
|
606 | 606 | } |
607 | 607 | // add contact info: email + PM |
608 | 608 | if ($withContact) { |
609 | - $linkeduser .= ' <a href="mailto:' . $user->getVar('email') . '"><img style="vertical-align: middle;" src="' . XOOPS_URL . '/images/icons/email.gif' . '" alt="' . _CO_SOBJECT_SEND_EMAIL . '" title="' . _CO_SOBJECT_SEND_EMAIL . '"></a>'; |
|
610 | - $js = "javascript:openWithSelfMain('" . XOOPS_URL . '/pmlite.php?send2=1&to_userid=' . $userid . "', 'pmlite',450,370);"; |
|
611 | - $linkeduser .= ' <a href="' . $js . '"><img style="vertical-align: middle;" src="' . XOOPS_URL . '/images/icons/pm.gif' . '" alt="' . _CO_SOBJECT_SEND_PM . '" title="' . _CO_SOBJECT_SEND_PM . '"></a>'; |
|
609 | + $linkeduser .= ' <a href="mailto:'.$user->getVar('email').'"><img style="vertical-align: middle;" src="'.XOOPS_URL.'/images/icons/email.gif'.'" alt="'._CO_SOBJECT_SEND_EMAIL.'" title="'._CO_SOBJECT_SEND_EMAIL.'"></a>'; |
|
610 | + $js = "javascript:openWithSelfMain('".XOOPS_URL.'/pmlite.php?send2=1&to_userid='.$userid."', 'pmlite',450,370);"; |
|
611 | + $linkeduser .= ' <a href="'.$js.'"><img style="vertical-align: middle;" src="'.XOOPS_URL.'/images/icons/pm.gif'.'" alt="'._CO_SOBJECT_SEND_PM.'" title="'._CO_SOBJECT_SEND_PM.'"></a>'; |
|
612 | 612 | } |
613 | 613 | |
614 | 614 | return $linkeduser; |
@@ -627,20 +627,20 @@ discard block |
||
627 | 627 | function smart_adminMenu($currentoption = 0, $breadcrumb = '', $submenus = false, $currentsub = -1) |
628 | 628 | { |
629 | 629 | global $xoopsModule, $xoopsConfig; |
630 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
631 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/modinfo.php')) { |
|
632 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/modinfo.php'; |
|
630 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
631 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php')) { |
|
632 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php'; |
|
633 | 633 | } else { |
634 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/modinfo.php'; |
|
634 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/english/modinfo.php'; |
|
635 | 635 | } |
636 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/admin.php')) { |
|
637 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/admin.php'; |
|
636 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/admin.php')) { |
|
637 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/admin.php'; |
|
638 | 638 | } else { |
639 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/admin.php'; |
|
639 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/english/admin.php'; |
|
640 | 640 | } |
641 | 641 | $headermenu = array(); |
642 | 642 | $adminObject = array(); |
643 | - include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/menu.php'; |
|
643 | + include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/admin/menu.php'; |
|
644 | 644 | $tpl = new XoopsTpl(); |
645 | 645 | $tpl->assign(array( |
646 | 646 | 'headermenu' => $headermenu, |
@@ -663,11 +663,11 @@ discard block |
||
663 | 663 | function smart_collapsableBar($id = '', $title = '', $dsc = '') |
664 | 664 | { |
665 | 665 | global $xoopsModule; |
666 | - echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"togglecollapse('" . $id . "'); toggleIcon('" . $id . "_icon')\";>"; |
|
667 | - echo "<img id='" . $id . "_icon' src=" . SMARTOBJECT_URL . "assets/images/close12.gif alt=''></a> " . $title . '</h3>'; |
|
668 | - echo "<div id='" . $id . "'>"; |
|
666 | + echo "<h3 style=\"color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; \"><a href='javascript:;' onclick=\"togglecollapse('".$id."'); toggleIcon('".$id."_icon')\";>"; |
|
667 | + echo "<img id='".$id."_icon' src=".SMARTOBJECT_URL."assets/images/close12.gif alt=''></a> ".$title.'</h3>'; |
|
668 | + echo "<div id='".$id."'>"; |
|
669 | 669 | if ($dsc !== '') { |
670 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . $dsc . '</span>'; |
|
670 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".$dsc.'</span>'; |
|
671 | 671 | } |
672 | 672 | } |
673 | 673 | |
@@ -681,11 +681,11 @@ discard block |
||
681 | 681 | global $xoopsModule; |
682 | 682 | $onClick = "ajaxtogglecollapse('$id')"; |
683 | 683 | //$onClick = "togglecollapse('$id'); toggleIcon('" . $id . "_icon')"; |
684 | - echo '<h3 style="border: 1px solid; color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; " onclick="' . $onClick . '">'; |
|
685 | - echo "<img id='" . $id . "_icon' src=" . SMARTOBJECT_URL . "assets/images/close12.gif alt=''></a> " . $title . '</h3>'; |
|
686 | - echo "<div id='" . $id . "'>"; |
|
684 | + echo '<h3 style="border: 1px solid; color: #2F5376; font-weight: bold; font-size: 14px; margin: 6px 0 0 0; " onclick="'.$onClick.'">'; |
|
685 | + echo "<img id='".$id."_icon' src=".SMARTOBJECT_URL."assets/images/close12.gif alt=''></a> ".$title.'</h3>'; |
|
686 | + echo "<div id='".$id."'>"; |
|
687 | 687 | if ($dsc !== '') { |
688 | - echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">" . $dsc . '</span>'; |
|
688 | + echo "<span style=\"color: #567; margin: 3px 0 12px 0; font-size: small; display: block; \">".$dsc.'</span>'; |
|
689 | 689 | } |
690 | 690 | } |
691 | 691 | |
@@ -715,13 +715,13 @@ discard block |
||
715 | 715 | { |
716 | 716 | $urls = smart_getCurrentUrls(); |
717 | 717 | $path = $urls['phpself']; |
718 | - $cookie_name = $path . '_smart_collaps_' . $name; |
|
718 | + $cookie_name = $path.'_smart_collaps_'.$name; |
|
719 | 719 | $cookie_name = str_replace('.', '_', $cookie_name); |
720 | 720 | $cookie = smart_getCookieVar($cookie_name, ''); |
721 | 721 | if ($cookie === 'none') { |
722 | 722 | echo ' |
723 | 723 | <script type="text/javascript"><!-- |
724 | - togglecollapse("' . $name . '"); toggleIcon("' . $name . '_icon"); |
|
724 | + togglecollapse("' . $name.'"); toggleIcon("'.$name.'_icon"); |
|
725 | 725 | //--> |
726 | 726 | </script> |
727 | 727 | '; |
@@ -787,17 +787,17 @@ discard block |
||
787 | 787 | $httphost = $_SERVER['HTTP_HOST']; |
788 | 788 | $querystring = $_SERVER['QUERY_STRING']; |
789 | 789 | if ($querystring !== '') { |
790 | - $querystring = '?' . $querystring; |
|
790 | + $querystring = '?'.$querystring; |
|
791 | 791 | } |
792 | - $currenturl = $http . $httphost . $phpself . $querystring; |
|
792 | + $currenturl = $http.$httphost.$phpself.$querystring; |
|
793 | 793 | $urls = array(); |
794 | 794 | $urls['http'] = $http; |
795 | 795 | $urls['httphost'] = $httphost; |
796 | 796 | $urls['phpself'] = $phpself; |
797 | 797 | $urls['querystring'] = $querystring; |
798 | - $urls['full_phpself'] = $http . $httphost . $phpself; |
|
798 | + $urls['full_phpself'] = $http.$httphost.$phpself; |
|
799 | 799 | $urls['full'] = $currenturl; |
800 | - $urls['isHomePage'] = (XOOPS_URL . '/index.php') == ($http . $httphost . $phpself); |
|
800 | + $urls['isHomePage'] = (XOOPS_URL.'/index.php') == ($http.$httphost.$phpself); |
|
801 | 801 | |
802 | 802 | return $urls; |
803 | 803 | } |
@@ -874,13 +874,13 @@ discard block |
||
874 | 874 | { |
875 | 875 | global $xoopsConfig, $xoopsModule, $xoopsModuleConfig; |
876 | 876 | |
877 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
877 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
878 | 878 | $tpl = new XoopsTpl(); |
879 | 879 | |
880 | 880 | $hModule = xoops_getHandler('module'); |
881 | - $versioninfo =& $hModule->get($xoopsModule->getVar('mid')); |
|
882 | - $modfootertxt = 'Module ' . $versioninfo->getInfo('name') . ' - Version ' . $versioninfo->getInfo('version') . ''; |
|
883 | - $modfooter = "<a href='" . $versioninfo->getInfo('support_site_url') . "' target='_blank'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/assets/images/cssbutton.gif' title='" . $modfootertxt . "' alt='" . $modfootertxt . "'></a>"; |
|
881 | + $versioninfo = & $hModule->get($xoopsModule->getVar('mid')); |
|
882 | + $modfootertxt = 'Module '.$versioninfo->getInfo('name').' - Version '.$versioninfo->getInfo('version').''; |
|
883 | + $modfooter = "<a href='".$versioninfo->getInfo('support_site_url')."' target='_blank'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname')."/assets/images/cssbutton.gif' title='".$modfootertxt."' alt='".$modfootertxt."'></a>"; |
|
884 | 884 | $tpl->assign('modfooter', $modfooter); |
885 | 885 | |
886 | 886 | if (!defined('_AM_SOBJECT_XOOPS_PRO')) { |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | } |
889 | 889 | $smartobjectConfig = smart_getModuleConfig('smartobject'); |
890 | 890 | $tpl->assign('smartobject_enable_admin_footer', $smartobjectConfig['enable_admin_footer']); |
891 | - $tpl->display(SMARTOBJECT_ROOT_PATH . 'templates/smartobject_admin_footer.tpl'); |
|
891 | + $tpl->display(SMARTOBJECT_ROOT_PATH.'templates/smartobject_admin_footer.tpl'); |
|
892 | 892 | } |
893 | 893 | |
894 | 894 | function smart_xoops_cp_footer() |
@@ -915,7 +915,7 @@ discard block |
||
915 | 915 | */ |
916 | 916 | function smart_addScript($src) |
917 | 917 | { |
918 | - echo '<script src="' . $src . '" type="text/javascript"></script>'; |
|
918 | + echo '<script src="'.$src.'" type="text/javascript"></script>'; |
|
919 | 919 | } |
920 | 920 | |
921 | 921 | /** |
@@ -924,16 +924,16 @@ discard block |
||
924 | 924 | function smart_addStyle($src) |
925 | 925 | { |
926 | 926 | if ($src === 'smartobject') { |
927 | - $src = SMARTOBJECT_URL . 'assets/css/module.css'; |
|
927 | + $src = SMARTOBJECT_URL.'assets/css/module.css'; |
|
928 | 928 | } |
929 | 929 | echo smart_get_css_link($src); |
930 | 930 | } |
931 | 931 | |
932 | 932 | function smart_addAdminAjaxSupport() |
933 | 933 | { |
934 | - smart_addScript(SMARTOBJECT_URL . 'include/scriptaculous/lib/prototype.js'); |
|
935 | - smart_addScript(SMARTOBJECT_URL . 'include/scriptaculous/src/scriptaculous.js'); |
|
936 | - smart_addScript(SMARTOBJECT_URL . 'include/scriptaculous/src/smart.js'); |
|
934 | + smart_addScript(SMARTOBJECT_URL.'include/scriptaculous/lib/prototype.js'); |
|
935 | + smart_addScript(SMARTOBJECT_URL.'include/scriptaculous/src/scriptaculous.js'); |
|
936 | + smart_addScript(SMARTOBJECT_URL.'include/scriptaculous/src/smart.js'); |
|
937 | 937 | } |
938 | 938 | |
939 | 939 | /** |
@@ -993,8 +993,8 @@ discard block |
||
993 | 993 | function smart_htmlnumericentities($str) |
994 | 994 | { |
995 | 995 | // return preg_replace('/[^!-%\x27-;=?-~ ]/e', '"&#".ord("$0").chr(59)', $str); |
996 | - return preg_replace_callback('/[^!-%\x27-;=?-~ ]/', function ($m) { |
|
997 | - return '&#' . ord($m[0]) . chr(59); |
|
996 | + return preg_replace_callback('/[^!-%\x27-;=?-~ ]/', function($m) { |
|
997 | + return '&#'.ord($m[0]).chr(59); |
|
998 | 998 | }, $str); |
999 | 999 | } |
1000 | 1000 | |
@@ -1008,16 +1008,16 @@ discard block |
||
1008 | 1008 | static $handlers; |
1009 | 1009 | $name = strtolower(trim($name)); |
1010 | 1010 | if (!isset($handlers[$name])) { |
1011 | - if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/kernel/' . $name . '.php')) { |
|
1011 | + if (file_exists($hnd_file = XOOPS_ROOT_PATH.'/kernel/'.$name.'.php')) { |
|
1012 | 1012 | require_once $hnd_file; |
1013 | 1013 | } |
1014 | - $class = 'Xoops' . ucfirst($name) . 'Handler'; |
|
1014 | + $class = 'Xoops'.ucfirst($name).'Handler'; |
|
1015 | 1015 | if (class_exists($class)) { |
1016 | 1016 | $handlers[$name] = new $class($GLOBALS['xoopsDB'], 'xoops'); |
1017 | 1017 | } |
1018 | 1018 | } |
1019 | 1019 | if (!isset($handlers[$name]) && !$optional) { |
1020 | - trigger_error('Class <b>' . $class . '</b> does not exist<br>Handler Name: ' . $name, E_USER_ERROR); |
|
1020 | + trigger_error('Class <b>'.$class.'</b> does not exist<br>Handler Name: '.$name, E_USER_ERROR); |
|
1021 | 1021 | } |
1022 | 1022 | if (isset($handlers[$name])) { |
1023 | 1023 | return $handlers[$name]; |
@@ -1097,9 +1097,9 @@ discard block |
||
1097 | 1097 | { |
1098 | 1098 | global $xoopsConfig; |
1099 | 1099 | |
1100 | - $filename = XOOPS_ROOT_PATH . '/modules/' . $module . '/language/' . $xoopsConfig['language'] . '/' . $file . '.php'; |
|
1100 | + $filename = XOOPS_ROOT_PATH.'/modules/'.$module.'/language/'.$xoopsConfig['language'].'/'.$file.'.php'; |
|
1101 | 1101 | if (!file_exists($filename)) { |
1102 | - $filename = XOOPS_ROOT_PATH . '/modules/' . $module . '/language/english/' . $file . '.php'; |
|
1102 | + $filename = XOOPS_ROOT_PATH.'/modules/'.$module.'/language/english/'.$file.'.php'; |
|
1103 | 1103 | } |
1104 | 1104 | if (file_exists($filename)) { |
1105 | 1105 | require_once $filename; |
@@ -1195,7 +1195,7 @@ discard block |
||
1195 | 1195 | |
1196 | 1196 | $text = preg_replace($search, $replace, $document); |
1197 | 1197 | |
1198 | - preg_replace_callback('/&#(\d+);/', function ($matches) { |
|
1198 | + preg_replace_callback('/&#(\d+);/', function($matches) { |
|
1199 | 1199 | return chr($matches[1]); |
1200 | 1200 | }, $document); |
1201 | 1201 | |
@@ -1218,21 +1218,21 @@ discard block |
||
1218 | 1218 | $str = $match[0]; |
1219 | 1219 | if (false !== strpos($str, ',')) { |
1220 | 1220 | // A comma exists, that makes it easy, cos we assume it separates the decimal part. |
1221 | - $str = str_replace('.', '', $str); // Erase thousand seps |
|
1222 | - $str = str_replace(',', '.', $str); // Convert , to . for floatval command |
|
1221 | + $str = str_replace('.', '', $str); // Erase thousand seps |
|
1222 | + $str = str_replace(',', '.', $str); // Convert , to . for floatval command |
|
1223 | 1223 | |
1224 | - return (float)$str; |
|
1224 | + return (float) $str; |
|
1225 | 1225 | } else { |
1226 | 1226 | // No comma exists, so we have to decide, how a single dot shall be treated |
1227 | 1227 | if (preg_match("/^[0-9\-]*[\.]{1}[0-9-]+$/", $str) === true && $set['single_dot_as_decimal'] === true) { |
1228 | 1228 | // Treat single dot as decimal separator |
1229 | - return (float)$str; |
|
1229 | + return (float) $str; |
|
1230 | 1230 | } else { |
1231 | 1231 | //echo "str: ".$str; echo "ret: ".str_replace('.', '', $str); echo "<br><br> "; |
1232 | 1232 | // Else, treat all dots as thousand seps |
1233 | - $str = str_replace('.', '', $str); // Erase thousand seps |
|
1233 | + $str = str_replace('.', '', $str); // Erase thousand seps |
|
1234 | 1234 | |
1235 | - return (float)$str; |
|
1235 | + return (float) $str; |
|
1236 | 1236 | } |
1237 | 1237 | } |
1238 | 1238 | } else { |
@@ -1264,7 +1264,7 @@ discard block |
||
1264 | 1264 | $ret .= '.00'; |
1265 | 1265 | } |
1266 | 1266 | if ($currencyObj) { |
1267 | - $ret = $ret . ' ' . $currencyObj->getCode(); |
|
1267 | + $ret = $ret.' '.$currencyObj->getCode(); |
|
1268 | 1268 | } |
1269 | 1269 | |
1270 | 1270 | return $ret; |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | } |
1292 | 1292 | $ret = ''; |
1293 | 1293 | if ($moduleName) { |
1294 | - $ret = "<a href='" . XOOPS_URL . "/modules/$moduleName/admin/index.php'>" . _CO_SOBJECT_ADMIN_PAGE . '</a>'; |
|
1294 | + $ret = "<a href='".XOOPS_URL."/modules/$moduleName/admin/index.php'>"._CO_SOBJECT_ADMIN_PAGE.'</a>'; |
|
1295 | 1295 | } |
1296 | 1296 | |
1297 | 1297 | return $ret; |
@@ -1302,7 +1302,7 @@ discard block |
||
1302 | 1302 | */ |
1303 | 1303 | function smart_getEditors() |
1304 | 1304 | { |
1305 | - $filename = XOOPS_ROOT_PATH . '/class/xoopseditor/xoopseditor.php'; |
|
1305 | + $filename = XOOPS_ROOT_PATH.'/class/xoopseditor/xoopseditor.php'; |
|
1306 | 1306 | if (!file_exists($filename)) { |
1307 | 1307 | return false; |
1308 | 1308 | } |
@@ -1326,9 +1326,9 @@ discard block |
||
1326 | 1326 | { |
1327 | 1327 | $ret = array(); |
1328 | 1328 | foreach ($items as $item) { |
1329 | - $ret[] = $moduleName . '_' . $item; |
|
1329 | + $ret[] = $moduleName.'_'.$item; |
|
1330 | 1330 | } |
1331 | - $ret[] = $moduleName . '_meta'; |
|
1331 | + $ret[] = $moduleName.'_meta'; |
|
1332 | 1332 | |
1333 | 1333 | return $ret; |
1334 | 1334 | } |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | if (in_array($name, $this->TOGGLE_EFFECTS)) { |
64 | - return "Effect.toggle($element,'" . str_replace('toggle_', '', $name) . "'," . $this->_options_for_javascript($js_options) . ')'; |
|
64 | + return "Effect.toggle($element,'".str_replace('toggle_', '', $name)."',".$this->_options_for_javascript($js_options).')'; |
|
65 | 65 | } else { |
66 | - return 'new Effect.' . ucwords($name) . "($element," . $this->_options_for_javascript($js_options) . ')'; |
|
66 | + return 'new Effect.'.ucwords($name)."($element,".$this->_options_for_javascript($js_options).')'; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | // } |
94 | 94 | |
95 | 95 | //if (isset($option['onUpdate'])) { |
96 | - $options['onUpdate'] = 'function(){' . $this->remote_function($options) . '}'; |
|
96 | + $options['onUpdate'] = 'function(){'.$this->remote_function($options).'}'; |
|
97 | 97 | //} |
98 | 98 | |
99 | 99 | foreach ($options as $var => $val) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | foreach ($arr as $var) { |
108 | 108 | if (isset($options[$var])) { |
109 | - $options[$var] = "'" . $options[$var] . "'"; |
|
109 | + $options[$var] = "'".$options[$var]."'"; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $options['only'] = $this->_array_or_string_for_javascript($options['only']); |
119 | 119 | } |
120 | 120 | |
121 | - return "Sortable.create('$element_id'," . $this->_options_for_javascript($options) . ')'; |
|
121 | + return "Sortable.create('$element_id',".$this->_options_for_javascript($options).')'; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | public function _dragable_element_js($element_id, $options) |
130 | 130 | { |
131 | - return 'new Draggable(\'' . $element_id . '\',' . $this->_options_for_javascript($options) . ')'; |
|
131 | + return 'new Draggable(\''.$element_id.'\','.$this->_options_for_javascript($options).')'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | //if (isset($option['onDrop'])) |
147 | 147 | |
148 | 148 | { |
149 | - $options['onDrop'] = 'function(element){' . $this->remote_function($options) . '}'; |
|
149 | + $options['onDrop'] = 'function(element){'.$this->remote_function($options).'}'; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | if (is_array($options)) { |
@@ -162,10 +162,10 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | if (isset($options['hoverclass'])) { |
165 | - $options['hoverclass'] = "'" . $options['hoverclass'] . "'"; |
|
165 | + $options['hoverclass'] = "'".$options['hoverclass']."'"; |
|
166 | 166 | } |
167 | 167 | |
168 | - return 'Droppables.add(\'' . $element_id . '\',' . $this->_options_for_javascript($options) . ')'; |
|
168 | + return 'Droppables.add(\''.$element_id.'\','.$this->_options_for_javascript($options).')'; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | ///////////////////////////////////////////////////////////////////////////////////// |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | $function = 'new Ajax.InPlaceEditor('; |
184 | 184 | $function .= "'$field_id', "; |
185 | - $function .= "'" . $options['url'] . "'"; |
|
185 | + $function .= "'".$options['url']."'"; |
|
186 | 186 | |
187 | 187 | $js_options = array(); |
188 | 188 | if (isset($options['cancel_text'])) { |
@@ -204,10 +204,10 @@ discard block |
||
204 | 204 | $js_options['size'] = $options['size']; |
205 | 205 | } |
206 | 206 | if (isset($options['external_control'])) { |
207 | - $js_options['externalControl'] = "'" . $options['external_control'] . "'"; |
|
207 | + $js_options['externalControl'] = "'".$options['external_control']."'"; |
|
208 | 208 | } |
209 | 209 | if (isset($options['load_text_url'])) { |
210 | - $js_options['loadTextURL'] = "'" . $options['load_text_url'] . "'"; |
|
210 | + $js_options['loadTextURL'] = "'".$options['load_text_url']."'"; |
|
211 | 211 | } |
212 | 212 | if (isset($options['options'])) { |
213 | 213 | $js_options['ajaxOptions'] = $options['options']; |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | $js_options['evalScripts'] = $options['script']; |
217 | 217 | } |
218 | 218 | if (isset($options['with'])) { |
219 | - $js_options['callback'] = 'function(form) { return ' . $options['with'] . ' }'; |
|
219 | + $js_options['callback'] = 'function(form) { return '.$options['with'].' }'; |
|
220 | 220 | } |
221 | 221 | |
222 | - $function .= ', ' . $this->_options_for_javascript($js_options) . ' )'; |
|
222 | + $function .= ', '.$this->_options_for_javascript($js_options).' )'; |
|
223 | 223 | if ($tag) { |
224 | 224 | return $this->tag($function); |
225 | 225 | } else { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | public function in_place_editor_field($object, $tag_options = null, $in_place_editor_options = null) |
237 | 237 | { |
238 | 238 | $ret_val = ''; |
239 | - $ret_val .= '<span id="' . $object . '" class="in_place_editor_field">' . (isset($tag_options['value']) ? $tag_options['value'] : '') . '</span>'; |
|
239 | + $ret_val .= '<span id="'.$object.'" class="in_place_editor_field">'.(isset($tag_options['value']) ? $tag_options['value'] : '').'</span>'; |
|
240 | 240 | $ret_val .= $this->in_place_editor($object, $in_place_editor_options); |
241 | 241 | |
242 | 242 | return $ret_val; |
@@ -249,23 +249,23 @@ discard block |
||
249 | 249 | */ |
250 | 250 | public function auto_complete_field($field_id, $options) |
251 | 251 | { |
252 | - $function = "var $field_id" . '_auto_completer = new Ajax.Autocompleter('; |
|
252 | + $function = "var $field_id".'_auto_completer = new Ajax.Autocompleter('; |
|
253 | 253 | $function .= "'$field_id', "; |
254 | - $function .= "'" . (isset($options['update']) ? $options['update'] : $field_id . '_auto_complete') . "', "; |
|
255 | - $function .= "'" . $options['url'] . "'"; |
|
254 | + $function .= "'".(isset($options['update']) ? $options['update'] : $field_id.'_auto_complete')."', "; |
|
255 | + $function .= "'".$options['url']."'"; |
|
256 | 256 | |
257 | 257 | $js_options = array(); |
258 | 258 | if (isset($options['tokens'])) { |
259 | 259 | $js_options['tokens'] = $this->javascript->_array_or_string_for_javascript($options['tokens']); |
260 | 260 | } |
261 | 261 | if (isset($options['with'])) { |
262 | - $js_options['callback'] = 'function(element, value) { return ' . $options['with'] . ' }'; |
|
262 | + $js_options['callback'] = 'function(element, value) { return '.$options['with'].' }'; |
|
263 | 263 | } |
264 | 264 | if (isset($options['indicator'])) { |
265 | - $js_options['indicator'] = "'" . $options['indicator'] . "'"; |
|
265 | + $js_options['indicator'] = "'".$options['indicator']."'"; |
|
266 | 266 | } |
267 | 267 | if (isset($options['select'])) { |
268 | - $js_options['select'] = "'" . $options['select'] . "'"; |
|
268 | + $js_options['select'] = "'".$options['select']."'"; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | foreach (array('on_show' => 'onShow', 'on_hide' => 'onHide', 'min_chars' => 'min_chars') as $var => $val) { |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
277 | - $function .= ', ' . $this->_options_for_javascript($js_options) . ' )'; |
|
277 | + $function .= ', '.$this->_options_for_javascript($js_options).' )'; |
|
278 | 278 | |
279 | 279 | return $this->tag($function); |
280 | 280 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | . '" ' : '') |
317 | 317 | . '>'; |
318 | 318 | |
319 | - $ret_val .= '<div id="' . $object . '_auto_complete" class="auto_complete"></div>'; |
|
319 | + $ret_val .= '<div id="'.$object.'_auto_complete" class="auto_complete"></div>'; |
|
320 | 320 | $ret_val .= $this->auto_complete_field($object, $completion_options); |
321 | 321 | |
322 | 322 | return $ret_val; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function button_to_function($name, $function = null) |
24 | 24 | { |
25 | - return '<input type="button" value="' . $name . '" onclick="' . $function . '">'; |
|
25 | + return '<input type="button" value="'.$name.'" onclick="'.$function.'">'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function tag($content) |
45 | 45 | { |
46 | - return '<script type="text/javascript">' . $content . '</script>'; |
|
46 | + return '<script type="text/javascript">'.$content.'</script>'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function link_to_function($name, $function, $html_options = null) |
56 | 56 | { |
57 | - return '<a href="' . (isset($html_options['href']) ? $html_options['href'] : '#') . '" onclick="' . (isset($html_options['onclick']) ? $html_options['onclick'] . ';' : '') . $function . '; return false;">' . $name . '</a>'; |
|
57 | + return '<a href="'.(isset($html_options['href']) ? $html_options['href'] : '#').'" onclick="'.(isset($html_options['onclick']) ? $html_options['onclick'].';' : '').$function.'; return false;">'.$name.'</a>'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | ///////////////////////////////////////////////////////////////////////////////////// |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $return_val .= $value; |
77 | 77 | } |
78 | 78 | |
79 | - return '[' . $return_val . ']'; |
|
79 | + return '['.$return_val.']'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return "'$option'"; |
@@ -99,6 +99,6 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - return '{' . $return_val . '}'; |
|
102 | + return '{'.$return_val.'}'; |
|
103 | 103 | } |
104 | 104 | } |