예제 #1
0
 public function delete()
 {
     $iId = $this->httpRequest->post('id');
     CommentCoreModel::deleteRecipient($iId, 'Blog');
     $this->oBlogModel->deleteCategory($iId);
     $this->oBlogModel->deletePost($iId);
     (new Blog())->deleteThumb($iId, 'blog', $this->file);
     /* Clean BlogModel Cache  */
     (new Framework\Cache\Cache())->start(BlogModel::CACHE_GROUP, null, null)->clear();
     HeaderUrl::redirect(Uri::get('blog', 'main', 'index'), t('Your post was deleted!'));
 }
 public function delete()
 {
     $iId = $this->httpRequest->post('id');
     $iProfileId = $this->session->get('member_id');
     CommentCoreModel::deleteRecipient($iId, 'Note');
     $this->oNoteModel->deleteCategory($iId);
     $this->_deleteThumbFile($iId, $iProfileId);
     $this->oNoteModel->deletePost($iId, $iProfileId);
     /* Clean NoteModel Cache */
     (new Framework\Cache\Cache())->start(NoteModel::CACHE_GROUP, null, null)->clear();
     Header::redirect(Uri::get('note', 'main', 'index'), t('Your post was deleted!'));
 }
 public function deleteVideo()
 {
     $iVideoId = $this->httpRequest->post('video_id', 'int');
     CommentCoreModel::deleteRecipient($iVideoId, 'Video');
     $bVideo = $this->oVideoModel->deleteVideo($this->session->get('member_id'), $this->httpRequest->post('album_id', 'int'), $iVideoId);
     (new Video())->deleteVideo($this->httpRequest->post('album_id'), $this->session->get('member_username'), $this->httpRequest->post('video_link'));
     /* Clean VideoModel Cache */
     (new Framework\Cache\Cache())->start(VideoModel::CACHE_GROUP, null, null)->clear();
     Header::redirect(Uri::get('video', 'main', 'album', $this->session->get('member_username') . ',' . $this->httpRequest->post('album_title') . ',' . $this->httpRequest->post('album_id')), t('Your video has been deleted!'));
 }
 public function deletePhoto()
 {
     $iPictureId = $this->httpRequest->post('picture_id', 'int');
     CommentCoreModel::deleteRecipient($iPictureId, 'Picture');
     $this->oPictureModel->deletePhoto($this->session->get('member_id'), $this->httpRequest->post('album_id', 'int'), $iPictureId);
     (new Picture())->deletePhoto($this->httpRequest->post('album_id'), $this->session->get('member_username'), $this->httpRequest->post('picture_link'));
     /* Clean PictureModel Cache */
     (new Framework\Cache\Cache())->start(PictureModel::CACHE_GROUP, null, null)->clear();
     Framework\Url\Header::redirect(Framework\Mvc\Router\Uri::get('picture', 'main', 'album', $this->session->get('member_username') . ',' . $this->httpRequest->post('album_title') . ',' . $this->httpRequest->post('album_id')), t('Your picture has been deleted!'));
 }