Code Duplication    Length = 6-6 lines in 3 locations

class/Instruction.php 1 location

@@ 84-89 (lines=6) @@
81
        $helper = Helper::getInstance();
82
        $module = $helper->getModule();
83
84
        if (Utility::checkVerXoops($module, '2.5.9')) {
85
            $mytree_select = $mytree->makeSelectElement('cid', 'title', '--', $this->getVar('cid'), true, 0, '', _AM_INSTRUCTION_CATC);
86
            $form->addElement($mytree_select);
87
        } else {
88
            $form->addElement(new \XoopsFormLabel(_AM_INSTRUCTION_CATC, $mytree->makeSelBox('cid', 'title', '--', $this->getVar('cid'), true)));
89
        }
90
91
        // Описание
92
        $form->addElement(Utility::getWysiwygForm(_AM_INSTRUCTION_DESCRIPTIONC, 'description', $this->getVar('description', 'e')), true);

class/Category.php 1 location

@@ 113-118 (lines=6) @@
110
        $helper = Helper::getInstance();
111
        $module = $helper->getModule();
112
113
        if (Utility::checkVerXoops($module, '2.5.9')) {
114
            $mytree_select = $mytree->makeSelectElement('pid', 'title', '--', $this->getVar('pid'), true, 0, '', _AM_INSTRUCTION_PCATC);
115
            $form->addElement($mytree_select);
116
        } else {
117
            $form->addElement(new \XoopsFormLabel(_AM_INSTRUCTION_PCATC, $mytree->makeSelBox('pid', 'title', '--', $this->getVar('pid'), true)));
118
        }
119
120
        // Вес
121
        $form->addElement(new \XoopsFormText(_AM_INSTRUCTION_WEIGHTC, 'weight', 5, 5, $this->getVar('weight')), true);

class/Page.php 1 location

@@ 101-106 (lines=6) @@
98
        $helper = Helper::getInstance();
99
        $module = $helper->getModule();
100
101
        if (Utility::checkVerXoops($module, '2.5.9')) {
102
            $mytree_select = $mytree->makeSelectElement('pid', 'title', '--', $this->getVar('pid'), true, 0, '', _AM_INSTRUCTION_PPAGEC);
103
            $form->addElement($mytree_select);
104
        } else {
105
            $form->addElement(new \XoopsFormLabel(_AM_INSTRUCTION_PPAGEC, $mytree->makeSelBox('pid', 'title', '--', $this->getVar('pid'), true)));
106
        }
107
108
        // Вес
109
        $form->addElement(new \XoopsFormText(_AM_INSTRUCTION_WEIGHTC, 'weight', 5, 5, $this->getVar('weight')), true);