Code Duplication    Length = 3-3 lines in 2 locations

admin/main.php 1 location

@@ 379-381 (lines=3) @@
376
            $form_cats  = new XoopsFormLabel(_MD_ITEMCATEGORIES, "$categories");
377
            $form->addElement($form_cats);
378
            $form->addElement(new XoopsFormDhtmlTextArea(_MD_DESCRIPTION, 'description', $description, 5, 50));
379
            while (list($dtypeid, $title, $section, $ftypeid, $fieldtype, $ext, $options, $itemid, $value, $customtitle, $custom) = $xoopsDB->fetchRow($data_result)) {
380
                $field = $datafieldmanager->createField($title, $dtypeid, $fieldtype, $ext, $options, $value, $custom, $customtitle);
381
            }
382
            $form->addElement(new XoopsFormButton('', 'submit', _MD_SAVE, 'submit'));
383
            $form->addElement(new XoopsFormHidden('op', 'save'));
384
            $form->addElement(new XoopsFormHidden('itemid', $get_itemid));

edit.php 1 location

@@ 337-339 (lines=3) @@
334
            $form->addElement(new XoopsFormFile(_MD_SELECT_PIC, 'image', 30000));
335
            $form->addElement(new XoopsFormImage(_MD_CURRENT_PIC, 'current_image', null, "$picture", '', ''));
336
337
            while (list($dtypeid, $title, $section, $ftypeid, $fieldtype, $ext, $options, $itemid, $value, $customtitle, $custom) = $xoopsDB->fetchRow($data_result)) {
338
                $field = $datafieldmanager->createField($title, $dtypeid, $fieldtype, $ext, $options, $value, $custom, $customtitle);
339
            }
340
            $form->addElement(new XoopsFormButton('', 'submit', _MD_SAVE, 'submit'));
341
            $form->addElement(new XoopsFormHidden('op', 'edit'));
342
            $form->addElement(new XoopsFormHidden('itemid', $get_itemid));