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

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