Code Duplication    Length = 6-6 lines in 2 locations

viewads.php 2 locations

@@ 74-79 (lines=6) @@
71
    $xoopsTpl->assign('adslight_logolink', _ADSLIGHT_LOGOLINK);
72
73
    // Hack redirection erreur 404  si lid=null
74
    if ($lid == '') {
75
        header('Status: 301 Moved Permanently', false, 301);
76
        //        header('Location: '.XOOPS_URL.'/modules/adslight/404.php');
77
        //        exit();
78
        redirect_header(XOOPS_URL . '/modules/adslight/404.php', 1);
79
    }
80
81
    $xoopsTpl->assign('adslight_active_bookmark', $xoopsModuleConfig['adslight_active_bookmark']);
82
    $xoopsTpl->assign('adslight_style_bookmark', $xoopsModuleConfig['adslight_style_bookmark']);
@@ 129-134 (lines=6) @@
126
    $recordexist = $xoopsDB->getRowsNum($result);
127
128
    // Hack redirection erreur 404  si recordexist=null
129
    if ($recordexist == '') {
130
        header('Status: 301 Moved Permanently', false, 301);
131
        //        header('Location: '.XOOPS_URL.'/modules/adslight/404.php');
132
        //        exit();
133
        redirect_header(XOOPS_URL . '/modules/adslight/404.php', 1);
134
    }
135
136
    if ($recordexist) {
137
        list($lid, $cid, $title, $status, $expire, $type, $desctext, $tel, $price, $typeprice, $typeusure, $date, $email, $submitter, $usid, $town, $country, $contactby, $premium, $valid, $photo, $hits, $item_rating, $item_votes, $user_rating, $user_votes, $comments, $cod_img, $pic_lid, $uid_owner, $url) = $xoopsDB->fetchRow($result);