@@ -248,7 +248,7 @@ |
||
248 | 248 | /** |
249 | 249 | * @param $field_id |
250 | 250 | * @param $options |
251 | - * @return mixed |
|
251 | + * @return string |
|
252 | 252 | */ |
253 | 253 | public function auto_complete_field($field_id, $options) |
254 | 254 | { |
@@ -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 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | //if (isset($option['onUpdate'])) |
98 | 98 | { |
99 | - $options['onUpdate'] = 'function(){' . $this->remote_function($options) . '}'; |
|
99 | + $options['onUpdate'] = 'function(){'.$this->remote_function($options).'}'; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | foreach ($options as $var => $val) { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | foreach ($arr as $var) { |
111 | 111 | if (isset($options[$var])) { |
112 | - $options[$var] = "'" . $options[$var] . "'"; |
|
112 | + $options[$var] = "'".$options[$var]."'"; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $options['only'] = $this->_array_or_string_for_javascript($options['only']); |
122 | 122 | } |
123 | 123 | |
124 | - return "Sortable.create('$element_id'," . $this->_options_for_javascript($options) . ')'; |
|
124 | + return "Sortable.create('$element_id',".$this->_options_for_javascript($options).')'; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function _dragable_element_js($element_id, $options) |
133 | 133 | { |
134 | - return 'new Draggable(\'' . $element_id . '\',' . $this->_options_for_javascript($options) . ')'; |
|
134 | + return 'new Draggable(\''.$element_id.'\','.$this->_options_for_javascript($options).')'; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | //if (isset($option['onDrop'])) |
151 | 151 | { |
152 | - $options['onDrop'] = 'function(element){' . $this->remote_function($options) . '}'; |
|
152 | + $options['onDrop'] = 'function(element){'.$this->remote_function($options).'}'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | if (is_array($options)) { |
@@ -165,10 +165,10 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | if (isset($options['hoverclass'])) { |
168 | - $options['hoverclass'] = "'" . $options['hoverclass'] . "'"; |
|
168 | + $options['hoverclass'] = "'".$options['hoverclass']."'"; |
|
169 | 169 | } |
170 | 170 | |
171 | - return 'Droppables.add(\'' . $element_id . '\',' . $this->_options_for_javascript($options) . ')'; |
|
171 | + return 'Droppables.add(\''.$element_id.'\','.$this->_options_for_javascript($options).')'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | ///////////////////////////////////////////////////////////////////////////////////// |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | { |
186 | 186 | $function = 'new Ajax.InPlaceEditor('; |
187 | 187 | $function .= "'$field_id', "; |
188 | - $function .= "'" . $options['url'] . "'"; |
|
188 | + $function .= "'".$options['url']."'"; |
|
189 | 189 | |
190 | 190 | $js_options = []; |
191 | 191 | if (isset($options['cancel_text'])) { |
@@ -207,10 +207,10 @@ discard block |
||
207 | 207 | $js_options['size'] = $options['size']; |
208 | 208 | } |
209 | 209 | if (isset($options['external_control'])) { |
210 | - $js_options['externalControl'] = "'" . $options['external_control'] . "'"; |
|
210 | + $js_options['externalControl'] = "'".$options['external_control']."'"; |
|
211 | 211 | } |
212 | 212 | if (isset($options['load_text_url'])) { |
213 | - $js_options['loadTextURL'] = "'" . $options['load_text_url'] . "'"; |
|
213 | + $js_options['loadTextURL'] = "'".$options['load_text_url']."'"; |
|
214 | 214 | } |
215 | 215 | if (isset($options['options'])) { |
216 | 216 | $js_options['ajaxOptions'] = $options['options']; |
@@ -219,10 +219,10 @@ discard block |
||
219 | 219 | $js_options['evalScripts'] = $options['script']; |
220 | 220 | } |
221 | 221 | if (isset($options['with'])) { |
222 | - $js_options['callback'] = 'function(form) { return ' . $options['with'] . ' }'; |
|
222 | + $js_options['callback'] = 'function(form) { return '.$options['with'].' }'; |
|
223 | 223 | } |
224 | 224 | |
225 | - $function .= ', ' . $this->_options_for_javascript($js_options) . ' )'; |
|
225 | + $function .= ', '.$this->_options_for_javascript($js_options).' )'; |
|
226 | 226 | if ($tag) { |
227 | 227 | return $this->tag($function); |
228 | 228 | } else { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | public function in_place_editor_field($object, $tag_options = null, $in_place_editor_options = null) |
240 | 240 | { |
241 | 241 | $ret_val = ''; |
242 | - $ret_val .= '<span id="' . $object . '" class="in_place_editor_field">' . (isset($tag_options['value']) ? $tag_options['value'] : '') . '</span>'; |
|
242 | + $ret_val .= '<span id="'.$object.'" class="in_place_editor_field">'.(isset($tag_options['value']) ? $tag_options['value'] : '').'</span>'; |
|
243 | 243 | $ret_val .= $this->in_place_editor($object, $in_place_editor_options); |
244 | 244 | |
245 | 245 | return $ret_val; |
@@ -252,23 +252,23 @@ discard block |
||
252 | 252 | */ |
253 | 253 | public function auto_complete_field($field_id, $options) |
254 | 254 | { |
255 | - $function = "var $field_id" . '_auto_completer = new Ajax.Autocompleter('; |
|
255 | + $function = "var $field_id".'_auto_completer = new Ajax.Autocompleter('; |
|
256 | 256 | $function .= "'$field_id', "; |
257 | - $function .= "'" . (isset($options['update']) ? $options['update'] : $field_id . '_auto_complete') . "', "; |
|
258 | - $function .= "'" . $options['url'] . "'"; |
|
257 | + $function .= "'".(isset($options['update']) ? $options['update'] : $field_id.'_auto_complete')."', "; |
|
258 | + $function .= "'".$options['url']."'"; |
|
259 | 259 | |
260 | 260 | $js_options = []; |
261 | 261 | if (isset($options['tokens'])) { |
262 | 262 | $js_options['tokens'] = $this->javascript->_array_or_string_for_javascript($options['tokens']); |
263 | 263 | } |
264 | 264 | if (isset($options['with'])) { |
265 | - $js_options['callback'] = 'function(element, value) { return ' . $options['with'] . ' }'; |
|
265 | + $js_options['callback'] = 'function(element, value) { return '.$options['with'].' }'; |
|
266 | 266 | } |
267 | 267 | if (isset($options['indicator'])) { |
268 | - $js_options['indicator'] = "'" . $options['indicator'] . "'"; |
|
268 | + $js_options['indicator'] = "'".$options['indicator']."'"; |
|
269 | 269 | } |
270 | 270 | if (isset($options['select'])) { |
271 | - $js_options['select'] = "'" . $options['select'] . "'"; |
|
271 | + $js_options['select'] = "'".$options['select']."'"; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | foreach (['on_show' => 'onShow', 'on_hide' => 'onHide', 'min_chars' => 'min_chars'] as $var => $val) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | } |
278 | 278 | } |
279 | 279 | |
280 | - $function .= ', ' . $this->_options_for_javascript($js_options) . ' )'; |
|
280 | + $function .= ', '.$this->_options_for_javascript($js_options).' )'; |
|
281 | 281 | |
282 | 282 | return $this->tag($function); |
283 | 283 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | . '" ' : '') |
320 | 320 | . '>'; |
321 | 321 | |
322 | - $ret_val .= '<div id="' . $object . '_auto_complete" class="auto_complete"></div>'; |
|
322 | + $ret_val .= '<div id="'.$object.'_auto_complete" class="auto_complete"></div>'; |
|
323 | 323 | $ret_val .= $this->auto_complete_field($object, $completion_options); |
324 | 324 | |
325 | 325 | return $ret_val; |
@@ -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 |
@@ -248,7 +248,7 @@ |
||
248 | 248 | /** |
249 | 249 | * @param $field_id |
250 | 250 | * @param $options |
251 | - * @return mixed |
|
251 | + * @return string |
|
252 | 252 | */ |
253 | 253 | public function auto_complete_field($field_id, $options) |
254 | 254 | { |
@@ -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 = []; |
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 = []; |
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 (['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; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param $javascript |
30 | - * @return mixed|string |
|
30 | + * @return string |
|
31 | 31 | */ |
32 | 32 | public function escape($javascript) |
33 | 33 | { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @param $name |
51 | - * @param $function |
|
51 | + * @param string $function |
|
52 | 52 | * @param null $html_options |
53 | 53 | * @return string |
54 | 54 | */ |
@@ -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 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
215 | - * @param $klass |
|
215 | + * @param string $klass |
|
216 | 216 | * @param $name |
217 | 217 | * @param null $options |
218 | 218 | * @return string |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
314 | - * @param $variable |
|
314 | + * @param string $variable |
|
315 | 315 | * @param $value |
316 | 316 | * @return string |
317 | 317 | */ |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
324 | - * @param $function |
|
324 | + * @param string $function |
|
325 | 325 | * @param null $args |
326 | 326 | * @return string |
327 | 327 | */ |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $options['form'] = true; |
65 | 65 | |
66 | - return '<form action="' . $options['url'] . '" onsubmit="' . $this->remote_function($options) . '; return false;" method="' . (isset($options['method']) ? $options['method'] : 'post') . '" >'; |
|
66 | + return '<form action="'.$options['url'].'" onsubmit="'.$this->remote_function($options).'; return false;" method="'.(isset($options['method']) ? $options['method'] : 'post').'" >'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | public function periodically_call_remote($options = null) |
113 | 113 | { |
114 | 114 | $frequency = isset($options['frequency']) ? $options['frequency'] : 10; |
115 | - $code = 'new PeriodicalExecuter(function() {' . $this->remote_function($options) . '},' . $frequency . ')'; |
|
115 | + $code = 'new PeriodicalExecuter(function() {'.$this->remote_function($options).'},'.$frequency.')'; |
|
116 | 116 | |
117 | 117 | return $code; |
118 | 118 | } |
@@ -128,22 +128,22 @@ discard block |
||
128 | 128 | $update = ''; |
129 | 129 | |
130 | 130 | if (isset($options['update']) && is_array($options['update'])) { |
131 | - $update = isset($options['update']['success']) ? 'success: ' . $options['update']['success'] : ''; |
|
131 | + $update = isset($options['update']['success']) ? 'success: '.$options['update']['success'] : ''; |
|
132 | 132 | $update .= empty($update) ? '' : ','; |
133 | - $update .= isset($options['update']['failure']) ? 'failure: ' . $options['update']['failure'] : ''; |
|
133 | + $update .= isset($options['update']['failure']) ? 'failure: '.$options['update']['failure'] : ''; |
|
134 | 134 | } else { |
135 | 135 | $update .= isset($options['update']) ? $options['update'] : ''; |
136 | 136 | } |
137 | 137 | |
138 | - $ajax_function = empty($update) ? 'new Ajax.Request(' : 'new Ajax.Updater(\'' . $update . '\','; |
|
138 | + $ajax_function = empty($update) ? 'new Ajax.Request(' : 'new Ajax.Updater(\''.$update.'\','; |
|
139 | 139 | |
140 | - $ajax_function .= "'" . $options['url'] . "'"; |
|
141 | - $ajax_function .= ',' . $javascript_options . ')'; |
|
140 | + $ajax_function .= "'".$options['url']."'"; |
|
141 | + $ajax_function .= ','.$javascript_options.')'; |
|
142 | 142 | |
143 | - $ajax_function = isset($options['before']) ? $options['before'] . ';' . $ajax_function : $ajax_function; |
|
144 | - $ajax_function = isset($options['after']) ? $ajax_function . ';' . $options['after'] : $ajax_function; |
|
145 | - $ajax_function = isset($options['condition']) ? 'if (' . $options['condition'] . ') {' . $ajax_function . '}' : $ajax_function; |
|
146 | - $ajax_function = isset($options['confirm']) ? 'if ( confirm(\'' . $options['confirm'] . '\' ) ) { ' . $ajax_function . ' } ' : $ajax_function; |
|
143 | + $ajax_function = isset($options['before']) ? $options['before'].';'.$ajax_function : $ajax_function; |
|
144 | + $ajax_function = isset($options['after']) ? $ajax_function.';'.$options['after'] : $ajax_function; |
|
145 | + $ajax_function = isset($options['condition']) ? 'if ('.$options['condition'].') {'.$ajax_function.'}' : $ajax_function; |
|
146 | + $ajax_function = isset($options['confirm']) ? 'if ( confirm(\''.$options['confirm'].'\' ) ) { '.$ajax_function.' } ' : $ajax_function; |
|
147 | 147 | |
148 | 148 | return $ajax_function; |
149 | 149 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $options['with'] = 'Form.serialize(this.form)'; |
161 | 161 | } |
162 | 162 | |
163 | - return '<input type="button" onclick="' . $this->remote_function($options) . '" name="' . $name . '" value ="' . $value . '">'; |
|
163 | + return '<input type="button" onclick="'.$this->remote_function($options).'" name="'.$name.'" value ="'.$value.'">'; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | $callbacks = []; |
204 | 204 | foreach ($options as $callback => $code) { |
205 | 205 | if (in_array($callback, $this->CALLBACKS)) { |
206 | - $name = 'on' . ucfirst($callback); |
|
207 | - $callbacks[$name] = 'function(request){' . $code . '}'; |
|
206 | + $name = 'on'.ucfirst($callback); |
|
207 | + $callbacks[$name] = 'function(request){'.$code.'}'; |
|
208 | 208 | } |
209 | 209 | } |
210 | 210 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | public function _build_observer($klass, $name, $options = null) |
221 | 221 | { |
222 | 222 | if (isset($options['with']) && false === strpos($options['with'], '=')) { |
223 | - $options['with'] = '\'' . $options['with'] . '=\' + value'; |
|
223 | + $options['with'] = '\''.$options['with'].'=\' + value'; |
|
224 | 224 | } elseif (isset($options['with']) && isset($options['update'])) { |
225 | 225 | $options['with'] = 'value'; |
226 | 226 | } |
@@ -228,10 +228,10 @@ discard block |
||
228 | 228 | $callback = $options['function'] ?: $this->remote_function($options); |
229 | 229 | |
230 | 230 | $javascript = "new $klass('$name', "; |
231 | - $javascript .= isset($options['frequency']) ? $options['frequency'] . ', ' : ''; |
|
231 | + $javascript .= isset($options['frequency']) ? $options['frequency'].', ' : ''; |
|
232 | 232 | $javascript .= 'function (element,value) { '; |
233 | 233 | $javascript .= $callback; |
234 | - $javascript .= isset($options['on']) ? ', ' . $options['on'] : ''; |
|
234 | + $javascript .= isset($options['on']) ? ', '.$options['on'] : ''; |
|
235 | 235 | $javascript .= '})'; |
236 | 236 | |
237 | 237 | return $javascript; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | if (isset($options['position'])) { |
266 | - $js_options['insertion'] = 'Insertion.' . ucfirst($options['position']); |
|
266 | + $js_options['insertion'] = 'Insertion.'.ucfirst($options['position']); |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | $js_options['evalScripts'] = isset($options['script']) ? $options['script'] : 'true'; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | if (isset($options['form'])) { |
272 | 272 | $js_options['parameters'] = 'Form.serialize(this)'; |
273 | 273 | } elseif (isset($options['parameters'])) { |
274 | - $js_options['parameters'] = 'Form.serialize(\'' . $options['submit'] . '\')'; |
|
274 | + $js_options['parameters'] = 'Form.serialize(\''.$options['submit'].'\')'; |
|
275 | 275 | } elseif (isset($options['with'])) { |
276 | 276 | $js_options['parameters'] = $options['with']; |
277 | 277 | } |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | public function ID($id, $extend = null) |
300 | 300 | { |
301 | - return "$('$id')" . (!empty($extend)) ? '.' . $extend . '()' : ''; |
|
301 | + return "$('$id')".(!empty($extend)) ? '.'.$extend.'()' : ''; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | /** |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | */ |
358 | 358 | public function delay($seconds = 1, $script = '') |
359 | 359 | { |
360 | - return "setTimeout( function() { $script } , " . ($seconds * 1000) . ' )'; |
|
360 | + return "setTimeout( function() { $script } , ".($seconds * 1000).' )'; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | /** |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | $args = array_merge([$id], (is_array($options_for_render) ? $options_for_render : [$options_for_render])); |
381 | 381 | |
382 | - return $this->call('new Insertion.' . ucfirst($position), $args); |
|
382 | + return $this->call('new Insertion.'.ucfirst($position), $args); |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | /** |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | */ |
444 | 444 | public function select($pattern, $extend = null) |
445 | 445 | { |
446 | - return "$$('$pattern')" . (!empty($extend)) ? '.' . $extend : ''; |
|
446 | + return "$$('$pattern')".(!empty($extend)) ? '.'.$extend : ''; |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | /** |
@@ -18,6 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32); |
21 | -echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>'; |
|
21 | +echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>'; |
|
22 | 22 | |
23 | 23 | xoops_cp_footer(); |
@@ -14,9 +14,9 @@ |
||
14 | 14 | */ |
15 | 15 | |
16 | 16 | if (!class_exists('Projax')) { |
17 | - include __DIR__ . '/classes/JavaScript.php'; |
|
18 | - include __DIR__ . '/classes/Prototype.php'; |
|
19 | - include __DIR__ . '/classes/Scriptaculous.php'; |
|
17 | + include __DIR__.'/classes/JavaScript.php'; |
|
18 | + include __DIR__.'/classes/Prototype.php'; |
|
19 | + include __DIR__.'/classes/Scriptaculous.php'; |
|
20 | 20 | |
21 | 21 | // For $projax = new Projax(); |
22 | 22 |
@@ -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>"; |