Completed
Push — master ( c5aa4f...a09810 )
by Michael
02:13
created
admin/update.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 
10
-require_once __DIR__ . '/admin_header.php';
11
-require_once SMARTCONTENT_ROOT_PATH . 'class/dbupdater.php';
10
+require_once __DIR__.'/admin_header.php';
11
+require_once SMARTCONTENT_ROOT_PATH.'class/dbupdater.php';
12 12
 
13 13
 smartcontent_xoops_cp_header();
14 14
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     $ret = array();
208 208
     global $xoopsDB;
209 209
     $catHandler = xoops_getModuleHandler('category', 'wfdownloads');
210
-    $result     = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table);
210
+    $result     = $xoopsDB->query('SHOW COLUMNS FROM '.$catHandler->table);
211 211
     while ($existing_field = $xoopsDB->fetchArray($result)) {
212 212
         $fields[$existing_field['field']] = $existing_field['type'];
213 213
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
267 267
             //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>";
268 268
         } elseif ($existing_fields[$field] != $type) {
269
-            $table->addAlteredField($field, $field . ' ' . $type);
269
+            $table->addAlteredField($field, $field.' '.$type);
270 270
             // check $fields[$field]['type'] for things like "int(10) unsigned"
271 271
             //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
272 272
             //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>";
@@ -287,17 +287,17 @@  discard block
 block discarded – undo
287 287
 function get_table_info($table, $default_fields)
288 288
 {
289 289
     global $xoopsDB;
290
-    $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table);
290
+    $result = $xoopsDB->query('SHOW COLUMNS FROM '.$table);
291 291
     while ($existing_field = $xoopsDB->fetchArray($result)) {
292 292
         $fields[$existing_field['Field']] = $existing_field['Type'];
293 293
         if ($existing_field['Null'] !== 'YES') {
294 294
             $fields[$existing_field['Field']] .= ' NOT NULL';
295 295
         }
296 296
         if ($existing_field['Extra']) {
297
-            $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
297
+            $fields[$existing_field['Field']] .= ' '.$existing_field['Extra'];
298 298
         }
299 299
         if ($default_fields[$existing_field['Field']]['Default']) {
300
-            $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
300
+            $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
301 301
         }
302 302
     }
303 303
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         if (in_array($field, array_keys($renamed_fields))) {
320 320
             $new_field_name = $renamed_fields[$field];
321 321
             $new_field_type = $new_fields[$new_field_name]['Type'];
322
-            $table->addAltered($field, $new_field_name . ' ' . $new_field_type);
322
+            $table->addAltered($field, $new_field_name.' '.$new_field_type);
323 323
             //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
324 324
             //echo $field." Renamed to ".$new_field_name."<br>";
325 325
             $fields[$new_field_name] = $new_field_type;
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     //return $fields;
329 329
 }
330 330
 
331
-$op = isset($_REQUEST['op']) ? (int)$_REQUEST['op'] : 0;
331
+$op = isset($_REQUEST['op']) ? (int) $_REQUEST['op'] : 0;
332 332
 switch ($op) {
333 333
     case 1:
334 334
         // Make sure that nohtml is properly changed to dohtml
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
     default:
349 349
         //ask what to do
350
-        include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
350
+        include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
351 351
         $form = new XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']);
352 352
 
353 353
         //Is MyDownloads installed?
@@ -372,4 +372,4 @@  discard block
 block discarded – undo
372 372
 }
373 373
 //wfdownloads_modFooter();
374 374
 //xoops_cp_footer();
375
-require_once __DIR__ . '/admin_footer.php';
375
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
print.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-require_once __DIR__ . '/header.php';
10
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php';
11
-require_once XOOPS_ROOT_PATH . '/class/template.php';
9
+require_once __DIR__.'/header.php';
10
+require_once SMARTOBJECT_ROOT_PATH.'class/smartloader.php';
11
+require_once XOOPS_ROOT_PATH.'/class/template.php';
12 12
 
13 13
 $xoopsTpl                = new XoopsTpl();
14 14
 $myts                    = MyTextSanitizer::getInstance();
Please login to merge, or discard this patch.
include/adsense.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@
 block discarded – undo
13 13
     global $xoopsTpl, $smartobjectAdsenseHandler;
14 14
     if (is_object($xoopsTpl)) {
15 15
         foreach ($smartobjectAdsenseHandler->objects as $k => $v) {
16
-            $xoopsTpl->assign('adsense_' . $k, $v->render());
16
+            $xoopsTpl->assign('adsense_'.$k, $v->render());
17 17
         }
18 18
     }
19 19
 }
20 20
 
21 21
 if (!defined('SMARTOBJECT_URL')) {
22
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
22
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
23 23
 }
24 24
 
25
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php';
26
-require_once SMARTOBJECT_ROOT_PATH . 'class/adsense.php';
25
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/functions.php';
26
+require_once SMARTOBJECT_ROOT_PATH.'class/adsense.php';
27 27
 
28 28
 $smartobjectAdsenseHandler = xoops_getModuleHandler('adsense', 'smartobject');
29 29
 $smartobjectAdsensesObj    = $smartobjectAdsenseHandler->getAdsensesByTag();
Please login to merge, or discard this patch.
include/currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 smart_loadCommonLanguageFile();
12 12
 
13
-require_once SMARTOBJECT_ROOT_PATH . 'class/currency.php';
13
+require_once SMARTOBJECT_ROOT_PATH.'class/currency.php';
14 14
 
15 15
 static $smartobjectCurrenciesObj, $smartobjectCurrenciesArray, $smartobjectDefaultCurrency;
16 16
 
Please login to merge, or discard this patch.
include/customtag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
 }
20 20
 
21 21
 if (!defined('SMARTOBJECT_URL')) {
22
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
22
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
23 23
 }
24 24
 
25 25
 smart_loadLanguageFile('smartobject', 'customtag');
26 26
 
27
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php';
28
-require_once SMARTOBJECT_ROOT_PATH . 'class/customtag.php';
27
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/functions.php';
28
+require_once SMARTOBJECT_ROOT_PATH.'class/customtag.php';
29 29
 
30 30
 $smartobjectCustomtagHandler = xoops_getModuleHandler('customtag', 'smartobject');
31 31
 $smartobjectCustomTagsObj    = $smartobjectCustomtagHandler->getCustomtagsByName();
Please login to merge, or discard this patch.
include/rating.rate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
10 10
 
11 11
 if (!defined('SMARTOBJECT_URL')) {
12
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
13 13
 }
14
-require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php';
15
-require_once SMARTOBJECT_ROOT_PATH . 'include/functions.php';
14
+require_once SMARTOBJECT_ROOT_PATH.'class/rating.php';
15
+require_once SMARTOBJECT_ROOT_PATH.'include/functions.php';
16 16
 
17 17
 smart_loadLanguageFile('smartobject', 'rating');
18 18
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $urls = smart_getCurrentUrls();
44 44
             $xoopsTpl->assign('smartobject_rating_current_page', $urls['full']);
45 45
             if (isset($xoTheme) && is_object($xoTheme)) {
46
-                $xoTheme->addStylesheet(SMARTOBJECT_URL . 'assets/css/module.css');
46
+                $xoTheme->addStylesheet(SMARTOBJECT_URL.'assets/css/module.css');
47 47
             } else {
48 48
                 //probleme d'inclusion de css apres le flashplayer. Style plac� dans css du theme
49 49
                 //$xoopsTpl->assign('smartobject_css',"<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartobject/assets/css/module.css'>");
Please login to merge, or discard this patch.
include/projax/classes/Scriptaculous.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 = array();
191 191
         if (isset($options['cancel_text'])) {
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 = array();
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 (array('on_show' => 'onShow', 'on_hide' => 'onHide', 'min_chars' => 'min_chars') as $var => $val) {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
include/projax/classes/JavaScript.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
99 99
             }
100 100
         }
101 101
 
102
-        return '{' . $return_val . '}';
102
+        return '{'.$return_val.'}';
103 103
     }
104 104
 }
Please login to merge, or discard this patch.
include/projax/classes/Prototype.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
203 203
         $callbacks = array();
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
379 379
     {
380 380
         $args = array_merge(array($id), (is_array($options_for_render) ? $options_for_render : array($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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.