本文整理汇总了PHP中SearchHelper::getUserGroupPermissions方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchHelper::getUserGroupPermissions方法的具体用法?PHP SearchHelper::getUserGroupPermissions怎么用?PHP SearchHelper::getUserGroupPermissions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchHelper
的用法示例。
在下文中一共展示了SearchHelper::getUserGroupPermissions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onSearchGetUserGroupPermissions
function onSearchGetUserGroupPermissions($userGroupIds)
{
if (!$userGroupIds) {
return array();
}
$result = SearchHelper::getUserGroupPermissions($userGroupIds);
return $result;
}
示例2: foreach
foreach ($_extgroupids as $v) {
if ($v) {
$my_extgroupids[] = $v;
}
}
$my_extgroupids_str = implode(',', $my_extgroupids);
$params = array('sId' => $_G['setting']['my_siteid'], 'ts' => time(), 'cuId' => $_G['uid'], 'cuName' => $_G['username'], 'gId' => $_G['groupid'], 'agId' => $_G['adminid'], 'egIds' => $my_extgroupids_str, 'fmSign' => substr($my_forums['sign'], -4));
$groupIds = explode(',', $_G['groupid']);
if ($_G['adminid']) {
$groupIds[] = $_G['adminid'];
}
if ($my_extgroupids) {
$groupIds = array_merge($groupIds, $my_extgroupids);
}
$groupIds = array_unique($groupIds);
$userGroups = SearchHelper::getUserGroupPermissions($groupIds);
foreach ($groupIds as $k => $v) {
$value = substr($userGroups[$v]['sign'], -4);
if ($value) {
$params['ugSign' . $v] = $value;
}
}
$params['sign'] = md5(implode('|', $params) . '|' . $_G['setting']['my_sitekey']);
$extra = array('q', 'fId', 'author', 'scope', 'source', 'module', 'isAdv');
foreach ($extra as $v) {
if ($_GET[$v]) {
$params[$v] = $_GET[$v];
}
}
$params['charset'] = $_G['charset'];
if ($_G['setting']['my_search_domain']) {
示例3: getGuestPerm
function getGuestPerm($gfIds = array())
{
$perm = SearchHelper::getUserGroupPermissions(array(7));
$guestPerm = $perm[7];
if ($gfIds) {
$sql = 'SELECT fid, gviewperm FROM ' . DB::table('forum_forumfield') . ' WHERE fid IN (' . implode(',', $gfIds) . ')';
$query = DB::query($sql);
while ($row = DB::fetch($query)) {
if ($row['gviewperm'] == 1) {
$guestPerm['allowForumIds'][] = $row['fid'];
} else {
$guestPerm['forbidForumIds'][] = $row['fid'];
}
}
}
return $guestPerm;
}
示例4: search_get_usergroups
function search_get_usergroups($groupIds)
{
global $_G;
require_once DISCUZ_ROOT . './api/manyou/Manyou.php';
$missGroupIds = array();
$res = array();
foreach ($groupIds as $groupId) {
$kname = 'search_group_hash_' . $groupId;
loadcache($kname);
if (TIMESTAMP - $_G['cache'][$kname]['ts'] > 21600) {
$missGroupIds[] = $groupId;
} else {
$res[$groupId]['sign'] = $_G['cache'][$kname]['sign'];
}
}
if ($missGroupIds) {
$userGroups = SearchHelper::getUserGroupPermissions($missGroupIds);
foreach ($userGroups as $groupId => $userGroup) {
$kname = $kname = 'search_group_hash_' . $groupId;
$data = array('ts' => TIMESTAMP, 'sign' => $userGroup['sign']);
save_syscache($kname, $data);
$res[$groupId]['sign'] = $userGroup['sign'];
}
}
return $res;
}