diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 63bf3b86c56..112dbf792ff 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2505,7 +2505,7 @@ class Propal extends CommonObject $response = new WorkboardResponse(); $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; - $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut; + $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals'; $response->img = img_object($langs->trans("Propals"),"propal"); // This assignment in condition is not a bug. It allows walking the results. diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 44c329214e7..06628ee4ea5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2875,7 +2875,7 @@ class Commande extends CommonOrder $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->client->warning_delay/60/60/24; $response->label=$langs->trans("OrdersToProcess"); - $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3'; + $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders'; $response->img=img_object($langs->trans("Orders"),"order"); $generic_commande = new Commande($this->db); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 15cc1e2123c..af533023297 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3227,7 +3227,7 @@ class Facture extends CommonInvoice $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->client->warning_delay/60/60/24; $response->label=$langs->trans("CustomerBillsUnpaid"); - $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1'; + $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); $generic_facture = new Facture($this->db); diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 8ea3221c648..1d3fbc3a154 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -162,68 +162,52 @@ class Ldap return -1; } - if (! function_exists('ldap_connect')) + if (! function_exists("ldap_connect")) { - $this->error='Your PHP need extension ldap'; + $this->error='LDAPFunctionsNotAvailableOnPHP'; dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING); - return -1; + $return=-1; } - - // Loop on each ldap server - foreach ($this->server as $key => $host) + + if (empty($this->error)) { - if ($connected) break; - if (empty($host)) continue; - - if (preg_match('/^ldap/',$host)) + // Loop on each ldap server + foreach ($this->server as $key => $host) { - $this->connection = ldap_connect($host); - } - else - { - $this->connection = ldap_connect($host,$this->serverPort); - } - - if (is_resource($this->connection)) - { - // Begin TLS if requested by the configuration - if (! empty($conf->global->LDAP_SERVER_USE_TLS)) - { - if (! ldap_start_tls($this->connection)) - { - dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING); - $connected = 0; - $this->close(); - } - } - - // Execute the ldap_set_option here (after connect and before bind) - $this->setVersion(); - ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. - - - if ($this->serverType == "activedirectory") + if ($connected) break; + if (empty($host)) continue; + + if (preg_match('/^ldap/',$host)) { - $result=$this->setReferrals(); - dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); - $this->result=$this->bindauth($this->searchUser,$this->searchPassword); - if ($this->result) - { - $this->bind=$this->result; - $connected=2; - break; - } - else - { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); - } + $this->connection = ldap_connect($host); } else { - // Try in auth mode - if ($this->searchUser && $this->searchPassword) + $this->connection = ldap_connect($host,$this->serverPort); + } + + if (is_resource($this->connection)) + { + // Begin TLS if requested by the configuration + if (! empty($conf->global->LDAP_SERVER_USE_TLS)) + { + if (! ldap_start_tls($this->connection)) + { + dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING); + $connected = 0; + $this->close(); + } + } + + // Execute the ldap_set_option here (after connect and before bind) + $this->setVersion(); + ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. + + + if ($this->serverType == "activedirectory") { - dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $result=$this->setReferrals(); + dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); $this->result=$this->bindauth($this->searchUser,$this->searchPassword); if ($this->result) { @@ -236,26 +220,45 @@ class Ldap $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); } } - // Try in anonymous - if (! $this->bind) + else { - dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); - $result=$this->bind(); - if ($result) + // Try in auth mode + if ($this->searchUser && $this->searchPassword) { - $this->bind=$this->result; - $connected=1; - break; + dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG); + $this->result=$this->bindauth($this->searchUser,$this->searchPassword); + if ($this->result) + { + $this->bind=$this->result; + $connected=2; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } - else + // Try in anonymous + if (! $this->bind) { - $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG); + $result=$this->bind(); + if ($result) + { + $this->bind=$this->result; + $connected=1; + break; + } + else + { + $this->error=ldap_errno($this->connection).' '.ldap_error($this->connection); + } } } } + + if (! $connected) $this->close(); } - - if (! $connected) $this->close(); } if ($connected) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 5c6b9613c17..ffb09b2b3ab 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1) if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends)) { // Activation des modules dont le module depend + $TError=array(); $num = count($objMod->depends); for ($i = 0; $i < $num; $i++) { + $activate = false; foreach ($modulesdir as $dir) { if (file_exists($dir.$objMod->depends[$i].".class.php")) { activateModule($objMod->depends[$i]); + $activate = true; } } + + if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]); } + + setEventMessages('', $TError, 'errors'); } if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith)) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3e7a3a40a75..066f97c142d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -436,7 +436,7 @@ function dol_size($size,$type='') */ function dol_sanitizeFileName($str,$newstr='_',$unaccent=1) { - $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"'); + $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"','°'); return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars); } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 6c5af367c03..70471f1c543 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -773,8 +773,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->facture->enabled)) { $langs->load("bills"); - $newmenu->add("/compta/facture/list.php",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); - $newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer); + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills'); + $newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire); if (empty($leftmenu) || ($leftmenu == 'customers_bills')) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index f3174935cd5..c5b3c45b001 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -819,7 +819,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) } } -if ($action == "addline") +if ($action == "addline" && $user->rights->expensereport->creer) { $error = 0; @@ -911,7 +911,7 @@ if ($action == "addline") $action=''; } -if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") +if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -954,7 +954,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") } } -if ($action == "updateligne" ) +if ($action == "updateligne" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -1640,8 +1640,11 @@ else print ''.$langs->trans('AmountHT').''; print ''.$langs->trans('AmountTTC').''; } - print ''; - + // Ajout des boutons de modification/suppression + if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer) + { + print ''; + } print ''; $var=true; @@ -1682,7 +1685,7 @@ else // Ajout des boutons de modification/suppression print ''; - if($object->fk_statut<2 OR $object->fk_statut==99) + if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer) { print 'rowid.'#'.$objp->rowid.'">'; print img_edit(); @@ -1768,7 +1771,7 @@ else //print ''; // Add a line - if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline') + if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer) { print ''; print ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4017e1f3f56..3c36bc611fd 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2371,7 +2371,7 @@ class CommandeFournisseur extends CommonOrder $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); - $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3'; + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img=img_object($langs->trans("Orders"),"order"); while ($obj=$this->db->fetch_object($resql)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index a276a4b4e87..9520640db54 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1447,7 +1447,7 @@ class FactureFournisseur extends CommonInvoice $response = new WorkboardResponse(); $response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SupplierBillsToPay"); - $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0'; + $response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills'; $response->img=img_object($langs->trans("Bills"),"bill"); $facturestatic = new FactureFournisseur($this->db); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 36ae88dbeb9..af3373bf4aa 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1711,3 +1711,4 @@ TitleExampleForMaintenanceRelease=Example of message you can use to announce thi ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read ChangeLog for complete list of changes. ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so it contains only fixes of bugs. We recommend everybody using an older version to upgrade to this one. As any maintenance release, no new features, nor data structure change is present into this version. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several level of prices per product/service" is on, you can define different prices (one per price level) for each product. To save you time, you can enter here rule to have price for each level autocalculated according to price of first level, so you will have to enter only price for first level on each product. This page is here to save you time and can be usefull only if your prices for each leve are relative to first level. You can ignore this page in most cases. +activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 834611558a2..1628294ef2f 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -154,6 +154,7 @@ Save=Save SaveAs=Save As TestConnection=Test connection ToClone=Clone +ConfirmCloneAction=Are you sure you want to clone this event ? ConfirmClone=Choose data you want to clone : NoCloneOptionsSpecified=No data to clone defined. Of=of