Code Duplication    Length = 8-9 lines in 2 locations

class/Utility.php 1 location

@@ 259-267 (lines=9) @@
256
    /**
257
     * @return int
258
     */
259
public static function countCats()
260
{
261
    global $xoopsUser, $xoopsModule;
262
    $gpermHandler = xoops_getHandler('groupperm');
263
    $groups       = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
264
    $totalcats    = $gpermHandler->getItemIds('lexikon_view', $groups, $xoopsModule->getVar('mid'));
265
266
    return count($totalcats);
267
}
268
269
    /**
270
     * @return mixed

include/functions.php 1 location

@@ 100-107 (lines=8) @@
97
    return $count;
98
}
99
100
function lx_countCats () {
101
    global $xoopsUser, $xoopsModule;
102
    $gperm_handler = xoops_gethandler('groupperm');
103
    $groups = (is_object($xoopsUser)) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
104
    $totalcats = $gperm_handler->getItemIds("lexikon_view", $groups, $xoopsModule->getVar('mid'));
105
106
    return count($totalcats);
107
}
108
109
function lx_countWords () {
110
    global $xoopsUser, $xoopsDB;