diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 0778ec935d3..4aed13adad0 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -113,7 +113,7 @@ class ActionComm { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $id; $this->type = $obj->libelle; diff --git a/htdocs/cactioncomm.class.php b/htdocs/cactioncomm.class.php index bc1e453db0a..e680bdba161 100644 --- a/htdocs/cactioncomm.class.php +++ b/htdocs/cactioncomm.class.php @@ -43,7 +43,7 @@ class CActioncomm { { if ($db->num_rows()) { - $obj = $db->fetch_object(0); + $obj = $db->fetch_object(); $this->id = $id; $this->libelle = $obj->libelle; @@ -87,7 +87,7 @@ class CActioncomm { $i = 0; while ($i < $nump) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object(); $ga[$obj->id] = $obj->libelle; $i++; @@ -117,7 +117,7 @@ class CActioncomm { { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object($result); return $obj->nom; } $this->db->free(); diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php index 41c39591bec..66f195aabb2 100644 --- a/htdocs/chargesociales.class.php +++ b/htdocs/chargesociales.class.php @@ -146,7 +146,7 @@ class ChargeSociales { { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $obj->rowid; $this->date_ech = $obj->date_ech; @@ -186,7 +186,7 @@ class ChargeSociales { if ($result) { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); return $obj->amount; } else { return 0; diff --git a/htdocs/companybankaccount.class.php b/htdocs/companybankaccount.class.php index c26fc10d963..cd169d0dd3c 100644 --- a/htdocs/companybankaccount.class.php +++ b/htdocs/companybankaccount.class.php @@ -147,7 +147,7 @@ class CompanyBankAccount { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object($result); $this->bank = $obj->bank; $this->courant = $obj->courant; diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index bdb0c2d3c0d..5a8383658c5 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -343,7 +343,7 @@ class Contact { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object(); $this->id = $obj->idp; $this->civilite_id = $obj->civilite_id; @@ -386,7 +386,7 @@ class Contact { if ($this->db->num_rows()) { - $uobj = $this->db->fetch_object($result , 0); + $uobj = $this->db->fetch_object(); $this->user_id = $uobj->rowid; } @@ -426,7 +426,7 @@ class Contact { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object(); $this->birthday_alert = 1; } @@ -509,7 +509,7 @@ class Contact { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object(); $this->id = $obj->idp; diff --git a/htdocs/don.class.php b/htdocs/don.class.php index 5b3b8829912..666e26b13e2 100644 --- a/htdocs/don.class.php +++ b/htdocs/don.class.php @@ -290,7 +290,7 @@ class Don if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $obj->rowid; $this->date = $obj->datedon; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index ef9ce4a9362..d2ed1f98913 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -106,7 +106,7 @@ class Facture { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $cdr_nbjour = $obj->nbjour; $cdr_fdm = $obj->fdm; } @@ -245,7 +245,7 @@ class Facture { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $rowid; $this->datep = $obj->dp; @@ -291,7 +291,7 @@ class Facture while ($i < $num) { - $objp = $this->db->fetch_object($i); + $objp = $this->db->fetch_object($result); $faclig = new FactureLigne($this->db); $faclig->desc = stripslashes($objp->description); $faclig->qty = $objp->qty; @@ -542,7 +542,7 @@ class Facture $i = 0; while ($i < $num) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object($result); $sql = "UPDATE ".MAIN_DB_PREFIX."product SET nbvente=nbvente+1 WHERE rowid = ".$obj->fk_product; $db2 = $this->db->clone(); @@ -746,7 +746,7 @@ class Facture $i = 0; while ($i < $num) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object($result); $products[$i][0] = $obj->price; $products[$i][1] = $obj->qty; @@ -1024,7 +1024,7 @@ class Facture { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object($result , 0); + $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -1086,7 +1086,7 @@ class FactureLigne $result = $this->db->query($sql); if ($result) { - $objp = $this->db->fetch_object($i); + $objp = $this->db->fetch_object($result); $this->desc = stripslashes($objp->description); $this->qty = $objp->qty; $this->price = $objp->price; diff --git a/htdocs/facturefourn.class.php b/htdocs/facturefourn.class.php index ce20b66a389..0dae380cd40 100644 --- a/htdocs/facturefourn.class.php +++ b/htdocs/facturefourn.class.php @@ -163,7 +163,7 @@ class FactureFourn { if ($this->db->num_rows()) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); $this->id = $rowid; $this->datep = $obj->df; @@ -200,7 +200,7 @@ class FactureFourn { while ($i < $num) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object(); $this->lignes[$i][0] = stripslashes($obj->description); $this->lignes[$i][1] = $obj->pu_ht; $this->lignes[$i][2] = $obj->tva_taux; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 8bc0280b774..944b2693b5c 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -79,7 +79,7 @@ class Form $pays=''; while ($i < $num) { - $obj = $this->db->fetch_object( $i); + $obj = $this->db->fetch_object(); if ($obj->code == 0) { print ''; } @@ -138,7 +138,7 @@ class Form $pays=''; while ($i < $num) { - $obj = $this->db->fetch_object( $i); + $obj = $this->db->fetch_object(); if ($obj->code == 0) { print ''; } @@ -194,7 +194,7 @@ class Form $foundselected=false; while ($i < $num) { - $obj = $this->db->fetch_object( $i); + $obj = $this->db->fetch_object(); if ($selected > 0 && $selected == $obj->rowid) { $foundselected=true; @@ -275,7 +275,7 @@ class Form { while ($i < $num) { - $obj = $this->db->fetch_object( $i); + $obj = $this->db->fetch_object(); if ($selected > 0 && $selected == $obj->idp) { print ''; @@ -316,7 +316,7 @@ class Form { while ($i < $num) { - $obj = $this->db->fetch_object($i); + $obj = $this->db->fetch_object(); if ($selected && $selected == $obj->idp) { @@ -353,7 +353,7 @@ class Form if ($num) { - $obj = $this->db->fetch_object(0); + $obj = $this->db->fetch_object(); return $obj->libelle; } else @@ -389,7 +389,7 @@ class Form { while ($i < $num) { - $obj = $this->db->fetch_object( $i); + $obj = $this->db->fetch_object(); if ($selected == $obj->rowid) { print ''; } @@ -484,7 +484,7 @@ class Form print '