Code Duplication    Length = 7-7 lines in 3 locations

blocks/newbb_block.php 2 locations

@@ 146-152 (lines=7) @@
143
    $author             = [];
144
    $types              = [];
145
146
    while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
147
        $rows[]              = $row;
148
        $author[$row['uid']] = 1;
149
        if ($row['type_id'] > 0) {
150
            $types[$row['type_id']] = 1;
151
        }
152
    }
153
154
    if (count($rows) < 1) {
155
        return $block;
@@ 332-338 (lines=7) @@
329
    $rows               = [];
330
    $author             = [];
331
    $types              = [];
332
    while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
333
        $rows[]                       = $row;
334
        $author[$row['topic_poster']] = 1;
335
        if ($row['type_id'] > 0) {
336
            $types[$row['type_id']] = 1;
337
        }
338
    }
339
    if (count($rows) < 1) {
340
        return $block;
341
    }

rss.php 1 location

@@ 156-162 (lines=7) @@
153
    }
154
    $rows  = [];
155
    $types = [];
156
    while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
157
        $users[$row['uid']] = 1;
158
        if ($row['type_id'] > 0) {
159
            $types[$row['type_id']] = 1;
160
        }
161
        $rows[] = $row;
162
    }
163
164
    if (count($rows) < 1) {
165
        newbbTrackbackResponse(1, _MD_NEWBB_NORSS_DATA);