Completed
Push — master ( 01b1a5...81f493 )
by Michael
04:03
created
class/smartobjecttag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // -------------------------------------------------------------------------//
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31
-include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartmlobject.php';
31
+include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartmlobject.php';
32 32
 
33 33
 /**
34 34
  * Class SmartobjectTag
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function getLanguages()
71 71
     {
72
-        include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
72
+        include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
73 73
         $aLanguages     = XoopsLists::getLangList();
74 74
         $ret['default'] = _CO_SOBJECT_ALL;
75 75
         foreach ($aLanguages as $lang) {
Please login to merge, or discard this patch.
class/smartmetagen.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@
 block discarded – undo
325 325
     public function createMetaKeywords()
326 326
     {
327 327
         global $xoopsModuleConfig;
328
-        $keywords = $this->findMetaKeywords($this->_original_title . ' ' . $this->_description, $this->_minChar);
328
+        $keywords = $this->findMetaKeywords($this->_original_title.' '.$this->_description, $this->_minChar);
329 329
         if (isset($xoopsModuleConfig) && isset($xoopsModuleConfig['moduleMetaKeywords']) && $xoopsModuleConfig['moduleMetaKeywords'] !== '') {
330 330
             $moduleKeywords = explode(',', $xoopsModuleConfig['moduleMetaKeywords']);
331 331
             $keywords       = array_merge($keywords, $moduleKeywords);
Please login to merge, or discard this patch.
class/adsense.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31 31
 
32
-include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
32
+include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
33 33
 
34 34
 /**
35 35
  * Class SmartobjectAdsense
@@ -111,23 +111,23 @@  discard block
 block discarded – undo
111 111
     {
112 112
         global $smartobjectAdsenseHandler;
113 113
         if ($this->getVar('style', 'n') !== '') {
114
-            $ret = '<div style="' . $this->getVar('style', 'n') . '">';
114
+            $ret = '<div style="'.$this->getVar('style', 'n').'">';
115 115
         } else {
116 116
             $ret = '<div>';
117 117
         }
118 118
 
119 119
         $ret .= '<script type="text/javascript"><!--
120
-google_ad_client = "' . $this->getVar('client_id', 'n') . '";
121
-google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'] . ';
122
-google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'] . ';
123
-google_ad_format = "' . $this->getVar('format', 'n') . '";
120
+google_ad_client = "' . $this->getVar('client_id', 'n').'";
121
+google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'].';
122
+google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'].';
123
+google_ad_format = "' . $this->getVar('format', 'n').'";
124 124
 google_ad_type = "text";
125 125
 google_ad_channel ="";
126
-google_color_border = "' . $this->getVar('border_color', 'n') . '";
127
-google_color_bg = "' . $this->getVar('background_color', 'n') . '";
128
-google_color_link = "' . $this->getVar('link_color', 'n') . '";
129
-google_color_url = "' . $this->getVar('url_color', 'n') . '";
130
-google_color_text = "' . $this->getVar('text_color', 'n') . '";
126
+google_color_border = "' . $this->getVar('border_color', 'n').'";
127
+google_color_bg = "' . $this->getVar('background_color', 'n').'";
128
+google_color_link = "' . $this->getVar('link_color', 'n').'";
129
+google_color_url = "' . $this->getVar('url_color', 'n').'";
130
+google_color_text = "' . $this->getVar('text_color', 'n').'";
131 131
 //--></script>
132 132
 <script type="text/javascript"
133 133
   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function getXoopsCode()
144 144
     {
145
-        $ret = '[adsense]' . $this->getVar('tag', 'n') . '[/adsense]';
145
+        $ret = '[adsense]'.$this->getVar('tag', 'n').'[/adsense]';
146 146
 
147 147
         return $ret;
148 148
     }
@@ -234,16 +234,16 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function getCloneLink()
236 236
     {
237
-        $ret = '<a href="' .
238
-               SMARTOBJECT_URL .
239
-               'admin/adsense.php?op=clone&adsenseid=' .
240
-               $this->getVar('adsenseid') .
241
-               '"><img src="' .
242
-               SMARTOBJECT_IMAGES_ACTIONS_URL .
243
-               'editcopy.png" alt="' .
244
-               _CO_SOBJECT_ADSENSE_CLONE .
245
-               '" title="' .
246
-               _CO_SOBJECT_ADSENSE_CLONE .
237
+        $ret = '<a href="'.
238
+               SMARTOBJECT_URL.
239
+               'admin/adsense.php?op=clone&adsenseid='.
240
+               $this->getVar('adsenseid').
241
+               '"><img src="'.
242
+               SMARTOBJECT_IMAGES_ACTIONS_URL.
243
+               'editcopy.png" alt="'.
244
+               _CO_SOBJECT_ADSENSE_CLONE.
245
+               '" title="'.
246
+               _CO_SOBJECT_ADSENSE_CLONE.
247 247
                '" /></a>';
248 248
 
249 249
         return $ret;
Please login to merge, or discard this patch.
class/form/smartobjectform.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 /**
16 16
  * Including the XoopsFormLoader classes
17 17
  */
18
-include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
19
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php';
20
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsectionclose.php';
18
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
19
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php';
20
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsectionclose.php';
21 21
 
22 22
 /**
23 23
  * SmartForm base class
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function __construct(&$target, $form_name, $form_caption, $form_action, $form_fields = null, $submit_button_caption = false, $cancel_js_action = false, $captcha = false)
54 54
     {
55
-        $this->targetObject           =& $target;
55
+        $this->targetObject           = & $target;
56 56
         $this->form_fields            = $form_fields;
57 57
         $this->_cancel_js_action      = $cancel_js_action;
58 58
         $this->_captcha               = $captcha;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function addCaptcha()
82 82
     {
83
-        include_once(SMARTOBJECT_ROOT_PATH . 'include/captcha/formcaptcha.php');
83
+        include_once(SMARTOBJECT_ROOT_PATH.'include/captcha/formcaptcha.php');
84 84
         $this->addElement(new XoopsFormCaptcha(), true);
85 85
     }
86 86
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function addCustomButton($name, $caption, $onclick = false)
93 93
     {
94
-        $custom_button_array    = array(
94
+        $custom_button_array = array(
95 95
             'name'    => $name,
96 96
             'caption' => $caption,
97 97
             'onclick' => $onclick
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if ($key) {
113 113
             if ($this->targetObject->vars[$key]['readonly']) {
114 114
                 $formElement->setExtra('disabled="disabled"');
115
-                $formElement->setName($key . '-readonly');
115
+                $formElement->setName($key.'-readonly');
116 116
                 // Since this element is disable, we still want to pass it's value in the form
117 117
                 $hidden = new XoopsFormHidden($key, $this->targetObject->vars[$key]['value']);
118 118
                 $this->addElement($hidden);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $this->addElement($hidden);
124 124
                 $otherExtra      = isset($var['form_extra']) ? $var['form_extra'] : '';
125 125
                 $onchangedString = "this.form.elements.changedField.value='$key'; this.form.elements.op.value='changedField'; submit()";
126
-                $formElement->setExtra('onchange="' . $onchangedString . '"' . ' ' . $otherExtra);
126
+                $formElement->setExtra('onchange="'.$onchangedString.'"'.' '.$otherExtra);
127 127
             } else {
128 128
                 if (isset($var['form_extra'])) {
129 129
                     $formElement->setExtra($var['form_extra']);
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
             asort($group_list);
291 291
             foreach ($permissions as $permission) {
292 292
                 if ($this->targetObject->isNew()) {
293
-                    if (isset($smartModuleConfig['def_perm_' . $permission['perm_name']])) {
294
-                        $groups_value = $smartModuleConfig['def_perm_' . $permission['perm_name']];
293
+                    if (isset($smartModuleConfig['def_perm_'.$permission['perm_name']])) {
294
+                        $groups_value = $smartModuleConfig['def_perm_'.$permission['perm_name']];
295 295
                     }
296 296
                 } else {
297 297
                     $groups_value = $this->targetObject->getGroupPerm($permission['perm_name']);
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         } else {
324 324
             $butt_create = new XoopsFormButton('', 'modify_button', $submit_button_caption, 'submit');
325 325
         }
326
-        $butt_create->setExtra('onclick="this.form.elements.op.value=\'' . $form_name . '\'"');
326
+        $butt_create->setExtra('onclick="this.form.elements.op.value=\''.$form_name.'\'"');
327 327
         $button_tray->addElement($butt_create);
328 328
 
329 329
         //creating custom buttons
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             foreach ($this->_custom_button as $custom_button) {
332 332
                 $butt_custom = new XoopsFormButton('', $custom_button['name'], $custom_button['caption'], 'submit');
333 333
                 if ($custom_button['onclick']) {
334
-                    $butt_custom->setExtra('onclick="' . $custom_button['onclick'] . '"');
334
+                    $butt_custom->setExtra('onclick="'.$custom_button['onclick'].'"');
335 335
                 }
336 336
                 $button_tray->addElement($butt_custom);
337 337
                 unset($butt_custom);
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         // creating the "cancel" button
342 342
         $butt_cancel = new XoopsFormButton('', 'cancel_button', _CO_SOBJECT_CANCEL, 'button');
343 343
         if ($this->_cancel_js_action) {
344
-            $butt_cancel->setExtra('onclick="' . $this->_cancel_js_action . '"');
344
+            $butt_cancel->setExtra('onclick="'.$this->_cancel_js_action.'"');
345 345
         } else {
346 346
             $butt_cancel->setExtra('onclick="history.go(-1)"');
347 347
         }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     {
360 360
         switch ($controlName) {
361 361
             case 'check':
362
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php');
362
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformcheckelement.php');
363 363
                 $control    = $this->targetObject->getControl($key);
364 364
                 $controlObj = new SmartFormCheckElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key));
365 365
                 $controlObj->addOptionArray($control['options']);
@@ -426,38 +426,38 @@  discard block
 block discarded – undo
426 426
                 break;
427 427
 
428 428
             case 'urllink':
429
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformurllinkelement.php');
429
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformurllinkelement.php');
430 430
 
431 431
                 return new SmartFormUrlLinkElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getUrlLinkObj($key));
432 432
                 break;
433 433
 
434 434
             case 'richfile':
435
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformrichfileelement.php');
435
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformrichfileelement.php');
436 436
 
437 437
                 return new SmartFormRichFileElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getFileObj($key));
438 438
                 break;
439 439
             case 'section':
440
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php');
440
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php');
441 441
 
442 442
                 return new SmartFormSection($key, $this->targetObject->vars[$key]['form_caption']);
443 443
                 break;
444 444
 
445 445
             default:
446
-                $classname = 'SmartForm' . ucfirst($controlName) . 'Element';
446
+                $classname = 'SmartForm'.ucfirst($controlName).'Element';
447 447
                 if (!class_exists($classname)) {
448
-                    if (file_exists(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php')) {
449
-                        include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php');
448
+                    if (file_exists(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php')) {
449
+                        include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php');
450 450
                     } else {
451 451
                         // perhaps this is a control created by the module
452 452
                         $moduleName             = $this->targetObject->handler->_moduleName;
453
-                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath . 'class/form/elements/';
454
-                        $classname              = ucfirst($moduleName) . ucfirst($controlName) . 'Element';
455
-                        $classFileName          = strtolower($classname) . '.php';
453
+                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath.'class/form/elements/';
454
+                        $classname              = ucfirst($moduleName).ucfirst($controlName).'Element';
455
+                        $classFileName          = strtolower($classname).'.php';
456 456
 
457
-                        if (file_exists($moduleFormElementsPath . $classFileName)) {
458
-                            include_once($moduleFormElementsPath . $classFileName);
457
+                        if (file_exists($moduleFormElementsPath.$classFileName)) {
458
+                            include_once($moduleFormElementsPath.$classFileName);
459 459
                         } else {
460
-                            trigger_error($classname . ' Not found', E_USER_WARNING);
460
+                            trigger_error($classname.' Not found', E_USER_WARNING);
461 461
 
462 462
                             return new XoopsFormLabel(); //Empty object
463 463
                         }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         $editor_configs['height'] = '400px';
527 527
 
528 528
         $dhtml            = true;
529
-        $xoopseditorclass = XOOPS_ROOT_PATH . '/class/xoopsform/formeditor.php';
529
+        $xoopseditorclass = XOOPS_ROOT_PATH.'/class/xoopsform/formeditor.php';
530 530
 
531 531
         if (file_exists($xoopseditorclass)) {
532 532
             include_once($xoopseditorclass);
@@ -536,8 +536,8 @@  discard block
 block discarded – undo
536 536
 
537 537
                 case 'tiny':
538 538
                     if (!$xoops22) {
539
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
540
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php');
539
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
540
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php');
541 541
                             $editor = new XoopsFormTinyTextArea(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
542 542
                         } else {
543 543
                             if ($dhtml) {
@@ -561,8 +561,8 @@  discard block
 block discarded – undo
561 561
 
562 562
                 case 'fckeditor':
563 563
                     if (!$xoops22) {
564
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php')) {
565
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php');
564
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php')) {
565
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php');
566 566
                             $editor = new XoopsFormFckeditor(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
567 567
                         } else {
568 568
                             if ($dhtml) {
@@ -578,8 +578,8 @@  discard block
 block discarded – undo
578 578
 
579 579
                 case 'inbetween':
580 580
                     if (!$xoops22) {
581
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
582
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php');
581
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
582
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php');
583 583
                             $editor = new XoopsFormInbetweenTextArea(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
584 584
                         } else {
585 585
                             if ($dhtml) {
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
 
596 596
                 case 'koivi':
597 597
                     if (!$xoops22) {
598
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) {
599
-                            include_once(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php');
598
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php')) {
599
+                            include_once(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php');
600 600
                             $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px');
601 601
                         } else {
602 602
                             if ($dhtml) {
@@ -612,8 +612,8 @@  discard block
 block discarded – undo
612 612
 
613 613
                 case 'spaw':
614 614
                     if (!$xoops22) {
615
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php')) {
616
-                            include_once(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php');
615
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php')) {
616
+                            include_once(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php');
617 617
                             $editor = new XoopsFormSpaw($caption, $name, $value);
618 618
                         }
619 619
                     } else {
@@ -623,8 +623,8 @@  discard block
 block discarded – undo
623 623
 
624 624
                 case 'htmlarea':
625 625
                     if (!$xoops22) {
626
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
627
-                            include_once(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php');
626
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')) {
627
+                            include_once(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php');
628 628
                             $editor = new XoopsFormHtmlarea($caption, $name, $value);
629 629
                         }
630 630
                     } else {
@@ -660,10 +660,10 @@  discard block
 block discarded – undo
660 660
         $size         = $multiple ? 5 : 1;
661 661
         $theme_select = new XoopsFormSelect($var['form_caption'], $key, $this->targetObject->getVar($key), $size, $multiple);
662 662
 
663
-        $handle  = opendir(XOOPS_THEME_PATH . '/');
663
+        $handle  = opendir(XOOPS_THEME_PATH.'/');
664 664
         $dirlist = array();
665 665
         while (false !== ($file = readdir($handle))) {
666
-            if (is_dir(XOOPS_THEME_PATH . '/' . $file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
666
+            if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
667 667
                 $dirlist[$file] = $file;
668 668
             }
669 669
         }
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
     {
685 685
         foreach ($this->_elements as $eleObj) {
686 686
             if ($eleObj->getName() == $keyname) {
687
-                $ret =& $eleObj;
687
+                $ret = & $eleObj;
688 688
                 break;
689 689
             }
690 690
         }
@@ -702,21 +702,21 @@  discard block
 block discarded – undo
702 702
         $required = $this->getRequired();
703 703
         $ret      = "
704 704
             <form name='" .
705
-                    $this->getName() .
706
-                    "' id='" .
707
-                    $this->getName() .
708
-                    "' action='" .
709
-                    $this->getAction() .
710
-                    "' method='" .
711
-                    $this->getMethod() .
712
-                    "' onsubmit='return xoopsFormValidate_" .
713
-                    $this->getName() .
714
-                    "(this);'" .
715
-                    $this->getExtra() .
705
+                    $this->getName().
706
+                    "' id='".
707
+                    $this->getName().
708
+                    "' action='".
709
+                    $this->getAction().
710
+                    "' method='".
711
+                    $this->getMethod().
712
+                    "' onsubmit='return xoopsFormValidate_".
713
+                    $this->getName().
714
+                    "(this);'".
715
+                    $this->getExtra().
716 716
                     ">
717 717
             <table width='100%' class='outer' cellspacing='1'>
718 718
             <tr><th colspan='2'>" .
719
-                    $this->getTitle() .
719
+                    $this->getTitle().
720 720
                     '</th></tr>
721 721
         ';
722 722
         $hidden   = '';
@@ -726,11 +726,11 @@  discard block
 block discarded – undo
726 726
                 $ret .= $ele;
727 727
             } elseif (!$ele->isHidden()) {
728 728
                 //$class = ( $class == 'even' ) ? 'odd': 'even';
729
-                $ret .= "<tr id='" . $ele->getName() . "' valign='top' align='left'><td class='head'>" . $ele->getCaption();
729
+                $ret .= "<tr id='".$ele->getName()."' valign='top' align='left'><td class='head'>".$ele->getCaption();
730 730
                 if ($ele->getDescription() !== '') {
731
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $ele->getDescription() . '</span>';
731
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
732 732
                 }
733
-                $ret .= "</td><td class='$class'>" . $ele->render() . "</td></tr>\n";
733
+                $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>\n";
734 734
             } else {
735 735
                 $hidden .= $ele->render();
736 736
             }
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
             'name'       => $this->getName(),
777 777
             'action'     => $this->getAction(),
778 778
             'method'     => $this->getMethod(),
779
-            'extra'      => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '(this);"' . $this->getExtra(),
779
+            'extra'      => 'onsubmit="return xoopsFormValidate_'.$this->getName().'(this);"'.$this->getExtra(),
780 780
             'javascript' => $js,
781 781
             'elements'   => $elements
782 782
         ));
@@ -844,15 +844,15 @@  discard block
 block discarded – undo
844 844
                         window.alert(\"{$eltmsg}\"); myform['{$eltname}'][0].focus(); return false; }\n";
845 845
                 }
846 846
             } else {
847
-                $js .= "if ( myform.{$eltname}.value == \"\" ) " . "{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
847
+                $js .= "if ( myform.{$eltname}.value == \"\" ) "."{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
848 848
             }
849 849
         }
850 850
         // Now, handle custom validation code
851
-        $elements =& $this->getElements(true);
851
+        $elements = & $this->getElements(true);
852 852
         foreach ($elements as $elt) {
853 853
             if (method_exists($elt, 'renderValidationJS') && strtolower(get_class($elt)) !== 'xoopsformcheckbox') {
854 854
                 if ($eltjs = $elt->renderValidationJS()) {
855
-                    $js .= $eltjs . "\n";
855
+                    $js .= $eltjs."\n";
856 856
                 }
857 857
             }
858 858
         }
Please login to merge, or discard this patch.
class/form/elements/smartformuser_sigelement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
class/form/elements/smartformurllinkelement.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,18 +21,18 @@
 block discarded – undo
21 21
     {
22 22
         parent::__construct($form_caption, '&nbsp;');
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
 
Please login to merge, or discard this patch.
class/form/elements/smartformrichfileelement.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,33 +22,33 @@
 block discarded – undo
22 22
         parent::__construct($form_caption, '&nbsp;');
23 23
         if ($object->getVar('url') !== '') {
24 24
             $caption = $object->getVar('caption') !== '' ? $object->getVar('caption') : $object->getVar('url');
25
-            $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE .
26
-                                                     "<a href='" .
27
-                                                     str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')) .
28
-                                                     "' target='_blank' >" .
29
-                                                     $caption .
25
+            $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE.
26
+                                                     "<a href='".
27
+                                                     str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')).
28
+                                                     "' target='_blank' >".
29
+                                                     $caption.
30 30
                                                      '</a><br><br>'));
31 31
             //$this->addElement( new XoopsFormLabel( '', "<br><a href = '".SMARTOBJECT_URL."admin/file.php?op=del&fileid=".$object->id()."'>"._CO_SOBJECT_DELETE_FILE."</a>"));
32 32
         }
33 33
 
34
-        include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformfileuploadelement.php';
34
+        include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformfileuploadelement.php';
35 35
         if ($object->isNew()) {
36 36
             $this->addElement(new SmartFormFileUploadElement($object, $key));
37
-            $this->addElement(new XoopsFormLabel('', '<br><br><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>'));
38
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URL_FILE));
39
-            $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
37
+            $this->addElement(new XoopsFormLabel('', '<br><br><small>'._CO_SOBJECT_URL_FILE_DSC.'</small>'));
38
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URL_FILE));
39
+            $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
40 40
         }
41
-        $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_CAPTION));
42
-        $this->addElement(new SmartFormTextElement($object, 'caption_' . $key));
43
-        $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_DESC . '<br>'));
44
-        $this->addElement(new XoopsFormTextArea('', 'desc_' . $key, $object->getVar('description')));
41
+        $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_CAPTION));
42
+        $this->addElement(new SmartFormTextElement($object, 'caption_'.$key));
43
+        $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_DESC.'<br>'));
44
+        $this->addElement(new XoopsFormTextArea('', 'desc_'.$key, $object->getVar('description')));
45 45
 
46 46
         if (!$object->isNew()) {
47
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_CHANGE_FILE));
47
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_CHANGE_FILE));
48 48
             $this->addElement(new SmartFormFileUploadElement($object, $key));
49
-            $this->addElement(new XoopsFormLabel('', '<br><br><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>'));
50
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URL_FILE));
51
-            $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
49
+            $this->addElement(new XoopsFormLabel('', '<br><br><small>'._CO_SOBJECT_URL_FILE_DSC.'</small>'));
50
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URL_FILE));
51
+            $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
52 52
         }
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
class/form/elements/smartformtimeelement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
class/form/elements/smartformcheckelement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $ret = '';
20 20
         if (count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) !== '[]') {
21
-            $newname = $this->getName() . '[]';
21
+            $newname = $this->getName().'[]';
22 22
             $this->setName($newname);
23 23
         }
24 24
         foreach ($this->getOptions() as $value => $name) {
25
-            $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
25
+            $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
26 26
             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
27 27
                 $ret .= " checked='checked'";
28 28
             }
29
-            $ret .= $this->getExtra() . ' />' . $name . '<br>';
29
+            $ret .= $this->getExtra().' />'.$name.'<br>';
30 30
         }
31 31
 
32 32
         return $ret;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             if (hasSelections == false) {
51 51
                 window.alert(\"{$eltmsg}\"); myform['{$eltname}[]'][0].focus(); return false; }\n";
52 52
         } else {
53
-            $js .= "for (var i = 0; i < myform['" . $eltname . "'].length; i++) {
53
+            $js .= "for (var i = 0; i < myform['".$eltname."'].length; i++) {
54 54
                 if (myform['{$eltname}'][i].checked) {
55 55
                     hasSelections = true;
56 56
                 }
Please login to merge, or discard this patch.