diff --git a/htdocs/fourn/product/photos.php b/htdocs/fourn/product/photos.php
index 0190c7d4f3c..e89993538fa 100644
--- a/htdocs/fourn/product/photos.php
+++ b/htdocs/fourn/product/photos.php
@@ -43,7 +43,7 @@ $types[1] = $langs->trans("Service");
*
*/
-if ( $_POST["sendit"] && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1)
+if ( $_POST["sendit"] && $conf->upload)
{
if ($_GET["id"])
{
@@ -126,7 +126,7 @@ if ($_GET["id"])
* Ajouter une photo
*
*/
- if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && $product->isproduct)
+ if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && $product->isproduct && $conf->upload)
{
print_titre($langs->trans("AddPhoto"));
@@ -158,7 +158,7 @@ if ($_GET["id"])
if ($_GET["action"] == '')
{
- if ( $user->rights->produit->creer && $product->isproduct)
+ if ( $user->rights->produit->creer && $product->isproduct && $conf->upload)
{
print '';
print $langs->trans("AddPhoto").'';
diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 823da67fd81..d47d0125020 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -43,7 +43,7 @@ $types[1] = $langs->trans("Service");
/*
* Upload photo
*/
-if ( $_POST["sendit"] && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1)
+if ( $_POST["sendit"] && $conf->upload)
{
if ($_POST["id"])
{
@@ -550,7 +550,7 @@ else
* Ajouter une photo
*
*/
- if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && $product->isproduct)
+ if ($_GET["action"] == 'ajout_photo' && $conf->upload && $user->rights->produit->creer && $product->isproduct)
{
print_titre($langs->trans("AddPhoto"));
@@ -670,7 +670,7 @@ if ($_GET["action"] == '')
print $langs->trans("Order").'';
}
- if ( $user->rights->produit->creer && $product->isproduct)
+ if ( $user->rights->produit->creer && $product->isproduct && $conf->upload)
{
print '';
print $langs->trans("AddPhoto").'';