The recent comments block shows the comments of all the modules, even those
where you don't have access.
Modify the file /xoops/modules/system/blocks/system_blocks.php
In the function b_system_comments_show() just after this line :
$criteria->setOrder('DESC');
insert :
global $xoopsUser;
$moduleperm_handler =& xoops_gethandler('groupperm');
$gperm_groupid = is_object($xoopsUser) ? $xoopsUser->getGroups() :
XOOPS_GROUP_ANONYMOUS;
$criteria1 = new CriteriaCompo(new Criteria('gperm_name',
'module_read','='));
if (is_array($gperm_groupid)) {
$criteria2 = new CriteriaCompo();
foreach ($gperm_groupid as $gid) {
$criteria2->add(new Criteria('gperm_groupid', $gid), 'OR');
}
$criteria1->add($criteria2);
} else {
$criteria1->add(new Criteria('gperm_groupid', intval($gperm_groupid)));
}
$perms = $moduleperm_handler->getObjects($criteria1, true);
$modIds = array();
foreach($perms as $item) {
$modIds[] = $item->getVar('gperm_itemid');
}
if(count($modIds) > 0 ) {
$modIds = array_unique($modIds);
$criteria->add(new Criteria('com_modid', '('.implode(',', $modIds).')',
'IN'));
}
See this :
http://www.frxoops.org/modules/newbb/viewtopic.php?topic_id=21864&viewmode=
flat&order=ASC&start=0
DuGris
Core - Core
XOOPS 2.0.x
Public
|
Date: 2007-10-24 00:13
|
|
Date: 2007-10-06 08:56
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2007-11-02 10:07 | dugris |
| close_date | - | 2007-11-02 10:07 | dugris |
| resolution_id | None | 2007-10-24 00:13 | dugris |
| assigned_to | nobody | 2007-10-24 00:13 | dugris |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use