本文整理汇总了PHP中Content::update_content_status方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::update_content_status方法的具体用法?PHP Content::update_content_status怎么用?PHP Content::update_content_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Content
的用法示例。
在下文中一共展示了Content::update_content_status方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Group
}
// Code for Approving and Denying the Pending Content Moderations: Starts
if (!empty($_GET["cid"]) && !empty($_GET["ccid"])) {
$type = 'content';
if (Group::is_admin((int) $_GET["ccid"], (int) PA::$login_uid)) {
$Group = new Group();
$Group->collection_id = $_GET["ccid"];
$contentIdArray = $_GET["cid"];
if ($_GET["apv"] == 1) {
$Group->approve($contentIdArray, $type);
Content::update_content_status($contentIdArray, 1);
header("location: " . PA_ROUTE_GROUP_MODERATION . "/gid=" . $_GET['ccid'] . "&view=content&msg=succ");
}
if ($_GET['dny'] == 1) {
$Group->disapprove($contentIdArray, $type);
Content::update_content_status($contentIdArray);
header("location: " . PA_ROUTE_GROUP_MODERATION . "/gid=" . $_GET['ccid'] . "&view=content&msg=dny");
}
}
}
// code for adding a comment:
require_once "web/submit_comment.php";
if (isset($_GET['err'])) {
$error_message = strip_tags(urldecode($_GET['err']));
}
// code for reporting abuse
require_once "web/includes/blocks/submit_abuse.php";
if (isset($_GET['err'])) {
$error_message = strip_tags(urldecode($_GET['err']));
}
if (!empty($group_details['skip_group_modules'])) {
示例2: moderate_content
/**
* flag a content to be moderated
* @access public
* @param int content_id ID of content to be moderated
*/
public function moderate_content($content_id)
{
Logger::log("Enter: Group::moderate_content() | Args: \$content_id = {$content_id}");
$c = Content::load_content($content_id, $_SESSION['user']['id']);
if (!Group::is_admin($this->collection_id, $c->author_id)) {
$res = Dal::query("INSERT INTO {moderation_queue} (collection_id, item_id, type) VALUES (?, ?, ?)", array($this->collection_id, $content_id, "content"));
Content::update_content_status($content_id, 2);
} else {
$this->approve($content_id, 'content');
}
Logger::log("Exit: Group::moderate_content()");
return;
}
示例3: approve_content
/**
* approve contents if network content moderation is set
* @access public
* @param int id of content
* @param string type ie user/content
*/
public static function approve_content($content_id, $type = 'content')
{
Logger::log("Enter : Network::approve_content() | Args: \$item_id = {$content_id}, \$type = {$type}");
Content::update_content_status($content_id, ACTIVE);
$res = Dal::query("DELETE FROM {moderation_queue} WHERE item_id = ? and type= ?", array($content_id, $type));
Logger::log("Exit : Network::approve_content()");
return;
}
示例4: delete_by_id
/**
* deletes an object from database
* @param int contentid
*/
public static function delete_by_id($content_id)
{
Logger::log("Enter: Content::delete_by_id()");
// soft deleting
ModerationQueue::remove_content($content_id);
Content::update_content_status($content_id, DELETED);
Tag::delete_tags_for_content($content_id);
Logger::log("Deleting the all comments related to this object");
Comment::delete_all_comment_of_content($content_id);
Logger::log("Exit: Content::delete_by_id()");
return;
}
示例5: array
$contentIdArray = array();
$type = 'content';
$Group = new Group();
$Group->collection_id = $_POST["group_id"];
$contentIdArray = $_POST["contentIdArray"];
if (!empty($_POST["btn_approve_content"])) {
for ($counter = 0; $counter < count($contentIdArray); $counter++) {
$Group->approve($contentIdArray[$counter], $type);
Content::update_content_status($contentIdArray[$counter], 1);
}
$msg1 = "Content Approved ";
}
if (!empty($_POST["btn_deny_content"])) {
for ($counter = 0; $counter < count($contentIdArray); $counter++) {
$Group->disapprove($contentIdArray[$counter], $type);
Content::update_content_status($contentIdArray[$counter], 0);
}
$msg1 = "Content Denied";
}
} else {
if (isset($_POST['btn_approve_content'])) {
$msg1 = 'Please select a content for approval';
} else {
if (isset($_POST['btn_deny_content'])) {
$msg1 = 'Please select a content for denial';
}
}
}
// Code for Approving and Denying the Pending Content Moderations: Ends
// Code for Inviting somebody to join the group : Starts
if (isset($_POST['submit'])) {
示例6: moderate_suggestion
/**
* Add Suggestion to ModerationQueue
*
* @access public
* @param int id of user
* @param int collection identifier
*/
public static function moderate_suggestion($suggestion_id, $collection_id = -1)
{
Logger::log("Enter: ModerationQueue::moderate_user() | Args: \$suggestion_id = {$suggestion_id}, \$collection_id = {$collection_id}");
if (!self::suggestion_exists($suggestion_id, $collection_id)) {
$sql = 'INSERT INTO {moderation_queue} (collection_id, item_id, type) VALUES (?, ?, ?)';
Dal::query($sql, array($collection_id, $suggestion_id, self::TYPE_SUGGESTION));
Content::update_content_status($suggestion_id, MODERATION_WAITING);
}
Logger::log("Exit: ModerationQueue::moderate_user()");
}
示例7: handlePOST_approveContent
private function handlePOST_approveContent($request_data)
{
global $error_msg;
// Code for Approving and Denying the Pending Content Moderations: Starts
if (!empty($request_data["contentIdArray"]) && !empty($request_data["group_id"])) {
$contentIdArray = array();
$type = 'content';
$Group = new Group();
$Group->collection_id = $request_data["group_id"];
$contentIdArray = $request_data["contentIdArray"];
if (!empty($request_data["btn_approve_content"])) {
for ($counter = 0; $counter < count($contentIdArray); $counter++) {
$Group->approve($contentIdArray[$counter], $type);
Content::update_content_status($contentIdArray[$counter], 1);
}
$error_msg = __("Content Approved");
}
if (!empty($request_data["btn_deny_content"])) {
for ($counter = 0; $counter < count($contentIdArray); $counter++) {
$Group->disapprove($contentIdArray[$counter], $type);
Content::update_content_status($contentIdArray[$counter], 0);
}
$error_msg = __("Content Denied");
}
} else {
if (isset($request_data['btn_approve_content'])) {
$error_msg = __('Please select a content for approval');
} else {
if (isset($request_data['btn_deny_content'])) {
$error_msg = __('Please select a content for denial');
}
}
}
}