From 3d50b41b8e4dd85e02d76c0cec0e149478a2f6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 23 Mar 2015 01:17:43 +0100 Subject: [PATCH] Reverted $rowid instead of $id property --- htdocs/commande/class/commande.class.php | 1 - htdocs/compta/facture/class/facture.class.php | 1 - htdocs/core/class/commonobject.class.php | 4 ++-- htdocs/core/class/commonobjectline.class.php | 2 +- htdocs/core/tpl/objectline_edit.tpl.php | 4 ++-- htdocs/core/tpl/objectline_view.tpl.php | 12 ++++++------ htdocs/fourn/class/fournisseur.commande.class.php | 1 - 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2d377758aa5..ac567742f0f 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3178,7 +3178,6 @@ class Commande extends CommonOrder $this->lines[$i] = new OrderLine($this->db); $this->lines[$i]->id = $obj->rowid; - $this->lines[$i]->rowid = $obj->rowid; $this->lines[$i]->label = $obj->custom_label; $this->lines[$i]->description = $obj->description; $this->lines[$i]->fk_product = $obj->fk_product; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 38fab4c217c..9cacb6389ac 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3408,7 +3408,6 @@ class Facture extends CommonInvoice $this->lines[$i] = new FactureLigne($this->db); $this->lines[$i]->id = $obj->rowid; - $this->lines[$i]->rowid = $obj->rowid; $this->lines[$i]->label = $obj->custom_label; // deprecated $this->lines[$i]->description = $obj->description; $this->lines[$i]->fk_product = $obj->fk_product; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5dc524d964c..d240c13110b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2821,7 +2821,7 @@ abstract class CommonObject if (! empty($line->date_end)) $type=1; // deprecated // Ligne en mode visu - if ($action != 'editline' || $selected != $line->rowid) + if ($action != 'editline' || $selected != $line->id) { // Product if ($line->fk_product > 0) @@ -2879,7 +2879,7 @@ abstract class CommonObject } // Ligne en mode update - if ($this->statut == 0 && $action == 'editline' && $selected == $line->rowid) + if ($this->statut == 0 && $action == 'editline' && $selected == $line->id) { $label = (! empty($line->label) ? $line->label : (($line->fk_product > 0) ? $line->product_label : '')); if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $placeholder=' placeholder="'.$langs->trans("Label").'"'; diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index b88dfabe83d..b252a690da6 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -31,13 +31,13 @@ abstract class CommonObjectLine extends CommonObject /** * Id of the line * @var int - * @deprecated Use $rowid */ public $id; /** * Id of the line * @var int + * @deprecated Try to use id property as possible */ public $rowid; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 6be8a82d69a..5b895a69da3 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -53,9 +53,9 @@ $coldisplay=-1; // We remove first td ?> > global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>global->MAIN_VIEW_LINE_NUMBER))?2:1; ?> -
+
- + diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index c283f846d0f..7b4f27ae87e 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -48,11 +48,11 @@ if (empty($usemargins)) $usemargins=0; ?> -> +> global->MAIN_VIEW_LINE_NUMBER)) { ?> -
+
info_bits & 2) == 2) { ?> info_bits & 2) == 2) { ?> - rowid.'#line_'.$line->rowid; ?>"> + id.'#line_'.$line->id; ?>"> @@ -192,7 +192,7 @@ if (empty($usemargins)) $usemargins=0; situation_counter == 1 || !$this->situation_cycle_ref) { - print 'rowid . '">'; + print 'id . '">'; print img_delete(); print ''; } @@ -202,12 +202,12 @@ if (empty($usemargins)) $usemargins=0; 1 && empty($conf->browser->phone) && ($this->situation_counter == 1 || !$this->situation_cycle_ref)) { ?> 0) { ?> - rowid; ?>"> + id; ?>"> - rowid; ?>"> + id; ?>"> diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index e52b98b7e53..52c215de6a4 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -260,7 +260,6 @@ class CommandeFournisseur extends CommonOrder $line = new CommandeFournisseurLigne($this->db); $line->id = $objp->rowid; - $line->rowid = $objp->rowid; $line->desc = $objp->description; $line->description = $objp->description; $line->qty = $objp->qty;