private function handleGET_deleteContent($request_data) { $location = $request_data['back_page']; if (!empty($request_data['cid']) && !empty(PA::$login_uid)) { $params = array('permissions' => 'delete_content', 'uid' => PA::$login_uid, 'cid' => $request_data['cid']); if (PermissionsHandler::can_user(PA::$login_uid, $params)) { Content::delete_by_id($request_data['cid']); Activities::update(array('type' => 'user_post_a_blog', 'subject' => PA::$login_uid, 'object' => $request_data['cid']), 'deleted'); } else { $location .= '&msg_id=7033'; $this->controller->redirect($location); exit; } if (PA::$network_info) { $nid = '_network_' . PA::$network_info->network_id; } else { $nid = ''; } //unique name $cache_id = 'content_' . $request_data['cid'] . $nid; CachedTemplate::invalidate_cache($cache_id); $location .= '&msg_id=7024'; $this->controller->redirect($location); exit; } else { $this->controller->redirect($location); exit; } }