Code Duplication    Length = 5-7 lines in 2 locations

singlefile.php 2 locations

@@ 190-194 (lines=5) @@
187
$categories = TDMDownloads_MygetItemIds('tdmdownloads_download', 'TDMDownloads');
188
$item = TDMDownloads_MygetItemIds('tdmdownloads_download_item', 'TDMDownloads');
189
if ($xoopsModuleConfig['permission_download'] == 1) {
190
    if (!in_array($view_downloads->getVar('cid'), $categories)) {
191
        $xoopsTpl->assign('perm_download', false);
192
    } else {
193
        $xoopsTpl->assign('perm_download', true);
194
    }
195
} else {
196
    if (!in_array($view_downloads->getVar('lid'), $item)) {
197
        $xoopsTpl->assign('perm_download', false);
@@ 195-201 (lines=7) @@
192
    } else {
193
        $xoopsTpl->assign('perm_download', true);
194
    }
195
} else {
196
    if (!in_array($view_downloads->getVar('lid'), $item)) {
197
        $xoopsTpl->assign('perm_download', false);
198
    } else {
199
        $xoopsTpl->assign('perm_download', true);
200
    }
201
}
202
203
// pour utiliser tellafriend.
204
if (($xoopsModuleConfig['usetellafriend'] == 1) and (is_dir('../tellafriend'))) {