mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
Forums: improved error handling when uploading attachments failed
This commit is contained in:
@@ -362,7 +362,8 @@ if (isset($_POST['newthread']) || isset($_POST['reply']))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo (isset($_POST['newthread']) ? $FORUMTHREADPOSTED : $FORUMREPLYPOSTED);
|
$txt = (isset($_POST['newthread']) ? $FORUMTHREADPOSTED : $FORUMREPLYPOSTED);
|
||||||
|
e107::getRender()->tablerender('Forums', e107::getMessage()->render().$txt);
|
||||||
require_once(FOOTERF);
|
require_once(FOOTERF);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -650,7 +651,8 @@ function process_upload()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Error in uploaded file
|
{
|
||||||
|
// Error in uploaded file, proceed but add error message.
|
||||||
//echo 'Error in uploaded file: '.(isset($upload['rawname']) ? $upload['rawname'] : $upload['name']).'<br />';
|
//echo 'Error in uploaded file: '.(isset($upload['rawname']) ? $upload['rawname'] : $upload['name']).'<br />';
|
||||||
e107::getMessage()->addError('Error in uploading attachment: '.vartrue($upload['message']));
|
e107::getMessage()->addError('Error in uploading attachment: '.vartrue($upload['message']));
|
||||||
}
|
}
|
||||||
@@ -662,7 +664,7 @@ function process_upload()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// error message?
|
e107::getMessage()->addError('Something went wrong during the attachment uploading process.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user