Utilisation de conf->upload

This commit is contained in:
Rodolphe Quiedeville 2005-04-15 12:15:41 +00:00
parent e12244e270
commit d797d59fc6
2 changed files with 6 additions and 6 deletions

View File

@ -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 '<a class="tabAction" href="photos.php?action=ajout_photo&amp;id='.$product->id.'">';
print $langs->trans("AddPhoto").'</a>';

View File

@ -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").'</a>';
}
if ( $user->rights->produit->creer && $product->isproduct)
if ( $user->rights->produit->creer && $product->isproduct && $conf->upload)
{
print '<a class="tabAction" href="fiche.php?action=ajout_photo&amp;id='.$product->id.'">';
print $langs->trans("AddPhoto").'</a>';