|
@@ 565-573 (lines=9) @@
|
| 562 |
|
return $this->getCount(); |
| 563 |
|
} |
| 564 |
|
$criteria = new CriteriaCompo(); |
| 565 |
|
if (isset($parentid) && ($parentid != -1)) { |
| 566 |
|
$criteria->add(new criteria('parentid', $parentid)); |
| 567 |
|
if (!sf_userIsAdmin()) { |
| 568 |
|
$smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
| 569 |
|
|
| 570 |
|
$categoriesGranted = $smartPermHandler->getPermissions('category'); |
| 571 |
|
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
| 572 |
|
} |
| 573 |
|
} |
| 574 |
|
|
| 575 |
|
return $this->getCount($criteria); |
| 576 |
|
} |
|
@@ 588-596 (lines=9) @@
|
| 585 |
|
return $this->getCount(); |
| 586 |
|
} |
| 587 |
|
$criteria = new CriteriaCompo(); |
| 588 |
|
if (isset($parentid) && ($parentid != -1)) { |
| 589 |
|
$criteria->add(new criteria('parentid', $parentid)); |
| 590 |
|
if (!sf_userIsAdmin()) { |
| 591 |
|
$smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq'); |
| 592 |
|
|
| 593 |
|
$categoriesGranted = $smartPermHandler->getPermissions('category'); |
| 594 |
|
$criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
| 595 |
|
} |
| 596 |
|
} |
| 597 |
|
|
| 598 |
|
$criteria->add(new Criteria('f.status', _SF_STATUS_OPENED)); |
| 599 |
|
|