Code Duplication    Length = 18-18 lines in 4 locations

admin/category.php 1 location

@@ 143-160 (lines=18) @@
140
//    $sform->addElement($editor, false);
141
142
    $optionsTrayNote = new XoopsFormElementTray(_AM_XOOPSTUBE_FCATEGORY_DESCRIPTION, '<br />');
143
    if (class_exists('XoopsFormEditor')) {
144
        $options['name']   = 'description';
145
        $options['value']  = $description;
146
        $options['rows']   = 5;
147
        $options['cols']   = '100%';
148
        $options['width']  = '100%';
149
        $options['height'] = '200px';
150
        $editor            = new XoopsFormEditor('', $xoopsModuleConfig['form_optionsuser'], $options, $nohtml = false, $onfailure = 'textarea');
151
        $optionsTrayNote->addElement($editor);
152
    } else {
153
        $editor = new XoopsFormDhtmlTextArea(
154
            '', 'description', $item->getVar(
155
                'description',
156
                'e'
157
            ), '100%', '100%'
158
        );
159
        $optionsTrayNote->addElement($editor);
160
    }
161
162
    $sform->addElement($optionsTrayNote, false);
163

admin/indexpage.php 1 location

@@ 123-140 (lines=18) @@
120
//        $sform->addElement($editor, false);
121
122
        $optionsTrayNote = new XoopsFormElementTray(_AM_XOOPSTUBE_IPAGE_CHEADING, '<br />');
123
        if (class_exists('XoopsFormEditor')) {
124
            $options['name']   = 'indexheader';
125
            $options['value']  = $indexheader;
126
            $options['rows']   = 5;
127
            $options['cols']   = '100%';
128
            $options['width']  = '100%';
129
            $options['height'] = '200px';
130
            $editor            = new XoopsFormEditor('', $xoopsModuleConfig['form_optionsuser'], $options, $nohtml = false, $onfailure = 'textarea');
131
            $optionsTrayNote->addElement($editor);
132
        } else {
133
            $editor = new XoopsFormDhtmlTextArea(
134
                '', 'indexheader', $item->getVar(
135
                    'indexheader',
136
                    'e'
137
                ), '100%', '100%'
138
            );
139
            $optionsTrayNote->addElement($editor);
140
        }
141
142
        $sform->addElement($optionsTrayNote, false);
143

admin/main.php 1 location

@@ 184-201 (lines=18) @@
181
//    $sform -> addElement( $editor, false );
182
183
    $optionsTrayNote = new XoopsFormElementTray(_AM_XOOPSTUBE_VIDEO_DESCRIPTION, '<br />');
184
    if (class_exists('XoopsFormEditor')) {
185
        $options['name']   = 'descriptionb';
186
        $options['value']  = $descriptionb;
187
        $options['rows']   = 5;
188
        $options['cols']   = '100%';
189
        $options['width']  = '100%';
190
        $options['height'] = '200px';
191
        $descriptionb      = new XoopsFormEditor('', $xoopsModuleConfig['form_options'], $options, $nohtml = false, $onfailure = 'textarea');
192
        $optionsTrayNote->addElement($descriptionb);
193
    } else {
194
        $descriptionb = new XoopsFormDhtmlTextArea(
195
            '', 'descriptionb', $item->getVar(
196
                'descriptionb',
197
                'e'
198
            ), '100%', '100%'
199
        );
200
        $optionsTrayNote->addElement($descriptionb);
201
    }
202
203
    $sform->addElement($optionsTrayNote, false);
204

submit.php 1 location

@@ 323-340 (lines=18) @@
320
//        $sform -> addElement( $editor, true );
321
322
        $optionsTrayNote = new XoopsFormElementTray(_MD_XOOPSTUBE_DESCRIPTIONC, '<br />');
323
        if (class_exists('XoopsFormEditor')) {
324
            $options['name']   = 'descriptionb';
325
            $options['value']  = $descriptionb;
326
            $options['rows']   = 5;
327
            $options['cols']   = '100%';
328
            $options['width']  = '100%';
329
            $options['height'] = '200px';
330
            $editor            = new XoopsFormEditor('', $xoopsModuleConfig['form_optionsuser'], $options, $nohtml = false, $onfailure = 'textarea');
331
            $optionsTrayNote->addElement($editor);
332
        } else {
333
            $editor = new XoopsFormDhtmlTextArea(
334
                '', 'descriptionb', $item->getVar(
335
                    'descriptionb',
336
                    'e'
337
                ), '100%', '100%'
338
            );
339
            $optionsTrayNote->addElement($editor);
340
        }
341
342
        $sform->addElement($optionsTrayNote, false);
343