public function SocialDeleteAction() { $v_request = Project::getRequest(); $v_current_userID = (int) Project::getUser()->getDbUser()->id; $v_spID = $v_request->getKeyByNumber(0); $v_categoryID = $this->_GetIDCategoryByIDPos($v_spID); $v_model = new SocialModel(); $v_model->load($v_spID); if ($v_model->user_id == $v_current_userID and $v_spID > 0) { $v_model->delete($v_spID); } Project::getResponse()->redirect($v_request->createUrl('Social', 'SocialUserList', array($v_categoryID))); }