| @@ 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; |
|
| @@ 269-277 (lines=9) @@ | ||
| 266 | /** |
|
| 267 | * @return int |
|
| 268 | */ |
|
| 269 | public static function countCats() |
|
| 270 | { |
|
| 271 | global $xoopsUser, $xoopsModule; |
|
| 272 | $gpermHandler = xoops_getHandler('groupperm'); |
|
| 273 | $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; |
|
| 274 | $totalcats = $gpermHandler->getItemIds('lexikon_view', $groups, $xoopsModule->getVar('mid')); |
|
| 275 | ||
| 276 | return count($totalcats); |
|
| 277 | } |
|
| 278 | ||
| 279 | /** |
|
| 280 | * @return mixed |
|