Code Duplication    Length = 5-6 lines in 2 locations

add.php 1 location

@@ 63-67 (lines=5) @@
60
    //    if ( !$xoopsCaptcha->verify() ) {
61
    //        redirect_header( XOOPS_URL . "/modules/adslight/index.php", 2, $xoopsCaptcha->getMessage() );
62
    //    }
63
    if ('' == XoopsRequest::getString('title', '', 'POST')) {
64
        $modHandler = xoops_getModuleHandler('module');
65
        $myModule   = $modHandler->getByDirname('adslight');
66
        $myModule->setErrors('Could not connect to the database.');
67
    }
68
69
    $cid       = XoopsRequest::getInt('cid', 0, 'POST');
70
    $cat_perms = AdslightUtilities::getMyItemIds('adslight_submit');

addlisting.php 1 location

@@ 65-70 (lines=6) @@
62
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
63
    }
64
65
    if (XoopsRequest::getString('title', '', 'POST') == '') {
66
        //        $erh->show('1001'); //'0001' => 'Could not connect to the forums database.',
67
        $modHandler = xoops_getModuleHandler('module');
68
        $myModule   = $modHandler->getByDirname('adslight');
69
        $myModule->setErrors('Could not connect to the database.');
70
    }
71
    $cid = XoopsRequest::getInt('cid', 0, 'POST');
72
73
    $cat_perms = AdslightUtilities::getMyItemIds('adslight_submit');