Code Duplication    Length = 12-12 lines in 2 locations

htdocs/kernel/notification.php 2 locations

@@ 698-709 (lines=12) @@
695
        $not_config = $module->getInfo('notification');
696
        $tags       = array();
697
        if (!empty($not_config)) {
698
            if (!empty($not_config['tags_file'])) {
699
                $tags_file = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname') . '/' . $not_config['tags_file']);
700
                if (file_exists($tags_file)) {
701
                    include_once $tags_file;
702
                    if (!empty($not_config['tags_func'])) {
703
                        $tags_func = $not_config['tags_func'];
704
                        if (function_exists($tags_func)) {
705
                            $tags = $tags_func($category, (int)$item_id, $event);
706
                        }
707
                    }
708
                }
709
            }
710
            // RMV-NEW
711
            if (!empty($not_config['lookup_file'])) {
712
                $lookup_file = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname') . '/' . $not_config['lookup_file']);
@@ 711-722 (lines=12) @@
708
                }
709
            }
710
            // RMV-NEW
711
            if (!empty($not_config['lookup_file'])) {
712
                $lookup_file = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname') . '/' . $not_config['lookup_file']);
713
                if (file_exists($lookup_file)) {
714
                    include_once $lookup_file;
715
                    if (!empty($not_config['lookup_func'])) {
716
                        $lookup_func = $not_config['lookup_func'];
717
                        if (function_exists($lookup_func)) {
718
                            $item_info = $lookup_func($category, (int)$item_id);
719
                        }
720
                    }
721
                }
722
            }
723
        }
724
        $tags['X_ITEM_NAME']       = !empty($item_info['name']) ? $item_info['name'] : '[' . _NOT_ITEMNAMENOTAVAILABLE . ']';
725
        $tags['X_ITEM_URL']        = !empty($item_info['url']) ? $item_info['url'] : '[' . _NOT_ITEMURLNOTAVAILABLE . ']';