Code Duplication    Length = 11-12 lines in 2 locations

admin/item.php 2 locations

@@ 45-55 (lines=11) @@
42
$rejectedstartitem  = XoopsRequest::getInt('rejectedstartitem', XoopsRequest::getInt('submittedstartitem', 0, 'GET'), 'POST');
43
44
switch ($op) {
45
    case 'clone':
46
        if ($itemid == 0) {
47
            $totalcategories = $publisher->getHandler('category')->getCategoriesCount(-1);
48
            if ($totalcategories == 0) {
49
                redirect_header('category.php?op=mod', 3, _AM_PUBLISHER_NEED_CATEGORY_ITEM);
50
                //                exit();
51
            }
52
        }
53
        publisherCpHeader();
54
        publisher_editItem(true, $itemid, true);
55
        break;
56
57
    case 'mod':
58
        if ($itemid == 0) {
@@ 57-68 (lines=12) @@
54
        publisher_editItem(true, $itemid, true);
55
        break;
56
57
    case 'mod':
58
        if ($itemid == 0) {
59
            $totalcategories = $publisher->getHandler('category')->getCategoriesCount(-1);
60
            if ($totalcategories == 0) {
61
                redirect_header('category.php?op=mod', 3, _AM_PUBLISHER_NEED_CATEGORY_ITEM);
62
                //                exit();
63
            }
64
        }
65
66
        publisherCpHeader();
67
        publisher_editItem(true, $itemid);
68
        break;
69
70
    case 'additem':
71
        $redirect_msg = $error_msg = '';