Fix cropping of image files for BOM module was ko

This commit is contained in:
Laurent Destailleur
2019-06-12 19:00:34 +02:00
parent d4aa0bfa94
commit e81663ec34
4 changed files with 31 additions and 10 deletions

View File

@@ -1040,7 +1040,7 @@ class FormFile
* @param string $relativepath Relative path of docs (autodefined if not provided), relative to module dir, not to MAIN_DATA_ROOT.
* @param int $permonobject Permission on object (so permission to delete or crop document)
* @param int $useinecm Change output for use in ecm module:
* 0 or 6: Add a preview column. Show also a rename and crop button.
* 0 or 6: Add a preview column. Show also a rename button. Show also a crop button for some values of $modulepart (must be supported into hard coded list in this function + photos_resize.php + restrictedArea + checkUserAccessToObject)
* 1: Add link to edit ECM entry
* 2: Add rename and crop file
* 4: Add a preview column
@@ -1068,7 +1068,7 @@ class FormFile
global $form;
$disablecrop=1;
if (in_array($modulepart, array('expensereport','holiday','member','project','product','produit','service','societe','tax','ticket','user'))) $disablecrop=0;
if (in_array($modulepart, array('bom','expensereport','holiday','member','project','product','produit','service','societe','tax','ticket','user'))) $disablecrop=0;
// Define relative path used to store the file
if (empty($relativepath))