Code Duplication    Length = 3-3 lines in 4 locations

blocks/xoopstube_top.php 4 locations

@@ 166-168 (lines=3) @@
163
164
    $i = 0;
165
    while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) {
166
        if (false === checkBlockGroups($myrow['cid']) || $myrow['cid'] == 0) {
167
            continue;
168
        }
169
        if (false === xtubeCheckBlockGroups($myrow['cid'])) {
170
            exit;
171
        }
@@ 258-260 (lines=3) @@
255
    require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/utility.php';
256
257
    while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) {
258
        if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
259
            continue;
260
        }
261
262
        if (false === xtubeCheckBlockGroups($myrow['cid'])) {
263
            exit;
@@ 330-332 (lines=3) @@
327
    require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/utility.php';
328
329
    while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result2))) {
330
        if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
331
            continue;
332
        }
333
        $videorandom = array();
334
        $title       = $xtubemyts->htmlSpecialChars($xtubemyts->stripSlashesGPC($myrow['title']));
335
        if (!XOOPS_USE_MULTIBYTES) {
@@ 396-398 (lines=3) @@
393
    require_once XOOPS_ROOT_PATH . '/modules/' . $xtubeModule->getVar('dirname') . '/class/utility.php';
394
395
    while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result2))) {
396
        if (false === checkBlockGroups($myrow['cid']) || 0 == $myrow['cid']) {
397
            continue;
398
        }
399
        $videorandomh            = array();
400
        $title                   = $xtubemyts->htmlSpecialChars($xtubemyts->stripSlashesGPC($myrow['title']));
401
        $videorandomh['balloon'] = $myrow['title'];