diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 3b2a7fcb872..0352700d91a 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1099,7 +1099,7 @@ class FormFile
if ($disablecrop == -1)
{
$disablecrop = 1;
- if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
+ if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'propal', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
}
// Define relative path used to store the file
diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php
index eeff5007c55..cb57c81833d 100644
--- a/htdocs/core/photos_resize.php
+++ b/htdocs/core/photos_resize.php
@@ -119,9 +119,20 @@ elseif ($modulepart == 'project')
{
$result = $object->fetch($id);
if ($result <= 0) dol_print_error($db, 'Failed to load object');
- $dir = $conf->projet->dir_output; // By default
+ $dir = $conf->project->multidir_output[$object->entity]; // By default
}
}
+elseif ($modulepart == 'propal')
+{
+ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
+ $object = new Propal($db);
+ if ($id > 0)
+ {
+ $result = $object->fetch($id);
+ if ($result <= 0) dol_print_error($db, 'Failed to load object');
+ $dir = $conf->propal->multidir_output[$object->entity]; // By default
+ }
+}
elseif ($modulepart == 'holiday')
{
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
@@ -243,6 +254,7 @@ if (empty($backtourl))
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
+ elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);