Code Duplication    Length = 6-6 lines in 3 locations

admin/actions/categories.php 1 location

@@ 42-47 (lines=6) @@
39
        $categories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters());
40
        $mytree     = new XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
41
42
        if (OledrionUtility::checkVerXoops($module, '2.5.9')) {
43
            $categoriesSelect0 = $mytree->makeSelectElement('id', 'cat_title', '--', '', true, 0, '', '');
44
            $categoriesSelect  = $categoriesSelect0->render();
45
        } else {
46
            $categoriesSelect = $mytree->makeSelBox('id', 'cat_title', '-- ', '', true);
47
        }
48
49
        echo "<div class='even'><form method='post' name='quickaccess' id='quickaccess' action='$baseurl' >"
50
             . _AM_OLEDRION_LIST

admin/actions/discounts.php 1 location

@@ 227-232 (lines=6) @@
224
        $categories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters());
225
        $mytree     = new Oledrion_XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
226
227
        if (OledrionUtility::checkVerXoops($module, '2.5.9')) {
228
            $categoriesSelect0 = $topic_tree->makeSelectElement('disc_cat_cid', 'cat_title', '-', $item->getVar('disc_cat_cid'), true, 0, '', '');
229
            $categoriesSelect  = $categoriesSelect0->render();
230
        } else {
231
            $categoriesSelect = $mytree->makeSelBox('disc_cat_cid', 'cat_title', '-', $item->getVar('disc_cat_cid'), _ALL);
232
        }
233
234
        $discountForTemplate['disc_cat_cid_select'] = $categoriesSelect;
235

admin/actions/products.php 1 location

@@ 171-176 (lines=6) @@
168
        }
169
        $mytree = new XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
170
171
        if (OledrionUtility::checkVerXoops($module, '2.5.9')) {
172
            $selectCateg0 = $mytree->makeSelectElement('filter_product_cid', 'cat_title', '-', $filter_product_cid, true, 0, '', '');
173
            $selectCateg  = $selectCateg0->render();
174
        } else {
175
            $selectCateg = $mytree->makeSelBox('filter_product_cid', 'cat_title', '-', $filter_product_cid, '---', 0, "style='width: 170px; max-width: 170px;'");
176
        }
177
178
        $onlineSelect      = OledrionUtility::htmlSelect('filter_product_online', array(2 => _YES, 1 => _NO), $filter_product_online);
179
        // B.R. New