Fix small variables definition errors

This commit is contained in:
ywarnier 2007-08-14 20:46:22 +00:00
parent 3e1dbb955b
commit a31e04312a

View File

@ -69,15 +69,15 @@ class Osc_product
* \param ref Ref du produit dans OsC (doit être unique dans OsC) * \param ref Ref du produit dans OsC (doit être unique dans OsC)
* \return int <0 si ko, >0 si ok * \return int <0 si ko, >0 si ok
*/ */
function fetch($id='',$ref='') function fetch($id='',$ref='')
{ {
global $langs; global $langs;
global $conf; global $conf;
$this->error = ''; $this->error = '';
dolibarr_syslog("Osc_product::fetch $id=$id ref=$ref"); dolibarr_syslog("Osc_product::fetch $id=$id ref=$ref");
// Verification parametres // Verification parametres
if (! $id && ! $ref) if (! $id && ! $ref)
{ {
$this->error=$langs->trans('ErrorWrongParameters'); $this->error=$langs->trans('ErrorWrongParameters');
return -1; return -1;
@ -112,7 +112,7 @@ class Osc_product
$this->osc_image = $obj[image]; $this->osc_image = $obj[image];
} }
else { else {
$this->error = 'Erreur '.$err ; $this->error = 'Erreur '.$client->getError();
return -1; return -1;
} }
return 0; return 0;
@ -126,7 +126,7 @@ class Osc_product
if ( !$result ) if ( !$result )
{ {
$product = new Product($this->db); $product = new Product($this->db);
if ($_error == 1) if ($this->error == 1)
{ {
print '<br>erreur 1</br>'; print '<br>erreur 1</br>';
return ''; return '';
@ -208,7 +208,7 @@ class Osc_product
$sql.= " FROM ".MAIN_DB_PREFIX."osc_product"; $sql.= " FROM ".MAIN_DB_PREFIX."osc_product";
$sql.= " WHERE doli_prodidp = ".$productidp; $sql.= " WHERE doli_prodidp = ".$productidp;
$result=$this->db->query($sql); $result=$this->db->query($sql);
$row = $this->db->fetch_row($resql); $row = $this->db->fetch_row($result);
// test d'erreurs // test d'erreurs
if ($row) return $row[0]; if ($row) return $row[0];
else return -1; else return -1;