Code Duplication    Length = 5-5 lines in 3 locations

blocks/newbb_block.php 2 locations

@@ 161-165 (lines=5) @@
158
    include_once __DIR__ . '/../include/functions.user.php';
159
    $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true);
160
161
    if (count($types) > 0) {
162
        /** @var \NewbbTypeHandler $typeHandler */
163
        $typeHandler = xoops_getModuleHandler('type', 'newbb');
164
        $type_list   = $typeHandler->getList(new Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN'));
165
    }
166
167
    foreach ($rows as $arr) {
168
        // irmtfan add lastposticon - load main lang
@@ 344-348 (lines=5) @@
341
    }
342
    include_once __DIR__ . '/../include/functions.user.php';
343
    $author_name = newbbGetUnameFromIds(array_keys($author), $newbbConfig['show_realname'], true);
344
    if (count($types) > 0) {
345
        /** @var \NewbbTypeHandler $typeHandler */
346
        $typeHandler = xoops_getModuleHandler('type', 'newbb');
347
        $type_list   = $typeHandler->getList(new Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN'));
348
    }
349
350
    foreach ($rows as $arr) {
351
        // irmtfan remove $topic_page_jump because there is no last post

rss.php 1 location

@@ 169-173 (lines=5) @@
166
        //return $xmlrssHandler->get($rss);
167
    }
168
    $users = newbbGetUnameFromIds(array_keys($users), $GLOBALS['xoopsModuleConfig']['show_realname']);
169
    if (count($types) > 0) {
170
        /** @var \NewbbTypeHandler $typeHandler */
171
        $typeHandler = xoops_getModuleHandler('type', 'newbb');
172
        $type_list   = $typeHandler->getList(new Criteria('type_id', '(' . implode(', ', array_keys($types)) . ')', 'IN'));
173
    }
174
175
    foreach ($rows as $topic) {
176
        if ($topic['post_karma'] > 0 && $GLOBALS['xoopsModuleConfig']['enable_karma']) {