Code Duplication    Length = 15-16 lines in 2 locations

class/EventHandler.php 2 locations

@@ 1168-1182 (lines=15) @@
1165
        }
1166
1167
        // Description
1168
        if (class_exists('XoopsFormEditor')) {
1169
            $options['name']   = 'event_desc';
1170
            $options['value']  = $desc;
1171
            $options['rows']   = 5;
1172
            $options['cols']   = '100%';
1173
            $options['width']  = '100%';
1174
            $options['height'] = '200px';
1175
            if ($isAdmin) {
1176
                $descEditor = new \XoopsFormEditor(_MD_EXTCAL_DESCRIPTION, $xoopsModuleConfig['editorAdmin'], $options, $nohtml = false, $onfailure = 'textarea');
1177
            } else {
1178
                $descEditor = new \XoopsFormEditor(_MD_EXTCAL_DESCRIPTION, $xoopsModuleConfig['editorUser'], $options, $nohtml = false, $onfailure = 'textarea');
1179
            }
1180
        } else {
1181
            $descEditor = new \XoopsFormDhtmlTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc, '100%', '100%');
1182
        }
1183
        $form->addElement($descEditor);
1184
1185
        // Max registered member for this event
@@ 1208-1223 (lines=16) @@
1205
        $form->addElement(new \XoopsFormText(_MD_EXTCAL_EMAIL, 'event_email', 80, 255, $email), false);
1206
1207
        // Address
1208
        if (class_exists('XoopsFormEditor')) {
1209
            $options['name']   = 'event_address';
1210
            $options['value']  = $event_address;
1211
            $options['rows']   = 5;
1212
            $options['cols']   = '100%';
1213
            $options['width']  = '100%';
1214
            $options['height'] = '200px';
1215
            if ($isAdmin) {
1216
                $addressEditor = new \XoopsFormEditor(_MD_EXTCAL_DESCRIPTION, $xoopsModuleConfig['editorAdmin'], $options, $nohtml = false, $onfailure = 'textarea');
1217
            } else {
1218
                $addressEditor = new \XoopsFormEditor(_MD_EXTCAL_DESCRIPTION, $xoopsModuleConfig['editorUser'], $options, $nohtml = false, $onfailure = 'textarea');
1219
            }
1220
        } else {
1221
            $addressEditor = new \XoopsFormDhtmlTextArea(_MD_EXTCAL_DESCRIPTION, 'event_address', $event_address, '100%', '100%');
1222
        }
1223
        $form->addElement($addressEditor);
1224
1225
        // Recurence form
1226
        $form->addElement(new Extcal\Form\FormRecurRules($reccurOptions));