Code Duplication    Length = 5-5 lines in 2 locations

include/waiting.plugin.php 2 locations

@@ 28-32 (lines=5) @@
25
    // waiting categories
26
    $block  = [];
27
    $result = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('presenter_categories') . ' WHERE cat_waiting = 1');
28
    if ($result) {
29
        $block['adminlink'] = XOOPS_URL . '/modules/presenter/admin/categories.php?op=list_waiting';
30
        list($block['pendingnum']) = $db->fetchRow($result);
31
        $block['lang_linkname'] = _MB_PRESENTER_CATEGORIES_WAITING;
32
    }
33
    $ret[] = $block;
34
35
    // waiting slides
@@ 38-42 (lines=5) @@
35
    // waiting slides
36
    $block  = [];
37
    $result = $db->query('SELECT COUNT(*) FROM ' . $db->prefix('presenter_slides') . ' WHERE slides_waiting = 1');
38
    if ($result) {
39
        $block['adminlink'] = XOOPS_URL . '/modules/presenter/admin/slides.php?op=list_waiting';
40
        list($block['pendingnum']) = $db->fetchRow($result);
41
        $block['lang_linkname'] = _MB_PRESENTER_SLIDES_WAITING;
42
    }
43
    $ret[] = $block;
44
45
    return $ret;