Fix: Removed warning
This commit is contained in:
parent
65ee384aea
commit
50d39ca248
@ -372,7 +372,7 @@ class Product extends CommonObject
|
|||||||
$result=$interface->run_triggers('PRODUCT_CREATE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PRODUCT_CREATE',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ class Product extends CommonObject
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if($conf->global->MAIN_MULTILANGS)
|
if($conf->global->MAIN_MULTILANGS)
|
||||||
{
|
{
|
||||||
@ -500,14 +500,14 @@ class Product extends CommonObject
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('PRODUCT_MODIFY',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PRODUCT_MODIFY',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2431,7 +2431,7 @@ class Product extends CommonObject
|
|||||||
* \brief Deplace fichier recupere sur internet (utilise pour interface avec OSC)
|
* \brief Deplace fichier recupere sur internet (utilise pour interface avec OSC)
|
||||||
* \param sdir Repertoire destination finale
|
* \param sdir Repertoire destination finale
|
||||||
* \param $files url de l'image
|
* \param $files url de l'image
|
||||||
* \author Jean Heimburger juin 2007
|
* \author Jean Heimburger june 2007
|
||||||
*/
|
*/
|
||||||
function add_photo_web($sdir, $file)
|
function add_photo_web($sdir, $file)
|
||||||
{
|
{
|
||||||
@ -2451,13 +2451,14 @@ class Product extends CommonObject
|
|||||||
// \todo A faire
|
// \todo A faire
|
||||||
|
|
||||||
// Cree fichier en taille origine
|
// Cree fichier en taille origine
|
||||||
$content = file_get_contents($file);
|
$content = @file_get_contents(urlencode($file));
|
||||||
|
if( $content)
|
||||||
$nom = basename($file);
|
{
|
||||||
$im = fopen(dol_osencode($dir.$nom),'wb');
|
$nom = basename($file);
|
||||||
fwrite($im, $content);
|
$im = fopen(dol_osencode($dir.$nom),'wb');
|
||||||
fclose($im);
|
fwrite($im, $content);
|
||||||
// }
|
fclose($im);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user