|
@@ 582-590 (lines=9) @@
|
| 579 |
|
return $this->getCount(); |
| 580 |
|
} |
| 581 |
|
$criteria = new CriteriaCompo(); |
| 582 |
|
if (isset($parentid) && ($parentid != -1)) { |
| 583 |
|
$criteria->add(new criteria('parentid', $parentid)); |
| 584 |
|
if (!sf_userIsAdmin()) { |
| 585 |
|
$smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
| 586 |
|
|
| 587 |
|
$categoriesGranted = $smartPermHandler->getPermissions('category'); |
| 588 |
|
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
| 589 |
|
} |
| 590 |
|
} |
| 591 |
|
|
| 592 |
|
return $this->getCount($criteria); |
| 593 |
|
} |
|
@@ 605-613 (lines=9) @@
|
| 602 |
|
return $this->getCount(); |
| 603 |
|
} |
| 604 |
|
$criteria = new CriteriaCompo(); |
| 605 |
|
if (isset($parentid) && ($parentid != -1)) { |
| 606 |
|
$criteria->add(new criteria('parentid', $parentid)); |
| 607 |
|
if (!sf_userIsAdmin()) { |
| 608 |
|
$smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
| 609 |
|
|
| 610 |
|
$categoriesGranted = $smartPermHandler->getPermissions('category'); |
| 611 |
|
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
| 612 |
|
} |
| 613 |
|
} |
| 614 |
|
|
| 615 |
|
$criteria->add(new Criteria('f.status', _SF_STATUS_OPENED)); |
| 616 |
|
|