From d7060b0c4b8c53a578da5933d336eeee9b534579 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Feb 2017 03:14:21 +0100 Subject: [PATCH 1/3] FIX #6360 --- htdocs/societe/class/societe.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 12d7fcd77ef..7df273b7bf8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3428,7 +3428,9 @@ class Societe extends CommonObject */ public function setCategories($categories, $type) { - // Decode type + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + + // Decode type if ($type == 'customer') { $type_id = Categorie::TYPE_CUSTOMER; $type_text = 'customer'; @@ -3446,7 +3448,6 @@ class Societe extends CommonObject } // Get current categories - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; $c = new Categorie($this->db); $existing = $c->containing($this->id, $type_id, 'id'); From 480d099d81764beb334d0c14fe2e998d7d5240d2 Mon Sep 17 00:00:00 2001 From: arnaud Date: Fri, 3 Feb 2017 16:19:13 +0100 Subject: [PATCH 2/3] Fix project filter traduction --- htdocs/fourn/facture/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 27c14f2a8d4..66411dc8422 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -46,6 +46,7 @@ if (!$user->rights->fournisseur->facture->lire) accessforbidden(); $langs->load("bills"); $langs->load("companies"); $langs->load('products'); +$langs->load('projects'); $socid = GETPOST('socid','int'); From d56b5f30c88818d1f844279aeb046f0b897ff7c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Feb 2017 01:34:21 +0100 Subject: [PATCH 3/3] FIX #6330 --- htdocs/admin/external_rss.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index f18a3fe86b6..8e550f98c99 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -46,14 +46,17 @@ $action=GETPOST('action'); */ // positionne la variable pour le nombre de rss externes -$sql ="SELECT MAX(".$db->decrypt('name').") as name FROM ".MAIN_DB_PREFIX."const"; +$sql ="SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const"; $sql.=" WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'"; -$result=$db->query($sql); +//print $sql; +$result=$db->query($sql); // We can't use SELECT MAX() because EXTERNAL_RSS_URLRSS_10 is lower than EXTERNAL_RSS_URLRSS_9 if ($result) { - $obj = $db->fetch_object($result); - preg_match('/([0-9]+)$/i',$obj->name,$reg); - if ($reg[1]) $lastexternalrss = $reg[1]; + while ($obj = $db->fetch_object($result)) + { + preg_match('/([0-9]+)$/i',$obj->name,$reg); + if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1]; + } } else {