From b9fbdffab25d1e561e0c272dc88946b7ddadf51d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 14 Mar 2014 22:56:54 +0100 Subject: [PATCH 1/3] Fix bug 1298 : category nav on member modified: htdocs/categories/categorie.php --- htdocs/categories/categorie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 8232da94989..a0be24c3e46 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -410,7 +410,7 @@ else if ($id || $ref) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($member,'rowid'); + print $form->showrefnav($member,'id','',1,'rowid','nom','','&type='.$type); print ''; // Login From 9ccf99ab4a9669c6ea1f7131724bd1ce7df77a1e Mon Sep 17 00:00:00 2001 From: jean Date: Fri, 14 Mar 2014 23:04:27 +0100 Subject: [PATCH 2/3] correction erreur sql update url = null --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bd795845783..fbe46281e00 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -560,7 +560,7 @@ class Product extends CommonObject if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; if (empty($this->status)) $this->status = 0; if (empty($this->status_buy)) $this->status_buy = 0; - + if (empty($this->country_id)) $this->country_id = 0; //Gencod @@ -610,7 +610,7 @@ class Product extends CommonObject $sql.= ", volume_units = " . ($this->volume_units!='' ? "'".$this->volume_units."'" : 'null'); $sql.= ", seuil_stock_alerte = " . ((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->seuil_stock_alerte."'" : "null"); $sql.= ", description = '" . $this->db->escape($this->description) ."'"; - $sql.= ", url = " . ($this->url?"'".$this->db->escape($this->url)."'":''); + $sql.= ", url = " . ($this->url?"'".$this->db->escape($this->url)."'":'null'); $sql.= ", customcode = '" . $this->db->escape($this->customcode) ."'"; $sql.= ", fk_country = " . ($this->country_id > 0 ? $this->country_id : 'null'); $sql.= ", note = '" . $this->db->escape($this->note) ."'"; From 3131b929883827a2449d5c935d5c534c058dd387 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 14 Mar 2014 23:18:46 +0100 Subject: [PATCH 3/3] Fix bug 1293 : numbering failed --- htdocs/categories/categorie.php | 2 +- htdocs/core/lib/functions2.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index a0be24c3e46..e3925ddb232 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -410,7 +410,7 @@ else if ($id || $ref) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($member,'id','',1,'rowid','nom','','&type='.$type); + print $form->showrefnav($member,'id'); print ''; // Login diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index c315939d327..20af2917fa4 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -716,7 +716,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m //print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."
\n"; // Define $sqlstring - $posnumstart=strpos($maskwithnocode,$maskcounter); // Pos of counter in final string (from 0 to ...) + $posnumstart=strrpos($maskwithnocode,$maskcounter); // Pos of counter in final string (from 0 to ...) if ($posnumstart < 0) return 'ErrorBadMaskFailedToLocatePosOfSequence'; $sqlstring='SUBSTRING('.$field.', '.($posnumstart+1).', '.dol_strlen($maskcounter).')';