Code Duplication    Length = 4-5 lines in 2 locations

htdocs/themes/xbootstrap/modules/publisher/xoops_and_module_changes/modules/publisher/class/item.php 2 locations

@@ 1152-1156 (lines=5) @@
1149
        if (!parent::insert($item, $force)) {
1150
            return false;
1151
        }
1152
        if (xoops_isActiveModule('tag')) {
1153
            // Storing tags information
1154
            $tag_handler = xoops_getModuleHandler('tag', 'tag');
1155
            $tag_handler->updateByItem($item->getVar('item_tag'), $item->getVar('itemid'), PUBLISHER_DIRNAME, 0);
1156
        }
1157
1158
        return true;
1159
    }
@@ 1181-1184 (lines=4) @@
1178
            return false;
1179
        }
1180
        // Removing tags information
1181
        if (xoops_isActiveModule('tag')) {
1182
            $tag_handler = xoops_getModuleHandler('tag', 'tag');
1183
            $tag_handler->updateByItem('', $item->getVar('itemid'), PUBLISHER_DIRNAME, 0);
1184
        }
1185
1186
        return true;
1187
    }