Fixed problems with uploaded files

This commit is contained in:
Marcin Kurczewski 2013-10-13 13:33:34 +02:00
parent ff2bfd0b3d
commit 36a82c2863

View file

@ -296,7 +296,7 @@ class PostController
$this->context->subTitle = 'upload';
PrivilegesHelper::confirmWithException($this->context->user, Privilege::UploadPost);
if (isset($_FILES['file']))
if (!empty($_FILES['file']['name']))
{
/* safety */
$suppliedSafety = intval(InputHelper::get('safety'));
@ -454,7 +454,7 @@ class PostController
/* thumbnail */
if (isset($_FILES['thumb']))
if (!empty($_FILES['thumb']['name']))
{
PrivilegesHelper::confirmWithException($this->context->user, Privilege::EditPostThumb, $secondary);
$suppliedFile = $_FILES['thumb'];