Code Duplication    Length = 6-6 lines in 2 locations

admin/stats.php 1 location

@@ 160-165 (lines=6) @@
157
    $dirNames[$mObj->dirname()] = $mObj->name();
158
    $not_config = $mObj->getInfo('notification');
159
    if (!empty($not_config['category'])) {
160
        foreach ($not_config['category'] as $category) {
161
            if (!empty($category['item_name'])) {
162
                $script = is_array($category["subscribe_from"]) ? implode(":", $category["subscribe_from"]) : $category["subscribe_from"];
163
                $itemLinks[$mObj->dirname(). ":" . $script . "-" . $category['item_name']] = $mObj->dirname()."/" . $script ."?".$category['item_name']."=ITEM_ID";
164
            }
165
        }
166
    }
167
}
168
$moduleEl = new XoopsFormSelect(_AM_USERLOG_MODULES,"modules",$modules,5, true);

blocks/views.php 1 location

@@ 81-86 (lines=6) @@
78
    $hasviews = array();
79
    foreach ($modules as $module) {
80
        $not_config = $module->getInfo('notification');
81
        foreach ($not_config['category'] as $category) {
82
            if (!empty($category['item_name'])) {
83
                $script = is_array($category["subscribe_from"]) ? implode(":", $category["subscribe_from"]) : $category["subscribe_from"];
84
                $hasviews[$module->dirname(). ":" . $script . "-" . $category['item_name']] = $module->dirname()."/" . $script ."?".$category['item_name']."=ITEM_ID";
85
            }
86
        }
87
    }
88
    
89
    $i=0;