load($_SESSION['user']['id']); $content = Content::load_content((int)$_GET['cid'], $_SESSION['user']['id']); if($content->author_id == $_SESSION['user']['id'] || $_GET['mod']) { Content::delete_by_id($_GET['cid']); } } if($network_info) { $nid = '_network_'.$network_info->network_id; } else { $nid=''; } //unique name $cache_id = 'content_'.$_GET['cid'].$nid; CachedTemplate::invalidate_cache($cache_id); header("Location: $location"); exit; /* if ($_GET['comment_id']) { require_once "$path_prefix/api/Comment/Comment.php"; $comment = new Comment(); $comment->comment_id = $_GET['comment_id']; $comment->delete(); header("Location: ".$_SERVER['HTTP_REFERER']); } if ($_GET['comment_id_string']) { require_once "$path_prefix/api/Comment/Comment.php"; $cid = explode(",", $_GET['comment_id_string']); foreach ($cid as $id) { $comment = new Comment(); $comment->comment_id = (int)$id; $comment->delete(); } header("Location: ".$_SERVER['HTTP_REFERER']); } */ ?>