From 82cb0802d0c42042a558f468ab6df48886b58037 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Sun, 28 Oct 2012 02:14:08 +0200
Subject: [PATCH] Fix: broken feature, missing $page Fix: bad field name

---
 htdocs/compta/facture/class/facture.class.php | 2 +-
 htdocs/core/class/html.form.class.php         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index f77b260bed3..f267ab0a496 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -3196,7 +3196,7 @@ class FactureLigne
             $this->rowid				= $objp->rowid;
             $this->fk_facture			= $objp->fk_facture;
             $this->fk_parent_line		= $objp->fk_parent_line;
-            $this->label				= $objp->label;
+            $this->label				= $objp->custom_label;
             $this->desc					= $objp->description;
             $this->qty					= $objp->qty;
             $this->subprice				= $objp->subprice;
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 69c5b37ce69..fd9ed4ba225 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2315,8 +2315,8 @@ class Form
                 $autoOpen=false;
                 $dialogconfirm.='-'.$button;
             }
-            $pageyes=(preg_match('/\?/',$page)?'&':'?').'action='.$action.'&confirm=yes';
-            $pageno=($useajax == 2 ? (preg_match('/\?/',$page)?'&':'?').'confirm=no':'');
+            $pageyes=$page.(preg_match('/\?/',$page)?'&':'?').'action='.$action.'&confirm=yes';
+            $pageno=($useajax == 2 ? $page.(preg_match('/\?/',$page)?'&':'?').'confirm=no':'');
             // Add input fields into list of fields to read during submit (inputok and inputko)
             if (is_array($formquestion))
             {
-- 
GitLab