diff --git a/ChangeLog b/ChangeLog index a4f4c18837e..31009cbc032 100644 --- a/ChangeLog +++ b/ChangeLog @@ -252,18 +252,12 @@ parameter. All methods addline in this case were modified to remove this paramet ***** ChangeLog for 3.4.3 compared to 3.4.2 ***** Fix: Bad get of localtaxes into contracts add lines - -***** ChangeLog for 3.4.3 compared to 3.4.2 ***** -Fix: Warning into bank conciliation feature. -Fix: Bad get of localtaxes into contracts add lines. -Fix: Add a limit into list to avoid browser to hang when database is too large. -Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability - -***** ChangeLog for 3.4.3 compared to 3.4.2 ***** Fix: Warning into bank conciliation feature. Fix: Bad get of localtaxes into contracts add lines. Fix: Add a limit into list to avoid browser to hang when database is too large. Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability +Fix: Agenda and Banks module were not working with multicompany module +Fix: [ bug #1317 ] Removing a category does not remove all child categories ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: field's problem into company's page (RIB). diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 4c15c006cab..fc250cfe07a 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -333,6 +333,20 @@ class Categorie extends CommonObject $this->db->begin(); + /* FIX #1317 : Check for child cat and move up 1 level*/ + if (! $error) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."categorie"; + $sql.= " SET fk_parent = ".$this->fk_parent; + $sql.= " WHERE fk_parent = ".$this->id; + + if (!$this->db->query($sql)) + { + $this->error=$this->db->lasterror(); + dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); + $error++; + } + } if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe"; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2727bca7164..fbb9400acff 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -312,7 +312,7 @@ $sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,'; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a)"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; $sql.= ' WHERE a.fk_action = ca.id'; -$sql.= ' AND a.entity IN ('.getEntity().')'; +$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index edb89a1d8a8..15cc17fba5c 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -133,7 +133,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature // More parameters $params = explode('&', $dbtablename); $dbtablename=(! empty($params[0]) ? $params[0] : ''); - $sharedelement=(! empty($params[1]) ? $params[1] : ''); + $sharedelement=(! empty($params[1]) ? $params[1] : $dbtablename); $listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 3933e21e0e0..2b2f598a9e8 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -990,7 +990,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders else { $pdf->SetTextColor(255,0,0); - $pdf->MultiCell(100, 3, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); } $posy+=2;