Code Duplication    Length = 4-4 lines in 2 locations

blocks/random_term.php 1 location

@@ 52-55 (lines=4) @@
49
        $entryID = intval($myrow['entryID']);
50
        $term = ucfirst($myts->displayTarea($myrow['term']));
51
52
        if ( !XOOPS_USE_MULTIBYTES ) {
53
            $deftemp = xoops_substr ( $myrow['definition'], 0, ( $lxConfig['rndlength'] -1 ));
54
            $definition = $myts -> displayTarea ( $deftemp, 1, 1, 1, 1, 1) ;
55
        }
56
57
        $categoryID = $myrow['categoryID'];
58
        $result_cat = $xoopsDB -> query("SELECT categoryID, name FROM ".$xoopsDB->prefix("lxcategories")." WHERE categoryID = $categoryID");

syndication.php 1 location

@@ 58-61 (lines=4) @@
55
        $syndication = array();
56
        $syndication['id'] = $myrow['entryID'];
57
        $syndication['term'] = ucfirst($myrow['term']);
58
        if ( !XOOPS_USE_MULTIBYTES ) {
59
            $syndication['definition'] = $myts -> displayTarea(xoops_substr ( $myrow['definition'], 0, ( $xoopsModuleConfig['rndlength'] -3 ) ) , 1, 1, 1, 1, 1);
60
            // note: if the definitions are too long try : $xoopsModuleConfig['rndlength'] -20 ) and decrease font-size:x-small below ...
61
        }
62
        if ( $xoopsModuleConfig['multicats'] == 1 ) {
63
            $syndication['catID'] = $myrow['categoryID'];
64
            $resultY = $xoopsDB -> query ("SELECT categoryID, name FROM ". $xoopsDB -> prefix ("lxcategories") . " WHERE categoryID = ".$myrow['categoryID']." ");