$objects = $bloglib->list_blogs();
            foreach ($objects['data'] as $object) {
                $r = list_perms($object['blogId'], $type, $object['name'], $filterGroup);
                if (count($r['special']) > 0) {
                    $res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special'], 'objectName' => $object['name']);
                }
                if (count($r['category']) > 0) {
                    $res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category'], 'objectName' => $object['name']);
                }
            }
            break;
        case 'sheet':
            $sheetlib = TikiLib::lib('sheet');
            $objects = $sheetlib->list_sheets();
            foreach ($objects['data'] as $object) {
                $r = list_perms($object['sheetId'], $type, $object['name'], $filterGroup);
                if (count($r['special']) > 0) {
                    $res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special'], 'objectName' => $object['name']);
                }
                if (count($r['category']) > 0) {
                    $res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category'], 'objectName' => $object['name']);
                }
            }
            break;
        default:
            break;
    }
}
$smarty->assign_by_ref('res', $res);
$smarty->assign_by_ref('feedbacks', $feedbacks);
$smarty->assign_by_ref('filterGroup', $filterGroup);
			$objects = $commentslib->list_forums();
			foreach ($objects['data'] as $object) {
				$r = list_perms($object['forumId'], $type, $object['name'], $filterGroup);
				if (count($r['special']) > 0) { 
					$res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special'], 'objectName' => $object['name']);
				}
				if (count($r['category']) > 0) {
					$res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category'], 'objectName' => $object['name']);
				}
			}
    		break;

		case 'group':
		case 'groups':
			foreach ($all_groups as $object) {
				$r = list_perms($object, $type, '', $filterGroup);
				if (count($r['special']) > 0) { 
					$res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special']);
				}
				if (count($r['category']) > 0) {
					$res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category']);
				}
			}
    		break;

			default:
     		break;
	}
}
$smarty->assign_by_ref('res', $res);
$smarty->assign_by_ref('feedbacks', $feedbacks);
            $objects = $bloglib->list_blogs();
            foreach ($objects['data'] as $object) {
                $r = list_perms($object['blogId'], $type, isset($object['name']) ? $object['name'] : null, $filterGroup);
                if (count($r['special']) > 0) {
                    $res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special'], 'objectName' => $object['name']);
                }
                if (count($r['category']) > 0) {
                    $res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category'], 'objectName' => $object['name']);
                }
            }
            break;
        case 'sheet':
            $sheetlib = TikiLib::lib('sheet');
            $objects = $sheetlib->list_sheets();
            foreach ($objects['data'] as $object) {
                $r = list_perms($object['sheetId'], $type, isset($object['name']) ? $object['name'] : null, $filterGroup);
                if (count($r['special']) > 0) {
                    $res[$type]['objects'][] = array('objectId' => $r['objectId'], 'special' => $r['special'], 'objectName' => $object['name']);
                }
                if (count($r['category']) > 0) {
                    $res[$type]['category'][] = array('objectId' => $r['objectId'], 'category' => $r['category'], 'objectName' => $object['name']);
                }
            }
            break;
        default:
            break;
    }
}
$smarty->assign_by_ref('res', $res);
$smarty->assign_by_ref('feedbacks', $feedbacks);
$smarty->assign_by_ref('filterGroup', $filterGroup);