Fixed deleting and (un)hiding

This commit is contained in:
Marcin Kurczewski 2013-10-22 00:20:58 +02:00
parent d45ab47d3b
commit 319a9852fc

View file

@ -365,6 +365,7 @@ class PostController
public function hideAction($id)
{
$post = Model_Post::locate($id);
R::preload($post, ['uploader' => 'user']);
PrivilegesHelper::confirmWithException(Privilege::HidePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader));
if (InputHelper::get('submit'))
{
@ -380,6 +381,7 @@ class PostController
public function unhideAction($id)
{
$post = Model_Post::locate($id);
R::preload($post, ['uploader' => 'user']);
PrivilegesHelper::confirmWithException(Privilege::HidePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader));
if (InputHelper::get('submit'))
{
@ -395,6 +397,7 @@ class PostController
public function deleteAction($id)
{
$post = Model_Post::locate($id);
R::preload($post, ['uploader' => 'user']);
PrivilegesHelper::confirmWithException(Privilege::DeletePost, PrivilegesHelper::getIdentitySubPrivilege($post->uploader));
if (InputHelper::get('submit'))
{