From 9e1100ece3b02340cf9dfe8ee55a374c4af898cd Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Tue, 5 Jan 2010 14:10:28 +0000 Subject: [PATCH] Fix: uniformize code --- htdocs/product/index.php | 10 +++++----- htdocs/societe.class.php | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index d2f2326f2ae..d8d60835966 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT.'/product.class.php'); if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden(); -$staticproduct=new Product($db); +$product_static = new Product($db); @@ -208,10 +208,10 @@ if ($result) $var=!$var; print "<tr $bc[$var]>"; print '<td nowrap="nowrap">'; - $staticproduct->id=$objp->rowid; - $staticproduct->ref=$objp->ref; - $staticproduct->type=$objp->fk_product_type; - print $staticproduct->getNomUrl(1,'',16); + $product_static->id=$objp->rowid; + $product_static->ref=$objp->ref; + $product_static->type=$objp->fk_product_type; + print $product_static->getNomUrl(1,'',16); print "</td>\n"; print '<td>'.dol_trunc($objp->label,32).'</td>'; print "<td>"; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 3381c340566..20335691b61 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -1165,10 +1165,9 @@ class Societe extends CommonObject $sql .= " VALUES (".$this->db->idate(mktime()).",".$this->id.",'".$price_level."',".$user->id.")"; if (! $this->db->query($sql) ) - { - dol_print_error($this->db); - } - + { + dol_print_error($this->db); + } } } -- GitLab