Code Duplication    Length = 13-13 lines in 2 locations

index.php 1 location

@@ 197-209 (lines=13) @@
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)) {
199
                $perm_download = false;
200
            } else {
201
                $perm_download = true;
202
            }
203
        } else {
204
            if (!in_array($downloads_arr[$i]->getVar('lid'), $item)) {
205
                $perm_download = false;
206
            } else {
207
                $perm_download = true;
208
            }
209
        }
210
        $xoopsTpl->append('file', array('id' => $downloads_arr[$i]->getVar('lid'),'cid'=>$downloads_arr[$i]->getVar('cid'), 'title' => $downloads_arr[$i]->getVar('title'), 'new' => $new, 'pop' => $pop,'logourl' => $logourl,'updated' => $datetime,'description_short' => $description_short,
211
                                        'adminlink' => $adminlink, 'submitter' => $submitter, 'perm_download' => $perm_download, 'count' => $count));
212
        //pour les mots clef

viewcat.php 1 location

@@ 241-253 (lines=13) @@
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)) {
243
                $perm_download = false;
244
            } else {
245
                $perm_download = true;
246
            }
247
        } else {
248
            if (!in_array($downloads_arr[$i]->getVar('lid'), $item)) {
249
                $perm_download = false;
250
            } else {
251
                $perm_download = true;
252
            }
253
        }
254
        // utilisation du sommaire
255
        $cpt++;
256
        $summary = $cpt . '- <a href="#l' . $cpt . '">' . $downloads_arr[$i]->getVar('title') . '</a><br />';