Code Duplication    Length = 6-7 lines in 2 locations

htdocs/modules/wflinks/include/functions.php 2 locations

@@ 383-388 (lines=6) @@
380
381
    $arr = array();
382
    $result = $xoopsDB -> query( $sql );
383
    while ( list( $lid, $cid, $published ) = $xoopsDB -> fetchRow( $result ) ) {
384
        if ( true == wfl_checkgroups() ) {
385
            $count++;
386
            $published_date = ( $published > $published_date ) ? $published : $published_date;
387
        }
388
    }
389
390
    $child_count = 0;
391
    if ($get_child == 1) {
@@ 403-409 (lines=7) @@
400
             . " AND (b.cid=a.cid OR (a.cid=" . $arr[$i] . " OR b.cid=" . $arr[$i] . ")) ";
401
402
            $result2 = $xoopsDB -> query( $query2 );
403
            while ( list( $lid, $published ) = $xoopsDB -> fetchRow( $result2 ) ) {
404
                if ($published == 0) {
405
                    continue;
406
                }
407
                $published_date = ( $published > $published_date ) ? $published : $published_date;
408
                $child_count++;
409
            }
410
        }
411
    }
412
    $info['count'] = $count + $child_count;