Remove system file

This commit is contained in:
Romain Neutron
2012-05-21 17:00:11 +02:00
parent 7c9bc6f358
commit 1e161a7ec9
3 changed files with 11 additions and 9 deletions

View File

@@ -8,6 +8,8 @@
* file that was distributed with this source code.
*/
use Symfony\Component\HttpFoundation\File\File as SymfoFile;
/**
*
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
@@ -42,9 +44,7 @@ if ($user->ACL()->has_right_on_sbas($sbas_id, 'bas_manage')) {
case "SENDLOGOPDF":
if (isset($_FILES['newLogoPdf']) && $_FILES['newLogoPdf']['error'] == UPLOAD_ERR_OK) {
if ($_FILES['newLogoPdf']['size'] < 65536) {
$filenameTemp = $_FILES['newLogoPdf']["tmp_name"];
$system_file = new system_file($_FILES['newLogoPdf']["tmp_name"]);
$appbox->write_databox_pic($databox, $system_file, databox::PIC_PDF);
$appbox->write_databox_pic($databox, new SymfoFile($_FILES['newLogoPdf']["tmp_name"]), databox::PIC_PDF);
unlink($_FILES['newLogoPdf']["tmp_name"]);
} else {
$printLogoUploadMsg = _('forms::erreur lors de l\'envoi du fichier');