Code Duplication    Length = 4-5 lines in 2 locations

class/item.php 2 locations

@@ 1175-1179 (lines=5) @@
1172
        if (!parent::insert($item, $force)) {
1173
            return false;
1174
        }
1175
        if (xoops_isActiveModule('tag')) {
1176
            // Storing tags information
1177
            $tagHandler = xoops_getModuleHandler('tag', 'tag');
1178
            $tagHandler->updateByItem($item->getVar('item_tag'), $item->getVar('itemid'), PUBLISHER_DIRNAME, 0);
1179
        }
1180
1181
        return true;
1182
    }
@@ 1204-1207 (lines=4) @@
1201
            return false;
1202
        }
1203
        // Removing tags information
1204
        if (xoops_isActiveModule('tag')) {
1205
            $tagHandler = xoops_getModuleHandler('tag', 'tag');
1206
            $tagHandler->updateByItem('', $item->getVar('itemid'), PUBLISHER_DIRNAME, 0);
1207
        }
1208
1209
        return true;
1210
    }