Discuz check_diy_perm函数 用途不祥
//我也不知道干啥的 , 貌似是检查DIV啥的function check_diy_perm($topic = array(), $flag = '') {
static $ret;
if(!isset($ret)) {
global $_G;
$common = !empty($_G['style']['tplfile']) || $_GET['inajax'];
$blockallow = getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 5) || getstatus($_G['member']['allowadmincp'], 6);
$ret['data'] = $common && $blockallow;
$ret['layout'] = $common && ($_G['group']['allowdiy'] || (
CURMODULE === 'topic' && ($_G['group']['allowmanagetopic'] || $_G['group']['allowaddtopic'] && $topic && $topic['uid'] == $_G['uid'])
));
}
return empty($flag) ? $ret['data'] || $ret['layout'] : $ret[$flag];
}
页:
[1]