Code Duplication    Length = 5-5 lines in 3 locations

index.php 1 location

@@ 191-195 (lines=5) @@
188
        $pop = TDMDownloads_Popular($downloads_arr[$i]->getVar('hits'));
189
190
        // D�fini si la personne est un admin
191
        if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
192
            $adminlink = '<a href="' . XOOPS_URL . '/modules/TDMDownloads/admin/downloads.php?op=view_downloads&amp;downloads_lid=' . $downloads_arr[$i]->getVar('lid') . '" title="' . _MD_TDMDOWNLOADS_EDITTHISDL . '"><img src="' . XOOPS_URL . '/modules/TDMDownloads/images/icon/edit.png" width="16px" height="16px" border="0" alt="' . _MD_TDMDOWNLOADS_EDITTHISDL . '" /></a>';
193
        } else {
194
            $adminlink = '';
195
        }
196
        //permission de t�l�charger
197
        if ($xoopsModuleConfig['permission_download'] == 1) {
198
            if (!in_array($downloads_arr[$i]->getVar('cid'), $categories)) {

singlefile.php 1 location

@@ 78-82 (lines=5) @@
75
    $logourl = $uploadurl_shots . $logourl;
76
}
77
// D�fini si la personne est un admin
78
if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
79
    $adminlink = '<a href="' . XOOPS_URL . '/modules/TDMDownloads/admin/downloads.php?op=view_downloads&amp;downloads_lid=' . $_REQUEST['lid'] . '" title="' . _MD_TDMDOWNLOADS_EDITTHISDL . '"><img src="' . XOOPS_URL . '/modules/TDMDownloads/images/icon/edit.png" width="16px" height="16px" border="0" alt="' . _MD_TDMDOWNLOADS_EDITTHISDL . '" /></a>';
80
} else {
81
    $adminlink = '';
82
}
83
84
$description = $view_downloads->getVar('description');
85
$xoopsTpl->assign('description' , str_replace('[pagebreak]','',$description));

viewcat.php 1 location

@@ 235-239 (lines=5) @@
232
        $pop = TDMDownloads_Popular($downloads_arr[$i]->getVar('hits'));
233
234
        // D�fini si la personne est un admin
235
        if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
236
            $adminlink = '<a href="' . XOOPS_URL . '/modules/TDMDownloads/admin/downloads.php?op=view_downloads&amp;downloads_lid=' . $downloads_arr[$i]->getVar('lid') . '" title="' . _MD_TDMDOWNLOADS_EDITTHISDL . '"><img src="' . XOOPS_URL . '/modules/TDMDownloads/images/icon/edit.png" width="16px" height="16px" border="0" alt="' . _MD_TDMDOWNLOADS_EDITTHISDL . '" /></a>';
237
        } else {
238
            $adminlink = '';
239
        }
240
        //permission de t�l�charger
241
        if ($xoopsModuleConfig['permission_download'] == 1) {
242
            if (!in_array($downloads_arr[$i]->getVar('cid'), $categories)) {