| @@ 112-134 (lines=23) @@ | ||
| 109 | \Xoops\Locale::translate($obj[$i]->getVar('conf_desc'), $mod->getVar('dirname')) : ''; |
|
| 110 | switch ($obj[$i]->getVar('conf_formtype')) { |
|
| 111 | ||
| 112 | case 'textarea': |
|
| 113 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
|
| 114 | if ($obj[$i]->getVar('conf_valuetype') === 'array') { |
|
| 115 | // this is exceptional.. only when value type is arrayneed a smarter way for this |
|
| 116 | $ele = ($obj[$i]->getVar('conf_value') != '') |
|
| 117 | ? new Xoops\Form\TextArea( |
|
| 118 | $title, |
|
| 119 | $obj[$i]->getVar('conf_name'), |
|
| 120 | $myts->htmlSpecialChars(implode('|', $obj[$i]->getConfValueForOutput())), |
|
| 121 | 5, |
|
| 122 | 5 |
|
| 123 | ) |
|
| 124 | : new Xoops\Form\TextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); |
|
| 125 | } else { |
|
| 126 | $ele = new Xoops\Form\TextArea( |
|
| 127 | $title, |
|
| 128 | $obj[$i]->getVar('conf_name'), |
|
| 129 | $myts->htmlSpecialChars($obj[$i]->getConfValueForOutput()), |
|
| 130 | 5, |
|
| 131 | 5 |
|
| 132 | ); |
|
| 133 | } |
|
| 134 | break; |
|
| 135 | ||
| 136 | case 'select': |
|
| 137 | $ele = new Xoops\Form\Select( |
|
| @@ 93-101 (lines=9) @@ | ||
| 90 | $desc = ($obj[$i]->getVar('conf_desc') != '') ? \Xoops\Locale::translate($obj[$i]->getVar('conf_desc'), $mod->getVar('dirname')) : ''; |
|
| 91 | switch ($obj[$i]->getVar('conf_formtype')) { |
|
| 92 | ||
| 93 | case 'textarea': |
|
| 94 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
|
| 95 | if ($obj[$i]->getVar('conf_valuetype') === 'array') { |
|
| 96 | // this is exceptional.. only when value type is arrayneed a smarter way for this |
|
| 97 | $ele = ($obj[$i]->getVar('conf_value') != '') ? new Xoops\Form\TextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlSpecialChars(implode('|', $obj[$i]->getConfValueForOutput())), 5, 5) : new Xoops\Form\TextArea($title, $obj[$i]->getVar('conf_name'), '', 5, 5); |
|
| 98 | } else { |
|
| 99 | $ele = new Xoops\Form\TextArea($title, $obj[$i]->getVar('conf_name'), $myts->htmlSpecialChars($obj[$i]->getConfValueForOutput()), 5, 5); |
|
| 100 | } |
|
| 101 | break; |
|
| 102 | ||
| 103 | case 'select': |
|
| 104 | $ele = new Xoops\Form\Select($title, $obj[$i]->getVar('conf_name'), $obj[$i]->getConfValueForOutput()); |
|