本文整理汇总了PHP中Network::item_exists_in_moderation方法的典型用法代码示例。如果您正苦于以下问题:PHP Network::item_exists_in_moderation方法的具体用法?PHP Network::item_exists_in_moderation怎么用?PHP Network::item_exists_in_moderation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Network
的用法示例。
在下文中一共展示了Network::item_exists_in_moderation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup_module
function setup_module($column, $moduleName, $obj)
{
global $content_type, $show_media, $uid, $group_ids, $paging, $error_msg, $login_uid;
$extra = unserialize(PA::$network_info->extra);
$authorized_users = array();
if (!empty($show_media)) {
$authorized_users = array($show_media->author_id, PA::$network_info->owner_id);
if ($extra['network_content_moderation'] == NET_YES && Network::item_exists_in_moderation($show_media->content_id, $show_media->parent_collection_id, 'content') && !in_array($login_uid, $authorized_users)) {
$error_msg = 1001;
return 'skip';
}
}
switch ($column) {
case 'middle':
$obj->mode = PUB;
$obj->content_id = $_REQUEST['cid'];
$obj->uid = $uid;
$obj->media_data = $show_media;
$obj->Paging["page"] = $paging["page"];
$obj->Paging["show"] = $paging["show"];
break;
default:
return 'skip';
break;
}
}
示例2: _out
$setting_data = ModuleSetting::load_setting(PAGE_PERMALINK, $uid);
$content = Content::load_content((int) $_REQUEST['cid'], (int) PA::$login_uid);
// apply output filtering
$content->title = _out($content->title);
$author = new User();
$author->load((int) $content->author_id);
$is_group_content = FALSE;
/**
If Collection Type is a Group than left and right module will be the same as Group page
*/
$gid = @$_REQUEST['ccid'];
$content_id = @$_REQUEST['cid'];
$error_message = '';
$authorized_users = array($content->author_id, PA::$network_info->owner_id);
$extra = unserialize(PA::$network_info->extra);
if (@$extra['network_content_moderation'] == NET_YES && Network::item_exists_in_moderation($content_id, $content->parent_collection_id, 'content') && !in_array(PA::$login_uid, $authorized_users)) {
$error_message = 1001;
}
if ($content->parent_collection_id != -1) {
//load here content collection
$cid = $content->parent_collection_id;
$collection = ContentCollection::load_collection((int) $cid, PA::$login_uid);
if ($collection->type == GROUP_COLLECTION_TYPE) {
$is_member = Group::member_exists((int) $cid, PA::$login_uid);
$is_admin = Group::is_admin((int) $cid, PA::$login_uid);
$is_group_content = TRUE;
$header = 'header_group.tpl';
// group header will be user in this case.
//its group so lets load group details and group modules
$media_gallery = 'grouppage';
$group_details = pageLoadGroup($collection);