Code Duplication    Length = 6-6 lines in 3 locations

include/functions.php 3 locations

@@ 246-251 (lines=6) @@
243
244
    // Only for Xoops 2.0.x
245
    switch ($editor_option) {
246
        case 'fckeditor':
247
            if (is_readable(XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php')) {
248
                require_once XOOPS_ROOT_PATH . '/class/fckeditor/formfckeditor.php';
249
                $editor = new XoopsFormFckeditor($caption, $name, $value);
250
            }
251
            break;
252
253
        case 'htmlarea':
254
            if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
@@ 253-258 (lines=6) @@
250
            }
251
            break;
252
253
        case 'htmlarea':
254
            if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
255
                require_once XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php';
256
                $editor = new XoopsFormHtmlarea($caption, $name, $value);
257
            }
258
            break;
259
260
        case 'dhtmltextarea':
261
        case 'dhtml':
@@ 283-288 (lines=6) @@
280
            }
281
            break;
282
283
        case 'koivi':
284
            if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) {
285
                require_once XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php';
286
                $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, $width, $height, '');
287
            }
288
            break;
289
    }
290
291
    return $editor;