Merge branch 'Qloapps:develop' into gli-2943

This commit is contained in:
Shazar Rahman
2026-08-24 14:05:48 +05:30
committed by GitHub
4 changed files with 39 additions and 17 deletions

View File

@@ -4059,10 +4059,11 @@ class AdminOrdersControllerCore extends AdminController
$this->errors[] = $this->l('Please select a file to upload.');
} elseif ($objHotelBookingDocument->fileInfo['size'] > Tools::getMaxUploadSize()) {
$this->errors[] = $this->l('Uploaded file size is too large.');
} elseif(!(ImageManager::isRealImage($objHotelBookingDocument->fileInfo['tmp_name'])
|| $objHotelBookingDocument->fileInfo['mime'] == 'application/pdf')
) {
$this->errors[] = $this->l('Please upload an image or a PDF file only. Allowed image formats: .gif, .jpg, .jpeg and .png');
} else {
$objHotelBookingDocument->setFileType();
if (!$objHotelBookingDocument->file_type) {
$this->errors[] = $this->l('Please upload an image or a PDF file only. Allowed image formats: .gif, .jpg, .jpeg and .png');
}
}
} else {
$this->errors[] = Tools::displayError('You do not have permission to edit this order.');