@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | if ($this->singlewords) { |
79 | 79 | $keywords = explode(' ', $this->preg_keywords); |
80 | 80 | foreach ($keywords as $keyword) { |
81 | - $patterns[] = '/(?' . '>' . $keyword . '+)/si'; |
|
81 | + $patterns[] = '/(?'.'>'.$keyword.'+)/si'; |
|
82 | 82 | } |
83 | 83 | } else { |
84 | - $patterns[] = '/(?' . '>' . $this->preg_keywords . '+)/si'; |
|
84 | + $patterns[] = '/(?'.'>'.$this->preg_keywords.'+)/si'; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $result = $replace_matches[0]; |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function highlight($buffer) |
106 | 106 | { |
107 | - $buffer = '>' . $buffer . '<'; |
|
107 | + $buffer = '>'.$buffer.'<'; |
|
108 | 108 | $this->preg_keywords = preg_replace('/[^\w ]/si', '', $this->keywords); |
109 | - $buffer = preg_replace_callback("/(\>(((?" . ">[^><]+)|(?R))*)\<)/is", array(&$this, 'replace'), $buffer); |
|
109 | + $buffer = preg_replace_callback("/(\>(((?".">[^><]+)|(?R))*)\<)/is", array(&$this, 'replace'), $buffer); |
|
110 | 110 | $buffer = substr($buffer, 1, -1); |
111 | 111 | |
112 | 112 | return $buffer; |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function __construct($layout = 0, $method = 1) |
22 | 22 | { |
23 | - $layout = (int)$layout; |
|
23 | + $layout = (int) $layout; |
|
24 | 24 | if ($layout < 0 || $layout > 3) { |
25 | 25 | $layout = 0; |
26 | 26 | } |
27 | 27 | $this->_layout = $layout; |
28 | 28 | |
29 | - $method = (int)$method; |
|
29 | + $method = (int) $method; |
|
30 | 30 | if ($method < 0 || $method > 1) { |
31 | 31 | $method = 1; |
32 | 32 | } |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | { |
42 | 42 | global $xoTheme, $xoopsTpl; |
43 | 43 | |
44 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
44 | + $xoTheme->addStylesheet(SMARTOBJECT_URL.'include/addto/addto.css'); |
|
45 | 45 | |
46 | 46 | $xoopsTpl->assign('smartobject_addto_method', $this->_method); |
47 | 47 | $xoopsTpl->assign('smartobject_addto_layout', $this->_layout); |
48 | 48 | |
49 | - $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL . 'include/addto/'); |
|
49 | + $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL.'include/addto/'); |
|
50 | 50 | |
51 | 51 | if ($fetchOnly) { |
52 | 52 | return $xoopsTpl->fetch('db:smartobject_addto.tpl'); |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | { |
63 | 63 | global $xoTheme; |
64 | 64 | |
65 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
65 | + $xoTheme->addStylesheet(SMARTOBJECT_URL.'include/addto/addto.css'); |
|
66 | 66 | |
67 | 67 | $block = array(); |
68 | 68 | $block['smartobject_addto_method'] = $this->_method; |
69 | 69 | $block['smartobject_addto_layout'] = $this->_layout; |
70 | - $block['smartobject_addto_url'] = SMARTOBJECT_URL . 'include/addto/'; |
|
70 | + $block['smartobject_addto_url'] = SMARTOBJECT_URL.'include/addto/'; |
|
71 | 71 | |
72 | 72 | return $block; |
73 | 73 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $var = $object->vars[$key]; |
23 | 23 | $control = $object->controls[$key]; |
24 | 24 | |
25 | - parent::__construct($var['form_caption'], '<br><br>', $key . '_signature_tray'); |
|
25 | + parent::__construct($var['form_caption'], '<br><br>', $key.'_signature_tray'); |
|
26 | 26 | |
27 | 27 | $signature_textarea = new XoopsFormDhtmlTextArea('', $key, $object->getVar($key, 'e')); |
28 | 28 | $this->addElement($signature_textarea); |
@@ -21,18 +21,18 @@ |
||
21 | 21 | { |
22 | 22 | parent::__construct($form_caption, ' '); |
23 | 23 | |
24 | - $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URLLINK_URL)); |
|
25 | - $this->addElement(new SmartFormTextElement($object, 'url_' . $key)); |
|
24 | + $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URLLINK_URL)); |
|
25 | + $this->addElement(new SmartFormTextElement($object, 'url_'.$key)); |
|
26 | 26 | |
27 | - $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_CAPTION)); |
|
28 | - $this->addElement(new SmartFormTextElement($object, 'caption_' . $key)); |
|
27 | + $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_CAPTION)); |
|
28 | + $this->addElement(new SmartFormTextElement($object, 'caption_'.$key)); |
|
29 | 29 | |
30 | - $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_DESC . '<br>')); |
|
31 | - $this->addElement(new XoopsFormTextArea('', 'desc_' . $key, $object->getVar('description'))); |
|
30 | + $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_DESC.'<br>')); |
|
31 | + $this->addElement(new XoopsFormTextArea('', 'desc_'.$key, $object->getVar('description'))); |
|
32 | 32 | |
33 | - $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URLLINK_TARGET)); |
|
33 | + $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URLLINK_TARGET)); |
|
34 | 34 | $targ_val = $object->getVar('target'); |
35 | - $targetRadio = new XoopsFormRadio('', 'target_' . $key, $targ_val !== '' ? $targ_val : '_blank'); |
|
35 | + $targetRadio = new XoopsFormRadio('', 'target_'.$key, $targ_val !== '' ? $targ_val : '_blank'); |
|
36 | 36 | $control = $object->getControl('target'); |
37 | 37 | $targetRadio->addOptionArray($control['options']); |
38 | 38 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | for ($i = 0; $i < 24; ++$i) { |
24 | 24 | for ($j = 0; $j < 60; $j += 10) { |
25 | 25 | $key_t = ($i * 3600) + ($j * 60); |
26 | - $timearray[$key_t] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j; |
|
26 | + $timearray[$key_t] = ($j != 0) ? $i.':'.$j : $i.':0'.$j; |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | ksort($timearray); |
@@ -50,12 +50,12 @@ |
||
50 | 50 | $var = $object->vars[$key]; |
51 | 51 | $control = $object->controls[$key]; |
52 | 52 | |
53 | - parent::__construct($var['form_caption'] . '<br>' . _US_TYPEPASSTWICE, ' ', $key . '_password_tray'); |
|
53 | + parent::__construct($var['form_caption'].'<br>'._US_TYPEPASSTWICE, ' ', $key.'_password_tray'); |
|
54 | 54 | |
55 | - $password_box1 = new XoopsFormPassword('', $key . '1', 10, 32); |
|
55 | + $password_box1 = new XoopsFormPassword('', $key.'1', 10, 32); |
|
56 | 56 | $this->addElement($password_box1); |
57 | 57 | |
58 | - $password_box2 = new XoopsFormPassword('', $key . '2', 10, 32); |
|
58 | + $password_box2 = new XoopsFormPassword('', $key.'2', 10, 32); |
|
59 | 59 | $this->addElement($password_box2); |
60 | 60 | } |
61 | 61 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | class XoopsCaptcha |
15 | 15 | { |
16 | 16 | public $active = true; |
17 | - public $mode = 'text'; // potential values: image, text |
|
17 | + public $mode = 'text'; // potential values: image, text |
|
18 | 18 | public $config = array(); |
19 | 19 | |
20 | 20 | public $message = array(); // Logging error messages |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function __construct() |
26 | 26 | { |
27 | 27 | // Loading default preferences |
28 | - $this->config = @include __DIR__ . '/config.php'; |
|
28 | + $this->config = @include __DIR__.'/config.php'; |
|
29 | 29 | |
30 | 30 | $this->setMode($this->config['mode']); |
31 | 31 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | { |
128 | 128 | $sessionName = @$_SESSION['XoopsCaptcha_name']; |
129 | 129 | $skipMember = ($skipMember === null) ? @$_SESSION['XoopsCaptcha_skipmember'] : $skipMember; |
130 | - $maxAttempts = (int)(@$_SESSION['XoopsCaptcha_maxattempts']); |
|
130 | + $maxAttempts = (int) (@$_SESSION['XoopsCaptcha_maxattempts']); |
|
131 | 131 | |
132 | 132 | $is_valid = false; |
133 | 133 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | if (is_object($GLOBALS['xoopsUser']) && !empty($skipMember)) { |
136 | 136 | $is_valid = true; |
137 | 137 | // Kill too many attempts |
138 | - } elseif (!empty($maxAttempts) && $_SESSION['XoopsCaptcha_attempt_' . $sessionName] > $maxAttempts) { |
|
138 | + } elseif (!empty($maxAttempts) && $_SESSION['XoopsCaptcha_attempt_'.$sessionName] > $maxAttempts) { |
|
139 | 139 | $this->message[] = XOOPS_CAPTCHA_TOOMANYATTEMPTS; |
140 | 140 | |
141 | 141 | // Verify the code |
@@ -147,13 +147,13 @@ discard block |
||
147 | 147 | if (!empty($maxAttempts)) { |
148 | 148 | if (!$is_valid) { |
149 | 149 | // Increase the attempt records on failure |
150 | - $_SESSION['XoopsCaptcha_attempt_' . $sessionName]++; |
|
150 | + $_SESSION['XoopsCaptcha_attempt_'.$sessionName]++; |
|
151 | 151 | // Log the error message |
152 | 152 | $this->message[] = XOOPS_CAPTCHA_INVALID_CODE; |
153 | 153 | } else { |
154 | 154 | |
155 | 155 | // reset attempt records on success |
156 | - $_SESSION['XoopsCaptcha_attempt_' . $sessionName] = null; |
|
156 | + $_SESSION['XoopsCaptcha_attempt_'.$sessionName] = null; |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | $this->destroyGarbage(true); |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function destroyGarbage($clearSession = false) |
186 | 186 | { |
187 | - require_once __DIR__ . '/' . $this->mode . '.php'; |
|
188 | - $class = 'XoopsCaptcha' . ucfirst($this->mode); |
|
187 | + require_once __DIR__.'/'.$this->mode.'.php'; |
|
188 | + $class = 'XoopsCaptcha'.ucfirst($this->mode); |
|
189 | 189 | $captchaHandler = new $class(); |
190 | 190 | if (method_exists($captchaHandler, 'destroyGarbage')) { |
191 | 191 | $captchaHandler->loadConfig($this->config); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | |
226 | 226 | // Fail on too many attempts |
227 | - if (!empty($maxAttempts) && @$_SESSION['XoopsCaptcha_attempt_' . $this->config['name']] > $maxAttempts) { |
|
227 | + if (!empty($maxAttempts) && @$_SESSION['XoopsCaptcha_attempt_'.$this->config['name']] > $maxAttempts) { |
|
228 | 228 | $form = XOOPS_CAPTCHA_TOOMANYATTEMPTS; |
229 | 229 | // Load the form element |
230 | 230 | } else { |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | */ |
240 | 240 | public function loadForm() |
241 | 241 | { |
242 | - require_once __DIR__ . '/' . $this->mode . '.php'; |
|
243 | - $class = 'XoopsCaptcha' . ucfirst($this->mode); |
|
242 | + require_once __DIR__.'/'.$this->mode.'.php'; |
|
243 | + $class = 'XoopsCaptcha'.ucfirst($this->mode); |
|
244 | 244 | $captchaHandler = new $class(); |
245 | 245 | $captchaHandler->loadConfig($this->config); |
246 | 246 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | function xoops_debug_dumbQuery($msg = '') |
16 | 16 | { |
17 | 17 | global $xoopsDB; |
18 | - $xoopsDB->query('SELECT * ' . $msg . ' FROM dudewhereismycar2'); |
|
18 | + $xoopsDB->query('SELECT * '.$msg.' FROM dudewhereismycar2'); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | function xoops_debug_initiateQueryCount() |
@@ -178,7 +178,7 @@ |
||
178 | 178 | define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2', 'Vertical with icons'); |
179 | 179 | define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3', 'Vertical no icon'); |
180 | 180 | define('_CO_SOBJECT_CURRENT_FILE', 'Current file: '); |
181 | -define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print " . XOOPS_URL); |
|
181 | +define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print ".XOOPS_URL); |
|
182 | 182 | define('_CO_SOBJECT_URL_FILE', 'URL: '); |
183 | 183 | define('_CO_SOBJECT_UPLOAD', 'Select a file to upload: '); |
184 | 184 |