Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/class/xoopsform/tableform.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,25 +42,25 @@
 block discarded – undo
42 42
      */
43 43
     public function render()
44 44
     {
45
-        $ret    = $this->getTitle() . NWLINE . '<form name="' . $this->getName() . '" id="' . $this->getName() . '" action="' . $this->getAction() . '" method="' . $this->getMethod() . '"' . $this->getExtra() . '>' . NWLINE . '<table border="0" width="100%">' . NWLINE;
45
+        $ret    = $this->getTitle().NWLINE.'<form name="'.$this->getName().'" id="'.$this->getName().'" action="'.$this->getAction().'" method="'.$this->getMethod().'"'.$this->getExtra().'>'.NWLINE.'<table border="0" width="100%">'.NWLINE;
46 46
         $hidden = '';
47 47
         foreach ($this->getElements() as $ele) {
48 48
             if (!$ele->isHidden()) {
49 49
                 if (!$ele->getNocolspan()) {
50
-                    $ret .= '<tr valign="top" align="left"><td>' . $ele->getCaption();
50
+                    $ret .= '<tr valign="top" align="left"><td>'.$ele->getCaption();
51 51
                     if ($ele_desc = $ele->getDescription()) {
52
-                        $ret .= '<br><br><span style="font-weight: normal;">' . $ele_desc . '</span>';
52
+                        $ret .= '<br><br><span style="font-weight: normal;">'.$ele_desc.'</span>';
53 53
                     }
54
-                    $ret .= '</td><td>' . $ele->render() . '</td></tr>';
54
+                    $ret .= '</td><td>'.$ele->render().'</td></tr>';
55 55
                 } else {
56
-                    $ret .= '<tr valign="top" align="left"><td colspan="2">' . $ele->getCaption();
57
-                    $ret .= '</td></tr><tr valign="top" align="left"><td>' . $ele->render() . '</td></tr>';
56
+                    $ret .= '<tr valign="top" align="left"><td colspan="2">'.$ele->getCaption();
57
+                    $ret .= '</td></tr><tr valign="top" align="left"><td>'.$ele->render().'</td></tr>';
58 58
                 }
59 59
             } else {
60
-                $hidden .= $ele->render() . NWLINE;
60
+                $hidden .= $ele->render().NWLINE;
61 61
             }
62 62
         }
63
-        $ret .= '</table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE;
63
+        $ret .= '</table>'.NWLINE.' '.$hidden.'</form>'.NWLINE;
64 64
 
65 65
         return $ret;
66 66
     }
Please login to merge, or discard this patch.
htdocs/class/xoopsform/formdatetime.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function __construct($caption, $name, $size = 15, $value = 0, $showtime = true)
47 47
     {
48 48
         parent::__construct($caption, '&nbsp;');
49
-        switch ((int) $showtime) {
49
+        switch ((int)$showtime) {
50 50
             case static::SHOW_DATE:
51 51
                 $displayDate = true;
52 52
                 $displayTime = false;
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
         $value    = ($value > 0) ? $value : time();
65 65
         $datetime = getdate($value);
66 66
         if ($displayDate) {
67
-            $this->addElement(new XoopsFormTextDateSelect('', $name . '[date]', $size, $value));
67
+            $this->addElement(new XoopsFormTextDateSelect('', $name.'[date]', $size, $value));
68 68
         } else {
69 69
             $value = !is_numeric($value) ? time() : (int)$value;
70 70
             $value = ($value == 0) ? time() : $value;
71 71
             $displayValue = date(_SHORTDATESTRING, $value);
72
-            $this->addElement(new XoopsFormHidden($name . '[date]', $displayValue));
72
+            $this->addElement(new XoopsFormHidden($name.'[date]', $displayValue));
73 73
         }
74 74
 
75 75
         if ($displayTime) {
@@ -77,16 +77,16 @@  discard block
 block discarded – undo
77 77
             for ($i = 0; $i < 24; ++$i) {
78 78
                 for ($j = 0; $j < 60; $j += 10) {
79 79
                     $key = ($i * 3600) + ($j * 60);
80
-                    $timearray[$key] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j;
80
+                    $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
81 81
                 }
82 82
             }
83 83
             ksort($timearray);
84 84
 
85
-            $timeselect = new XoopsFormSelect('', $name . '[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10));
85
+            $timeselect = new XoopsFormSelect('', $name.'[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10));
86 86
             $timeselect->addOptionArray($timearray);
87 87
             $this->addElement($timeselect);
88 88
         } else {
89
-            $this->addElement(new XoopsFormHidden($name . '[time]', 0));
89
+            $this->addElement(new XoopsFormHidden($name.'[time]', 0));
90 90
         }
91 91
     }
92 92
 }
Please login to merge, or discard this patch.
htdocs/class/xoopsform/formcheckbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@
 block discarded – undo
203 203
             $eltmsg     = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
204 204
             $eltmsg     = str_replace('"', '\"', stripslashes($eltmsg));
205 205
 
206
-            return NWLINE . "var hasChecked = false; var checkBox = myform.elements['{$eltname}']; if (checkBox.length) {for (var i = 0; i < checkBox.length; i++) {if (checkBox[i].checked == true) {hasChecked = true; break;}}} else {if (checkBox.checked == true) {hasChecked = true;}}if (!hasChecked) {window.alert(\"{$eltmsg}\");if (checkBox.length) {checkBox[0].focus();} else {checkBox.focus();}return false;}";
206
+            return NWLINE."var hasChecked = false; var checkBox = myform.elements['{$eltname}']; if (checkBox.length) {for (var i = 0; i < checkBox.length; i++) {if (checkBox[i].checked == true) {hasChecked = true; break;}}} else {if (checkBox.checked == true) {hasChecked = true;}}if (!hasChecked) {window.alert(\"{$eltmsg}\");if (checkBox.length) {checkBox[0].focus();} else {checkBox.focus();}return false;}";
207 207
         }
208 208
 
209 209
         return '';
Please login to merge, or discard this patch.
htdocs/class/xoopsform/form.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                     @$var['func'] = $this->getArrayID($value, $key, $var['func'], $hashinfo);
168 168
                 }
169 169
 
170
-                @$this->_objid = md5($var['name'] . ':' . $var['func'] . ':' . $var['value']);
170
+                @$this->_objid = md5($var['name'].':'.$var['func'].':'.$var['value']);
171 171
 
172 172
                 return $this->_objid;
173 173
                 break;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                     @$var['func'] = $this->getArrayID($value, $key, $var['func'], $hashinfo);
187 187
                 }
188 188
 
189
-                @$this->_objid = sha1($var['name'] . ':' . $var['func'] . ':' . $var['value']);
189
+                @$this->_objid = sha1($var['name'].':'.$var['func'].':'.$var['value']);
190 190
 
191 191
                 return $this->_objid;
192 192
 
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
             case 'md5':
208 208
                 if (is_array($value)) {
209 209
                     foreach ($value as $keyb => $valueb) {
210
-                        @$ret = md5($ret . ':' . $this->getArrayID($valueb, $keyb, $ret, $hashinfo));
210
+                        @$ret = md5($ret.':'.$this->getArrayID($valueb, $keyb, $ret, $hashinfo));
211 211
                     }
212 212
                 } else {
213
-                    @$ret = md5($ret . ':' . $key . ':' . $value);
213
+                    @$ret = md5($ret.':'.$key.':'.$value);
214 214
                 }
215 215
 
216 216
                 return $ret;
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
             default:
219 219
                 if (is_array($value)) {
220 220
                     foreach ($value as $keyb => $valueb) {
221
-                        @$ret = sha1($ret . ':' . $this->getArrayID($valueb, $keyb, $ret, $hashinfo));
221
+                        @$ret = sha1($ret.':'.$this->getArrayID($valueb, $keyb, $ret, $hashinfo));
222 222
                     }
223 223
                 } else {
224
-                    @$ret = sha1($ret . ':' . $key . ':' . $value);
224
+                    @$ret = sha1($ret.':'.$key.':'.$value);
225 225
                 }
226 226
 
227 227
                 return $ret;
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function &getElementByName($name)
374 374
     {
375
-        $elements =& $this->getElements(true);
375
+        $elements = & $this->getElements(true);
376 376
         $count    = count($elements);
377 377
         for ($i = 0; $i < $count; ++$i) {
378 378
             if ($name == $elements[$i]->getName(false)) {
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     public function &getExtra()
490 490
     {
491
-        $extra = empty($this->_extra) ? '' : ' ' . implode(' ', $this->_extra);
491
+        $extra = empty($this->_extra) ? '' : ' '.implode(' ', $this->_extra);
492 492
 
493 493
         return $extra;
494 494
     }
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
         }
577 577
         $formname = $this->getName();
578 578
         $js .= "function xoopsFormValidate_{$formname}() { var myform = window.document.{$formname}; ";
579
-        $elements =& $this->getElements(true);
579
+        $elements = & $this->getElements(true);
580 580
         foreach ($elements as $elt) {
581 581
             if (method_exists($elt, 'renderValidationJS')) {
582 582
                 $js .= $elt->renderValidationJS();
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
         $i        = -1;
602 602
         $elements = array();
603 603
         if (count($this->getRequired()) > 0) {
604
-            $this->_elements[] = "<tr class='foot'><td colspan='2'>* = " . _REQUIRED . '</td></tr>';
604
+            $this->_elements[] = "<tr class='foot'><td colspan='2'>* = "._REQUIRED.'</td></tr>';
605 605
         }
606 606
         foreach ($this->getElements() as $ele) {
607 607
             ++$i;
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
             'name'       => $this->getName(),
628 628
             'action'     => $this->getAction(),
629 629
             'method'     => $this->getMethod(),
630
-            'extra'      => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '();"' . $this->getExtra(),
630
+            'extra'      => 'onsubmit="return xoopsFormValidate_'.$this->getName().'();"'.$this->getExtra(),
631 631
             'javascript' => $js,
632 632
             'elements'   => $elements,
633 633
             'rendered'   => $this->render(),
Please login to merge, or discard this patch.
htdocs/class/xoopsform/formdhtmltextarea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
                 }
116 116
             } else {
117 117
                 list($class, $path) = $this->htmlEditor;
118
-                include_once XOOPS_ROOT_PATH . $path;
118
+                include_once XOOPS_ROOT_PATH.$path;
119 119
                 if (class_exists($class)) {
120 120
                     $this->htmlEditor = new $class($options);
121 121
                 }
Please login to merge, or discard this patch.
htdocs/class/xoopsform/formselect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
             $eltmsg     = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
220 220
             $eltmsg     = str_replace('"', '\"', stripslashes($eltmsg));
221 221
 
222
-            return "\nvar hasSelected = false; var selectBox = myform.{$eltname};" . "for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }" . "if (!hasSelected) { window.alert(\"{$eltmsg}\"); selectBox.focus(); return false; }";
222
+            return "\nvar hasSelected = false; var selectBox = myform.{$eltname};"."for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }"."if (!hasSelected) { window.alert(\"{$eltmsg}\"); selectBox.focus(); return false; }";
223 223
         }
224 224
 
225 225
         return '';
Please login to merge, or discard this patch.
htdocs/class/xoopsform/formselecteditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         $editor_handler->allowed_editors = $this->allowed_editors;
66 66
         $option_select                   = new XoopsFormSelect('', $this->name, $this->value);
67 67
         $extra                           = 'onchange="if (this.options[this.selectedIndex].value.length > 0) {
68
-            window.document.forms.' . $this->form->getName() . '.submit();
68
+            window.document.forms.' . $this->form->getName().'.submit();
69 69
             }"';
70 70
         $option_select->setExtra($extra);
71 71
         $option_select->addOptionArray($editor_handler->getList($this->nohtml));
Please login to merge, or discard this patch.
htdocs/class/xoopsform/simpleform.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
      */
37 37
     public function render()
38 38
     {
39
-        $ret = $this->getTitle() . "\n<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n";
39
+        $ret = $this->getTitle()."\n<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n";
40 40
         foreach ($this->getElements() as $ele) {
41 41
             if (!$ele->isHidden()) {
42
-                $ret .= '<strong>' . $ele->getCaption() . '</strong><br>' . $ele->render() . "<br>\n";
42
+                $ret .= '<strong>'.$ele->getCaption().'</strong><br>'.$ele->render()."<br>\n";
43 43
             } else {
44
-                $ret .= $ele->render() . "\n";
44
+                $ret .= $ele->render()."\n";
45 45
             }
46 46
         }
47 47
         $ret .= "</form>\n";
Please login to merge, or discard this patch.
htdocs/class/xoopsform/renderer/XoopsFormRendererLegacy.php 1 patch
Spacing   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function renderFormButton(XoopsFormButton $element)
32 32
     {
33
-        return "<input type='" . $element->getType() . "' class='formButton' name='" . $element->getName()
34
-            . "'  id='" . $element->getName() . "' value='" . $element->getValue() . "' title='"
35
-            . $element->getValue() . "'" . $element->getExtra() . ' />';
33
+        return "<input type='".$element->getType()."' class='formButton' name='".$element->getName()
34
+            . "'  id='".$element->getName()."' value='".$element->getValue()."' title='"
35
+            . $element->getValue()."'".$element->getExtra().' />';
36 36
     }
37 37
 
38 38
     /**
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $ret = '';
48 48
         if ($element->_showDelete) {
49
-            $ret .= '<input type="submit" class="formbutton" name="delete" id="delete" value="' . _DELETE
49
+            $ret .= '<input type="submit" class="formbutton" name="delete" id="delete" value="'._DELETE
50 50
                 . '" onclick="this.form.elements.op.value=\'delete\'">&nbsp;';
51 51
         }
52
-        $ret .= '<input type="button" value="' . _CANCEL . '" onClick="history.go(-1);return true;" />&nbsp;'
53
-            . '<input type="reset" class="formbutton"  name="reset"  id="reset" value="' . _RESET . '" />&nbsp;'
54
-            . '<input type="' . $element->getType() . '" class="formbutton"  name="' . $element->getName()
55
-            . '" id="' . $element->getName() . '" value="' . $element->getValue() . '"' . $element->getExtra()
52
+        $ret .= '<input type="button" value="'._CANCEL.'" onClick="history.go(-1);return true;" />&nbsp;'
53
+            . '<input type="reset" class="formbutton"  name="reset"  id="reset" value="'._RESET.'" />&nbsp;'
54
+            . '<input type="'.$element->getType().'" class="formbutton"  name="'.$element->getName()
55
+            . '" id="'.$element->getName().'" value="'.$element->getValue().'"'.$element->getExtra()
56 56
             . ' />';
57 57
 
58 58
         return $ret;
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
                 $ret .= '<td>';
98 98
             }
99 99
             // $name may be a link, should we use $name in the title tag?
100
-            $ret .= '<input type="checkbox" name="' . $ele_name . '" id="' . $ele_id .$id_ele . '" '
101
-                . ' title="' . $ele_title . '" value="' . htmlspecialchars($value, ENT_QUOTES) . '"';
100
+            $ret .= '<input type="checkbox" name="'.$ele_name.'" id="'.$ele_id.$id_ele.'" '
101
+                . ' title="'.$ele_title.'" value="'.htmlspecialchars($value, ENT_QUOTES).'"';
102 102
 
103 103
             if (count($ele_value) > 0 && in_array($value, $ele_value)) {
104 104
                 $ret .= ' checked';
105 105
             }
106
-            $ret .= $ele_extra . ' />' . '<label name="xolb_' . $ele_name . '" for="'
107
-            . $ele_id . $id_ele . '" >' . $name . '</label>' . $ele_delimiter;
106
+            $ret .= $ele_extra.' />'.'<label name="xolb_'.$ele_name.'" for="'
107
+            . $ele_id.$id_ele.'" >'.$name.'</label>'.$ele_delimiter;
108 108
 
109 109
 
110 110
             if (!empty($element->columns)) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
         if (!empty($element->columns)) {
118 118
             if ($span = $i % $element->columns) {
119
-                $ret .= '<td colspan="' . ($element->columns - $span) . '"></td></tr>';
119
+                $ret .= '<td colspan="'.($element->columns - $span).'"></td></tr>';
120 120
             }
121 121
             $ret .= '</table>';
122 122
         }
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
             $GLOBALS['xoTheme']->addScript('include/spectrum.js');
139 139
             $GLOBALS['xoTheme']->addStylesheet('include/spectrum.css');
140 140
         } else {
141
-            echo '<script type="text/javascript" src="' . XOOPS_URL . '/include/spectrum.js"></script>';
142
-            echo '<link rel="stylesheet" type="text/css" href="' . XOOPS_URL . '/include/spectrum.css">';
141
+            echo '<script type="text/javascript" src="'.XOOPS_URL.'/include/spectrum.js"></script>';
142
+            echo '<link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/include/spectrum.css">';
143 143
         }
144
-        return "<input type='color' name='" . $element->getName() . "' title='" . $element->getTitle()
145
-            . "' id='" . $element->getName() . "' size='" . $element->getSize() . "' maxlength='"
146
-            . $element->getMaxlength() . "' value='" . $element->getValue() . "'" . $element->getExtra()
144
+        return "<input type='color' name='".$element->getName()."' title='".$element->getTitle()
145
+            . "' id='".$element->getName()."' size='".$element->getSize()."' maxlength='"
146
+            . $element->getMaxlength()."' value='".$element->getValue()."'".$element->getExtra()
147 147
             . ' />';
148 148
     }
149 149
 
@@ -161,29 +161,29 @@  discard block
 block discarded – undo
161 161
         xoops_loadLanguage('formdhtmltextarea');
162 162
         $ret = '';
163 163
         // actions
164
-        $ret .= $this->renderFormDhtmlTAXoopsCode($element) . "<br>\n";
164
+        $ret .= $this->renderFormDhtmlTAXoopsCode($element)."<br>\n";
165 165
         // fonts
166 166
         $ret .= $this->renderFormDhtmlTATypography($element);
167 167
         // length checker
168
-        $ret .= "<button type='button' class='btn btn-default' onclick=\"XoopsCheckLength('" . $element->getName() . "', '" . @$element->configs['maxlength'] . "', '" . _XOOPS_FORM_ALT_LENGTH . "', '" . _XOOPS_FORM_ALT_LENGTH_MAX . "');\" title='" . _XOOPS_FORM_ALT_CHECKLENGTH . "'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>&nbsp;";
168
+        $ret .= "<button type='button' class='btn btn-default' onclick=\"XoopsCheckLength('".$element->getName()."', '".@$element->configs['maxlength']."', '"._XOOPS_FORM_ALT_LENGTH."', '"._XOOPS_FORM_ALT_LENGTH_MAX."');\" title='"._XOOPS_FORM_ALT_CHECKLENGTH."'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>&nbsp;";
169 169
         $ret .= "<br>\n";
170 170
         // the textarea box
171
-        $ret .= "<textarea id='" . $element->getName() . "' name='" . $element->getName() . "' title='" . $element->getTitle() . "' onselect=\"xoopsSavePosition('" . $element->getName() . "');\" onclick=\"xoopsSavePosition('" . $element->getName() . "');\" onkeyup=\"xoopsSavePosition('" . $element->getName() . "');\" cols='" . $element->getCols() . "' rows='" . $element->getRows() . "'" . $element->getExtra() . '>' . $element->getValue() . "</textarea><br>\n";
171
+        $ret .= "<textarea id='".$element->getName()."' name='".$element->getName()."' title='".$element->getTitle()."' onselect=\"xoopsSavePosition('".$element->getName()."');\" onclick=\"xoopsSavePosition('".$element->getName()."');\" onkeyup=\"xoopsSavePosition('".$element->getName()."');\" cols='".$element->getCols()."' rows='".$element->getRows()."'".$element->getExtra().'>'.$element->getValue()."</textarea><br>\n";
172 172
 
173 173
         if (empty($element->skipPreview)) {
174 174
             if (empty($GLOBALS['xoTheme'])) {
175
-                $element->js .= implode('', file(XOOPS_ROOT_PATH . '/class/textsanitizer/image/image.js'));
175
+                $element->js .= implode('', file(XOOPS_ROOT_PATH.'/class/textsanitizer/image/image.js'));
176 176
             } else {
177 177
                 $GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript'));
178 178
             }
179
-            $button = "<button type='button' class='btn btn-primary' onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $element->getName() . "','" . XOOPS_URL . "/images', " . (int)$element->doHtml . ", '" . $GLOBALS['xoopsSecurity']->createToken() . "')\" title='" . _PREVIEW . "'>" . _PREVIEW . "</button>";
179
+            $button = "<button type='button' class='btn btn-primary' onclick=\"form_instantPreview('".XOOPS_URL."', '".$element->getName()."','".XOOPS_URL."/images', ".(int)$element->doHtml.", '".$GLOBALS['xoopsSecurity']->createToken()."')\" title='"._PREVIEW."'>"._PREVIEW."</button>";
180 180
 
181
-            $ret .= '<br>' . "<div id='" . $element->getName() . "_hidden' style='display: block;'> " . '   <fieldset>' . '       <legend>' . $button . '</legend>' . "       <div id='" . $element->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . '</div>' . '   </fieldset>' . '</div>';
181
+            $ret .= '<br>'."<div id='".$element->getName()."_hidden' style='display: block;'> ".'   <fieldset>'.'       <legend>'.$button.'</legend>'."       <div id='".$element->getName()."_hidden_data'>"._XOOPS_FORM_PREVIEW_CONTENT.'</div>'.'   </fieldset>'.'</div>';
182 182
         }
183 183
         // Load javascript
184 184
         if (empty($js_loaded)) {
185
-            $javascript = ($element->js ? '<script type="text/javascript">' . $element->js . '</script>' : '') . '<script type="text/javascript" src="' . XOOPS_URL . '/include/formdhtmltextarea.js"></script>';
186
-            $ret        = $javascript . $ret;
185
+            $javascript = ($element->js ? '<script type="text/javascript">'.$element->js.'</script>' : '').'<script type="text/javascript" src="'.XOOPS_URL.'/include/formdhtmltextarea.js"></script>';
186
+            $ret        = $javascript.$ret;
187 187
             $js_loaded  = true;
188 188
         }
189 189
 
@@ -202,13 +202,13 @@  discard block
 block discarded – undo
202 202
         $textarea_id = $element->getName();
203 203
         $code = '';
204 204
         $code .= '<a name="moresmiley"></a>';
205
-        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeUrl(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERURL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_URL . "'><span class='fa fa-fw fa-link' aria-hidden='true'></span></button>";
206
-        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeEmail(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTEREMAIL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_EMAIL . "'><span class='fa fa-fw fa-envelope-o' aria-hidden='true'></span></button>";
207
-        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeImg(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERIMGURL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES) . "\", \"" . htmlspecialchars(_IMGPOSRORL, ENT_QUOTES) . "\", \"" . htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES) . "\", \"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_IMG . "'><span class='fa fa-fw fa-file-image-o' aria-hidden='true'></span></button>";
208
-        $code .= "<button type='button' class='btn btn-default' onclick='openWithSelfMain(\"" . XOOPS_URL . "/imagemanager.php?target={$textarea_id}\",\"imgmanager\",400,430);' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_IMAGE . "'><span class='fa fa-file-image-o' aria-hidden='true'></span><span style='font-size:75%;'> Manager</span></button>";
209
-        $code .= "<button type='button' class='btn btn-default' onclick='openWithSelfMain(\"" . XOOPS_URL . "/misc.php?action=showpopups&amp;type=smilies&amp;target={$textarea_id}\",\"smilies\",300,475);' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_SMILEY . "'><span class='fa fa-fw fa-smile-o' aria-hidden='true'></span></button>";
205
+        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeUrl(\"{$textarea_id}\", \"".htmlspecialchars(_ENTERURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_URL."'><span class='fa fa-fw fa-link' aria-hidden='true'></span></button>";
206
+        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeEmail(\"{$textarea_id}\", \"".htmlspecialchars(_ENTEREMAIL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERWEBTITLE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_EMAIL."'><span class='fa fa-fw fa-envelope-o' aria-hidden='true'></span></button>";
207
+        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeImg(\"{$textarea_id}\", \"".htmlspecialchars(_ENTERIMGURL, ENT_QUOTES)."\", \"".htmlspecialchars(_ENTERIMGPOS, ENT_QUOTES)."\", \"".htmlspecialchars(_IMGPOSRORL, ENT_QUOTES)."\", \"".htmlspecialchars(_ERRORIMGPOS, ENT_QUOTES)."\", \"".htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_IMG."'><span class='fa fa-fw fa-file-image-o' aria-hidden='true'></span></button>";
208
+        $code .= "<button type='button' class='btn btn-default' onclick='openWithSelfMain(\"".XOOPS_URL."/imagemanager.php?target={$textarea_id}\",\"imgmanager\",400,430);' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_IMAGE."'><span class='fa fa-file-image-o' aria-hidden='true'></span><span style='font-size:75%;'> Manager</span></button>";
209
+        $code .= "<button type='button' class='btn btn-default' onclick='openWithSelfMain(\"".XOOPS_URL."/misc.php?action=showpopups&amp;type=smilies&amp;target={$textarea_id}\",\"smilies\",300,475);' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_SMILEY."'><span class='fa fa-fw fa-smile-o' aria-hidden='true'></span></button>";
210 210
 
211
-        $myts        = MyTextSanitizer::getInstance();
211
+        $myts = MyTextSanitizer::getInstance();
212 212
 
213 213
         $extensions = array_filter($myts->config['extensions']);
214 214
         foreach (array_keys($extensions) as $key) {
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
                 $element->js .= $js;
223 223
             }
224 224
         }
225
-        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeCode(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERCODE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_CODE . "'><span class='fa fa-fw fa-code' aria-hidden='true'></span></button>";
226
-        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeQuote(\"{$textarea_id}\", \"" . htmlspecialchars(_ENTERQUOTE, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALT_QUOTE . "'><span class='fa fa-fw fa-quote-right' aria-hidden='true'></span></button>";
225
+        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeCode(\"{$textarea_id}\", \"".htmlspecialchars(_ENTERCODE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_CODE."'><span class='fa fa-fw fa-code' aria-hidden='true'></span></button>";
226
+        $code .= "<button type='button' class='btn btn-default' onclick='xoopsCodeQuote(\"{$textarea_id}\", \"".htmlspecialchars(_ENTERQUOTE, ENT_QUOTES)."\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALT_QUOTE."'><span class='fa fa-fw fa-quote-right' aria-hidden='true'></span></button>";
227 227
 
228 228
         $xoopsPreload = XoopsPreload::getInstance();
229 229
         $xoopsPreload->triggerEvent('core.class.xoopsform.formdhtmltextarea.codeicon', array(&$code));
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
     {
243 243
         $textarea_id = $element->getName();
244 244
         $hiddentext  = $element->_hiddenText;
245
-        $fontStr = "<script type=\"text/javascript\">" . "var _editor_dialog = ''" . "+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'SIZE\'>" . _SIZE . "</option>'";
245
+        $fontStr = "<script type=\"text/javascript\">"."var _editor_dialog = ''"."+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"."+ '<option value=\'SIZE\'>"._SIZE."</option>'";
246 246
 
247 247
         foreach ($GLOBALS['formtextdhtml_sizes'] as $_val => $_name) {
248 248
             $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'";
249 249
         }
250 250
         $fontStr .= " + '</select> '";
251
-        $fontStr .= "+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'FONT\'>" . _FONT . "</option>'";
251
+        $fontStr .= "+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"."+ '<option value=\'FONT\'>"._FONT."</option>'";
252 252
         $fontarray = !empty($GLOBALS['formtextdhtml_fonts']) ? $GLOBALS['formtextdhtml_fonts'] : array(
253 253
             'Arial',
254 254
             'Courier',
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'";
262 262
         }
263 263
         $fontStr .= " + '</select> '";
264
-        $fontStr .= "+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'COLOR\'>" . _COLOR . "</option>';" . "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF');
264
+        $fontStr .= "+ '<select class=\"input-sm form-control\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"."+ '<option value=\'COLOR\'>"._COLOR."</option>';"."var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF');
265 265
                 for (var i = 0; i < _color_array.length; i ++) {
266 266
                     for (var j = 0; j < _color_array.length; j ++) {
267 267
                         for (var k = 0; k < _color_array.length; k ++) {
@@ -274,14 +274,14 @@  discard block
 block discarded – undo
274 274
         $fontStr .= ";";
275 275
         $fontStr .= 'document.write(_editor_dialog); </script>';
276 276
 
277
-        $styleStr  = "<button type='button' class='btn btn-default' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_BOLD . "' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>";
278
-        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_ITALIC . "' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>";
279
-        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_UNDERLINE . "' aria-label='Left Align'>" . '<span class="fa fa-underline"></span></button>';
280
-        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_LINETHROUGH . "' aria-label='Left Align'>" . '<span class="fa fa-strikethrough"></span></button>';
277
+        $styleStr  = "<button type='button' class='btn btn-default' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_BOLD."' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>";
278
+        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_ITALIC."' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>";
279
+        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_UNDERLINE."' aria-label='Left Align'>".'<span class="fa fa-underline"></span></button>';
280
+        $styleStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_LINETHROUGH."' aria-label='Left Align'>".'<span class="fa fa-strikethrough"></span></button>';
281 281
 
282
-        $alignStr  = "<button type='button' class='btn btn-default' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_LEFT . "' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>";
283
-        $alignStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_CENTER . "' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>";
284
-        $alignStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . _XOOPS_FORM_ALT_RIGHT . "' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>";
282
+        $alignStr  = "<button type='button' class='btn btn-default' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_LEFT."' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>";
283
+        $alignStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_CENTER."' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>";
284
+        $alignStr .= "<button type='button' class='btn btn-default' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='"._XOOPS_FORM_ALT_RIGHT."' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>";
285 285
 
286 286
         $fontStr .= "<br>\n{$styleStr}&nbsp;{$alignStr}&nbsp;\n";
287 287
         return $fontStr;
@@ -303,9 +303,9 @@  discard block
 block discarded – undo
303 303
                 $ret .= $element->getDelimeter();
304 304
             }
305 305
             if ($ele->getCaption() != '') {
306
-                $ret .= $ele->getCaption() . '&nbsp;';
306
+                $ret .= $ele->getCaption().'&nbsp;';
307 307
             }
308
-            $ret .= $ele->render() . NWLINE;
308
+            $ret .= $ele->render().NWLINE;
309 309
             if (!$ele->isHidden()) {
310 310
                 ++$count;
311 311
             }
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public function renderFormFile(XoopsFormFile $element)
324 324
     {
325
-        return '<input type="hidden" name="MAX_FILE_SIZE" value="' . $element->getMaxFileSize() . '" />'
326
-            . '<input type="file" name="' . $element->getName() . '" id="' . $element->getName() . '" title="'
327
-            . $element->getTitle() . '" ' . $element->getExtra() . ' />'
328
-            . '<input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="' . $element->getName()
325
+        return '<input type="hidden" name="MAX_FILE_SIZE" value="'.$element->getMaxFileSize().'" />'
326
+            . '<input type="file" name="'.$element->getName().'" id="'.$element->getName().'" title="'
327
+            . $element->getTitle().'" '.$element->getExtra().' />'
328
+            . '<input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="'.$element->getName()
329 329
             . '" />';
330 330
 
331 331
     }
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function renderFormPassword(XoopsFormPassword $element)
353 353
     {
354
-        return '<input type="password" name="' . $element->getName() . '" id="' . $element->getName() . '" size="'
355
-            . $element->getSize() . '" maxlength="' . $element->getMaxlength() . '" value="' . $element->getValue()
356
-            . '"' . $element->getExtra() . ' ' . ($element->autoComplete ? '' : 'autocomplete="off" ') . '/>';
354
+        return '<input type="password" name="'.$element->getName().'" id="'.$element->getName().'" size="'
355
+            . $element->getSize().'" maxlength="'.$element->getMaxlength().'" value="'.$element->getValue()
356
+            . '"'.$element->getExtra().' '.($element->autoComplete ? '' : 'autocomplete="off" ').'/>';
357 357
     }
358 358
 
359 359
     /**
@@ -386,14 +386,14 @@  discard block
 block discarded – undo
386 386
                 $ret .= '<td>';
387 387
             }
388 388
 
389
-            $ret .= '<input type="radio" name="' . $ele_name . '" id="' . $ele_name . $id_ele
390
-                . '" title = "' . htmlspecialchars($ele_title, ENT_QUOTES) . '" value="'
391
-                . htmlspecialchars($value, ENT_QUOTES) . '"';
389
+            $ret .= '<input type="radio" name="'.$ele_name.'" id="'.$ele_name.$id_ele
390
+                . '" title = "'.htmlspecialchars($ele_title, ENT_QUOTES).'" value="'
391
+                . htmlspecialchars($value, ENT_QUOTES).'"';
392 392
             if (isset($ele_value) && $value == $ele_value) {
393 393
                 $ret .= ' checked';
394 394
             }
395
-            $ret .= $ele_extra . ' />' . "<label name='xolb_{$ele_name}' for='" . $ele_name . $id_ele
396
-                . "'>" . $name . '</label>' . $ele_delimiter;
395
+            $ret .= $ele_extra.' />'."<label name='xolb_{$ele_name}' for='".$ele_name.$id_ele
396
+                . "'>".$name.'</label>'.$ele_delimiter;
397 397
             if (!empty($element->columns)) {
398 398
                 $ret .= '</td>';
399 399
                 if (++$i % $element->columns == 0) {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
         }
404 404
         if (!empty($element->columns)) {
405 405
             if ($span = $i % $element->columns) {
406
-                $ret .= '<td colspan="' . ($element->columns - $span) . '"></td></tr>';
406
+                $ret .= '<td colspan="'.($element->columns - $span).'"></td></tr>';
407 407
             }
408 408
             $ret .= '</table>';
409 409
         }
@@ -424,19 +424,19 @@  discard block
 block discarded – undo
424 424
         $ele_title   = $element->getTitle();
425 425
         $ele_value   = $element->getValue();
426 426
         $ele_options = $element->getOptions();
427
-        $ret = '<select size="' . $element->getSize() . '"' . $element->getExtra();
427
+        $ret = '<select size="'.$element->getSize().'"'.$element->getExtra();
428 428
         if ($element->isMultiple() != false) {
429
-            $ret .= ' name="' . $ele_name . '[]" id="' . $ele_name . '" title="' . $ele_title
429
+            $ret .= ' name="'.$ele_name.'[]" id="'.$ele_name.'" title="'.$ele_title
430 430
                 . '" multiple="multiple">';
431 431
         } else {
432
-            $ret .= ' name="' . $ele_name . '" id="' . $ele_name . '" title="' . $ele_title . '">';
432
+            $ret .= ' name="'.$ele_name.'" id="'.$ele_name.'" title="'.$ele_title.'">';
433 433
         }
434 434
         foreach ($ele_options as $value => $name) {
435
-            $ret .= '<option value="' . htmlspecialchars($value, ENT_QUOTES) . '"';
435
+            $ret .= '<option value="'.htmlspecialchars($value, ENT_QUOTES).'"';
436 436
             if (count($ele_value) > 0 && in_array($value, $ele_value)) {
437 437
                 $ret .= ' selected';
438 438
             }
439
-            $ret .= '>' . $name . '</option>';
439
+            $ret .= '>'.$name.'</option>';
440 440
         }
441 441
         $ret .= '</select>';
442 442
 
@@ -452,9 +452,9 @@  discard block
 block discarded – undo
452 452
      */
453 453
     public function renderFormText(XoopsFormText $element)
454 454
     {
455
-        return "<input type='text' name='" . $element->getName() . "' title='" . $element->getTitle()
456
-            . "' id='" . $element->getName() . "' size='" . $element->getSize() . "' maxlength='"
457
-            . $element->getMaxlength() . "' value='" . $element->getValue() . "'" . $element->getExtra()
455
+        return "<input type='text' name='".$element->getName()."' title='".$element->getTitle()
456
+            . "' id='".$element->getName()."' size='".$element->getSize()."' maxlength='"
457
+            . $element->getMaxlength()."' value='".$element->getValue()."'".$element->getExtra()
458 458
             . ' />';
459 459
     }
460 460
 
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
      */
468 468
     public function renderFormTextArea(XoopsFormTextArea $element)
469 469
     {
470
-        return "<textarea name='" . $element->getName() . "' id='" . $element->getName() . "'  title='"
471
-            . $element->getTitle() . "' rows='" . $element->getRows() . "' cols='" . $element->getCols()
472
-            . "'" . $element->getExtra() . '>' . $element->getValue() . '</textarea>';
470
+        return "<textarea name='".$element->getName()."' id='".$element->getName()."'  title='"
471
+            . $element->getTitle()."' rows='".$element->getRows()."' cols='".$element->getCols()
472
+            . "'".$element->getExtra().'>'.$element->getValue().'</textarea>';
473 473
     }
474 474
 
475 475
     /**
@@ -482,10 +482,10 @@  discard block
 block discarded – undo
482 482
     public function renderFormTextDateSelect(XoopsFormTextDateSelect $element)
483 483
     {
484 484
         static $included = false;
485
-        if (file_exists(XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php')) {
486
-            include_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php';
485
+        if (file_exists(XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php')) {
486
+            include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php';
487 487
         } else {
488
-            include_once XOOPS_ROOT_PATH . '/language/english/calendar.php';
488
+            include_once XOOPS_ROOT_PATH.'/language/english/calendar.php';
489 489
         }
490 490
 
491 491
         $ele_name  = $element->getName();
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
                     if (calendar != null) {
533 533
                     calendar.hide();
534 534
                     } else {
535
-                    var cal = new Calendar(true, "' . $jstime . '", selected, closeHandler);
535
+                    var cal = new Calendar(true, "' . $jstime.'", selected, closeHandler);
536 536
                     calendar = cal;
537 537
                     cal.setRange(1900, 2100);
538 538
                     calendar.create();
@@ -546,55 +546,55 @@  discard block
 block discarded – undo
546 546
                     }
547 547
 
548 548
                     Calendar._DN = new Array
549
-                    ("' . _CAL_SUNDAY . '",
550
-                    "' . _CAL_MONDAY . '",
551
-                    "' . _CAL_TUESDAY . '",
552
-                    "' . _CAL_WEDNESDAY . '",
553
-                    "' . _CAL_THURSDAY . '",
554
-                    "' . _CAL_FRIDAY . '",
555
-                    "' . _CAL_SATURDAY . '",
556
-                    "' . _CAL_SUNDAY . '");
549
+                    ("' . _CAL_SUNDAY.'",
550
+                    "' . _CAL_MONDAY.'",
551
+                    "' . _CAL_TUESDAY.'",
552
+                    "' . _CAL_WEDNESDAY.'",
553
+                    "' . _CAL_THURSDAY.'",
554
+                    "' . _CAL_FRIDAY.'",
555
+                    "' . _CAL_SATURDAY.'",
556
+                    "' . _CAL_SUNDAY.'");
557 557
                     Calendar._MN = new Array
558
-                    ("' . _CAL_JANUARY . '",
559
-                    "' . _CAL_FEBRUARY . '",
560
-                    "' . _CAL_MARCH . '",
561
-                    "' . _CAL_APRIL . '",
562
-                    "' . _CAL_MAY . '",
563
-                    "' . _CAL_JUNE . '",
564
-                    "' . _CAL_JULY . '",
565
-                    "' . _CAL_AUGUST . '",
566
-                    "' . _CAL_SEPTEMBER . '",
567
-                    "' . _CAL_OCTOBER . '",
568
-                    "' . _CAL_NOVEMBER . '",
569
-                    "' . _CAL_DECEMBER . '");
558
+                    ("' . _CAL_JANUARY.'",
559
+                    "' . _CAL_FEBRUARY.'",
560
+                    "' . _CAL_MARCH.'",
561
+                    "' . _CAL_APRIL.'",
562
+                    "' . _CAL_MAY.'",
563
+                    "' . _CAL_JUNE.'",
564
+                    "' . _CAL_JULY.'",
565
+                    "' . _CAL_AUGUST.'",
566
+                    "' . _CAL_SEPTEMBER.'",
567
+                    "' . _CAL_OCTOBER.'",
568
+                    "' . _CAL_NOVEMBER.'",
569
+                    "' . _CAL_DECEMBER.'");
570 570
 
571 571
                     Calendar._TT = {};
572
-                    Calendar._TT["TOGGLE"] = "' . _CAL_TGL1STD . '";
573
-                    Calendar._TT["PREV_YEAR"] = "' . _CAL_PREVYR . '";
574
-                    Calendar._TT["PREV_MONTH"] = "' . _CAL_PREVMNTH . '";
575
-                    Calendar._TT["GO_TODAY"] = "' . _CAL_GOTODAY . '";
576
-                    Calendar._TT["NEXT_MONTH"] = "' . _CAL_NXTMNTH . '";
577
-                    Calendar._TT["NEXT_YEAR"] = "' . _CAL_NEXTYR . '";
578
-                    Calendar._TT["SEL_DATE"] = "' . _CAL_SELDATE . '";
579
-                    Calendar._TT["DRAG_TO_MOVE"] = "' . _CAL_DRAGMOVE . '";
580
-                    Calendar._TT["PART_TODAY"] = "(' . _CAL_TODAY . ')";
581
-                    Calendar._TT["MON_FIRST"] = "' . _CAL_DISPM1ST . '";
582
-                    Calendar._TT["SUN_FIRST"] = "' . _CAL_DISPS1ST . '";
583
-                    Calendar._TT["CLOSE"] = "' . _CLOSE . '";
584
-                    Calendar._TT["TODAY"] = "' . _CAL_TODAY . '";
572
+                    Calendar._TT["TOGGLE"] = "' . _CAL_TGL1STD.'";
573
+                    Calendar._TT["PREV_YEAR"] = "' . _CAL_PREVYR.'";
574
+                    Calendar._TT["PREV_MONTH"] = "' . _CAL_PREVMNTH.'";
575
+                    Calendar._TT["GO_TODAY"] = "' . _CAL_GOTODAY.'";
576
+                    Calendar._TT["NEXT_MONTH"] = "' . _CAL_NXTMNTH.'";
577
+                    Calendar._TT["NEXT_YEAR"] = "' . _CAL_NEXTYR.'";
578
+                    Calendar._TT["SEL_DATE"] = "' . _CAL_SELDATE.'";
579
+                    Calendar._TT["DRAG_TO_MOVE"] = "' . _CAL_DRAGMOVE.'";
580
+                    Calendar._TT["PART_TODAY"] = "(' . _CAL_TODAY.')";
581
+                    Calendar._TT["MON_FIRST"] = "' . _CAL_DISPM1ST.'";
582
+                    Calendar._TT["SUN_FIRST"] = "' . _CAL_DISPS1ST.'";
583
+                    Calendar._TT["CLOSE"] = "' . _CLOSE.'";
584
+                    Calendar._TT["TODAY"] = "' . _CAL_TODAY.'";
585 585
 
586 586
                     // date formats
587
-                    Calendar._TT["DEF_DATE_FORMAT"] = "' . _SHORTDATESTRING . '";
588
-                    Calendar._TT["TT_DATE_FORMAT"] = "' . _SHORTDATESTRING . '";
587
+                    Calendar._TT["DEF_DATE_FORMAT"] = "' . _SHORTDATESTRING.'";
588
+                    Calendar._TT["TT_DATE_FORMAT"] = "' . _SHORTDATESTRING.'";
589 589
 
590 590
                     Calendar._TT["WK"] = "";
591 591
                 ');
592 592
             }
593 593
         }
594
-        return '<input type="text" name="' . $ele_name . '" id="' . $ele_name . '" size="'
595
-            . $element->getSize() . '" maxlength="' . $element->getMaxlength() . '" value="'
596
-            . $display_value . '"' . $element->getExtra()
597
-            . ' /><input type="reset" value=" ... " onclick="return showCalendar(\'' . $ele_name
594
+        return '<input type="text" name="'.$ele_name.'" id="'.$ele_name.'" size="'
595
+            . $element->getSize().'" maxlength="'.$element->getMaxlength().'" value="'
596
+            . $display_value.'"'.$element->getExtra()
597
+            . ' /><input type="reset" value=" ... " onclick="return showCalendar(\''.$ele_name
598 598
             . '\');">';
599 599
         /*
600 600
         return "<input type='text' name='" . $ele_name . "' id='" . $ele_name . "' size='"
@@ -615,9 +615,9 @@  discard block
 block discarded – undo
615 615
     public function renderThemeForm(XoopsThemeForm $form)
616 616
     {
617 617
         $ele_name = $form->getName();
618
-        $ret      = '<form name="' . $ele_name . '" id="' . $ele_name . '" action="' . $form->getAction() . '" method="' . $form->getMethod() . '" onsubmit="return xoopsFormValidate_' . $ele_name . '();"' . $form->getExtra() . '>
618
+        $ret      = '<form name="'.$ele_name.'" id="'.$ele_name.'" action="'.$form->getAction().'" method="'.$form->getMethod().'" onsubmit="return xoopsFormValidate_'.$ele_name.'();"'.$form->getExtra().'>
619 619
             <table width="100%" class="outer" cellspacing="1">
620
-            <tr><th colspan="2">' . $form->getTitle() . '</th></tr>
620
+            <tr><th colspan="2">' . $form->getTitle().'</th></tr>
621 621
         ';
622 622
         $hidden   = '';
623 623
         $class    = 'even';
@@ -628,30 +628,30 @@  discard block
 block discarded – undo
628 628
                 if (!$ele->getNocolspan()) {
629 629
                     $ret .= '<tr valign="top" align="left"><td class="head">';
630 630
                     if (($caption = $ele->getCaption()) != '') {
631
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
632
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
631
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
632
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
633 633
                         $ret .= '<span class="caption-marker">*</span>';
634 634
                         $ret .= '</div>';
635 635
                     }
636 636
                     if (($desc = $ele->getDescription()) != '') {
637
-                        $ret .= '<div class="xoops-form-element-help">' . $desc . '</div>';
637
+                        $ret .= '<div class="xoops-form-element-help">'.$desc.'</div>';
638 638
                     }
639
-                    $ret .= '</td><td class="' . $class . '">' . $ele->render() . '</td></tr>' . NWLINE;
639
+                    $ret .= '</td><td class="'.$class.'">'.$ele->render().'</td></tr>'.NWLINE;
640 640
                 } else {
641 641
                     $ret .= '<tr valign="top" align="left"><td class="head" colspan="2">';
642 642
                     if (($caption = $ele->getCaption()) != '') {
643
-                        $ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' : '') . '">';
644
-                        $ret .= '<span class="caption-text">' . $caption . '</span>';
643
+                        $ret .= '<div class="xoops-form-element-caption'.($ele->isRequired() ? '-required' : '').'">';
644
+                        $ret .= '<span class="caption-text">'.$caption.'</span>';
645 645
                         $ret .= '<span class="caption-marker">*</span>';
646 646
                         $ret .= '</div>';
647 647
                     }
648
-                    $ret .= '</td></tr><tr valign="top" align="left"><td class="' . $class . '" colspan="2">' . $ele->render() . '</td></tr>';
648
+                    $ret .= '</td></tr><tr valign="top" align="left"><td class="'.$class.'" colspan="2">'.$ele->render().'</td></tr>';
649 649
                 }
650 650
             } else {
651 651
                 $hidden .= $ele->render();
652 652
             }
653 653
         }
654
-        $ret .= '</table>' . NWLINE . ' ' . $hidden . '</form>' . NWLINE;
654
+        $ret .= '</table>'.NWLINE.' '.$hidden.'</form>'.NWLINE;
655 655
         $ret .= $form->renderValidationJS(true);
656 656
 
657 657
         return $ret;
@@ -668,13 +668,13 @@  discard block
 block discarded – undo
668 668
      */
669 669
     public function addThemeFormBreak(XoopsThemeForm $form, $extra, $class)
670 670
     {
671
-        $class = ($class != '') ? " class='" . preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class) . "'" : '';
671
+        $class = ($class != '') ? " class='".preg_replace('/[^A-Za-z0-9\s\s_-]/i', '', $class)."'" : '';
672 672
         // Fix for $extra tag not showing
673 673
         if ($extra) {
674
-            $extra = '<tr><td colspan="2" ' . $class . '>' . $extra . '</td></tr>';
674
+            $extra = '<tr><td colspan="2" '.$class.'>'.$extra.'</td></tr>';
675 675
             $form->addElement($extra);
676 676
         } else {
677
-            $extra = '<tr><td colspan="2" ' . $class . '>&nbsp;</td></tr>';
677
+            $extra = '<tr><td colspan="2" '.$class.'>&nbsp;</td></tr>';
678 678
             $form->addElement($extra);
679 679
         }
680 680
     }
Please login to merge, or discard this patch.