From 2cf9a7511b5dff15775a90d4c03262c3bf456743 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 Jul 2014 23:47:46 +0200 Subject: [PATCH 01/23] Add date of file so we know if file was correctly build before publishing it. --- build/makepack-dolibarr.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 8a1c8465759..55de5abffb4 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -957,12 +957,15 @@ if ($nboftargetok) { "$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM', "$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM' ); + use POSIX qw/strftime/; foreach my $file (sort keys %filestoscan) { $found=0; my $filesize = -s $file; + my $filedate = (stat $file)[9]; print $file." ".($filesize?"(found)":"(not found)"); print ($filesize?" - ".$filesize:""); + print ($filedate?" - ".strftime("%Y-%m-%d %H:%M:%S",localtime($filedate)):""); print "\n"; } From 25a591bd03263ea5a84eb750d8e3b73687aba02b Mon Sep 17 00:00:00 2001 From: nicoplh Date: Thu, 17 Jul 2014 16:21:23 +0200 Subject: [PATCH 02/23] Update impayees.php Add column ref.Client with search module. --- htdocs/compta/facture/impayees.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index dd374eb1a6f..dacc3269b23 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -174,6 +174,7 @@ $(document).ready(function() { $now=dol_now(); $search_ref = GETPOST("search_ref"); +$search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_societe = GETPOST("search_societe"); $search_montant_ht = GETPOST("search_montant_ht"); $search_montant_ttc = GETPOST("search_montant_ttc"); @@ -192,7 +193,7 @@ if (! $sortorder) $sortorder="ASC"; $limit = $conf->liste_limit; $sql = "SELECT s.nom, s.rowid as socid"; -$sql.= ", f.rowid as facid, f.facnumber, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; +$sql.= ", f.rowid as facid, f.facnumber, f.ref_client, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; $sql.= ", f.datef as df, f.date_lim_reglement as datelimite"; $sql.= ", f.paye as paye, f.fk_statut, f.type"; $sql.= ", sum(pf.amount) as am"; @@ -218,6 +219,7 @@ if (GETPOST('filtre')) } } if ($search_ref) $sql .= " AND f.facnumber LIKE '%".$db->escape($search_ref)."%'"; +if ($search_refcustomer) $sql .= " AND f.ref_client LIKE '%".$db->escape($search_refcustomer)."%'"; if ($search_societe) $sql .= " AND s.nom LIKE '%".$db->escape($search_societe)."%'"; if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'"; @@ -246,6 +248,7 @@ if ($resql) $param.=(! empty($socid)?"&socid=".$socid:""); $param.=(! empty($option)?"&option=".$option:""); if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_refcustomer) $param.='&search_ref='.urlencode($search_refcustomer); if ($search_societe) $param.='&search_societe='.urlencode($search_societe); if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); @@ -274,6 +277,7 @@ if ($resql) print ''; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); @@ -291,6 +295,9 @@ if ($resql) // Ref print ''; + print ''; print ''; print ''; print ''; @@ -356,6 +363,11 @@ if ($resql) print "\n"; + // Customer ref + print ''; + print ''."\n"; print ''."\n"; @@ -402,7 +414,7 @@ if ($resql) } print ''; - print ''; + print ''; print ''; print ''; print ''; From 4f0d01d5c5e6a64811794c868d1cd5aeb28848e6 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Fri, 18 Jul 2014 14:36:46 +0300 Subject: [PATCH 03/23] Fix Link product, In list view and label product This Fix added and develop. --- htdocs/margin/productMargins.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index ca7b2c4845b..a394b42686e 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -260,13 +260,15 @@ if ($result) print dol_print_date($db->jdate($objp->datef),'day').""; } else { + print '\n"; + print $text.= ' - '.$objp->label; + print "\n"; + //print "\n"; } print "\n"; print "\n"; From 2cfc5f10a8afa733cf324b57634f6fde56dd46e9 Mon Sep 17 00:00:00 2001 From: nicoplh Date: Fri, 18 Jul 2014 14:47:23 +0200 Subject: [PATCH 04/23] Update impayees.php remove useless type alpha. --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index dacc3269b23..fe16e03b6c6 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -174,7 +174,7 @@ $(document).ready(function() { $now=dol_now(); $search_ref = GETPOST("search_ref"); -$search_refcustomer=GETPOST('search_refcustomer','alpha'); +$search_refcustomer=GETPOST('search_refcustomer'); $search_societe = GETPOST("search_societe"); $search_montant_ht = GETPOST("search_montant_ht"); $search_montant_ttc = GETPOST("search_montant_ttc"); From 7794101e10b8ecc3355eb9917391509f9f1a57ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 19 Jul 2014 05:36:29 +0200 Subject: [PATCH 05/23] Corrected VAT expenses behaviour name --- htdocs/langs/en_US/admin.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a5c2d1e19fe..8561c815e38 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1416,8 +1416,8 @@ ConfirmDeleteLine=Are you sure you want to delete this line ? ##### Tax ##### TaxSetup=Taxes, social contributions and dividends module setup OptionVatMode=VAT due -OptionVATDefault=Standard -OptionVATDebitOption=Option services on Debit +OptionVATDefault=Cash basis +OptionVATDebitOption=Accrual basis OptionVatDefaultDesc=VAT is due:
- on delivery for goods (we use invoice date)
- on payments for services OptionVatDebitOptionDesc=VAT is due:
- on delivery for goods (we use invoice date)
- on invoice (debit) for services SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option: From 6637ea51e39d66917e959f647eb5525e57e25b53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Jul 2014 16:41:14 +0200 Subject: [PATCH 06/23] Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances --- htdocs/product/class/product.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index d7d5952ab66..59dbc487f74 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2847,15 +2847,15 @@ class Product extends CommonObject // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites if ($photo_vignette && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $photo) && ($product->imgWidth > $maxWidth || $product->imgHeight > $maxHeight)) { - $return.= ''.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; + $return.= ''.img_picto($langs->trans('GenerateThumb'),'refresh').'  '; } if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; // Link to delete - $return.= ''; + $return.= ''; $return.= img_delete().''; } } @@ -2875,10 +2875,10 @@ class Product extends CommonObject if ($user->rights->produit->creer || $user->rights->service->creer) { // Link to resize - $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; + $return.= ''.img_picto($langs->trans("Resize"),DOL_URL_ROOT.'/theme/common/transform-crop-and-resize','',1).'   '; // Link to delete - $return.= ''; + $return.= ''; $return.= img_delete().''; } } From a74b65df0e0643859627760d785a66a7a3e0ef79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Jul 2014 04:29:47 +0200 Subject: [PATCH 07/23] Fix: Add max height to solve pb with very large logo. --- htdocs/theme/amarok/style.css.php | 1 + htdocs/theme/auguria/style.css.php | 1 + htdocs/theme/bureau2crea/style.css.php | 1 + htdocs/theme/cameleo/style.css.php | 1 + htdocs/theme/eldy/style.css.php | 1 + 5 files changed, 5 insertions(+) diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 9181c9b74f8..eda6e01f1f4 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -471,6 +471,7 @@ form#login img {width:auto; height:auto; opacity:.7;} form#login img#img_logo { width:190px; max-width:190px; + max-height:100px; height:auto; border-radius:6px; padding:6px; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index a118409890c..946f46ad141 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -550,6 +550,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 4743e26ee8a..92d6b4f242f 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -583,6 +583,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index ad03e369d95..8b4172522aa 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -654,6 +654,7 @@ form#login { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index fd2c8a17252..c4e9b87ff44 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -867,6 +867,7 @@ table.login_table tr td table.none tr td { } #img_logo { max-width: 200px; + max-height: 100px; } div.login_block { From 8cd2e00e5f95348f378491759c2b0e501a55ed69 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 21 Jul 2014 16:57:08 +0200 Subject: [PATCH 08/23] Fix: [ bug #1521 ] The second order's page from a provider shows all orders --- ChangeLog | 1 + htdocs/fourn/commande/liste.php | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29dc1eaf4a2..ca424465e78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -70,6 +70,7 @@ For users: - Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages - Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger. - Fix: [ bug #1517 ] Packages sizes. +- Fix: [ bug #1521 ] The second order's page from a provider shows all orders TODO - New: Predefined product and free product use same form. diff --git a/htdocs/fourn/commande/liste.php b/htdocs/fourn/commande/liste.php index 9e0c12ecf5f..4b005a88724 100644 --- a/htdocs/fourn/commande/liste.php +++ b/htdocs/fourn/commande/liste.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Marcos García + * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -150,11 +151,12 @@ if ($resql) $i = 0; $param=""; - if ($search_ref) $param.="&search_ref=".$search_ref; - if ($search_nom) $param.="&search_nom=".$search_nom; - if ($search_user) $param.="&search_user=".$search_user; - if ($search_ttc) $param.="&search_ttc=".$search_ttc; + if ($search_ref) $param.="&search_ref=".$search_ref; + if ($search_nom) $param.="&search_nom=".$search_nom; + if ($search_user) $param.="&search_user=".$search_user; + if ($search_ttc) $param.="&search_ttc=".$search_ttc; if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp; + if ($socid) $param.="&socid=".$socid; if ($search_status >= 0) $param.="&search_status=".$search_status; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); print '
'; From f31f0cc0a9bbbb2c1ebba704d7f561b635db2cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 23 Jul 2014 06:25:12 +0200 Subject: [PATCH 09/23] Updated changelog for 3.6 --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fbc13e8ba77..9c3f8a6d9ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,7 +42,8 @@ For users: - New: More options to create a credit note (can be filled autatically according to remain to pay). - New: Can define custom fields for categories. - New: Prepare generation of SEPA files into module withdrawal. -- New: Can filter on status for supplier order. +- New: [ task #1164 ] Add "Ref. supplier" search box in supplier orders +- New: [ task #1345 ] Can filter on status for supplier order. - New: Add option FACTURE_SENDBYEMAIL_FOR_ALL_STATUS to allow to send invoice by email whatever is its status. - New: Add filter date in bank writing list page. From 2e18fa88d147815936340763b8dd4835a8ecc97b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 25 Jul 2014 14:03:41 +0200 Subject: [PATCH 10/23] =?UTF-8?q?Mauvais=20libell=C3=A9=20utilis=C3=A9=20p?= =?UTF-8?q?our=20statut=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index ca3aea39a47..9e6eb820e8d 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -688,7 +688,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); - if (empty($leftmenu) || $leftmenu=="orders" && ! empty($conf->expedition->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->commande->lire); + if (empty($leftmenu) || $leftmenu=="orders" && ! empty($conf->expedition->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); // The translation key is StatusOrderToBill but it means StatusDelivered. TODO We should renamed this later if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire); From 386022947a5489b52aacda1f4282371f74fe8cdb Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 25 Jul 2014 14:11:31 +0200 Subject: [PATCH 11/23] Categorie class was fetching an object even if no param passed --- htdocs/categories/class/categorie.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8d2c4ceed46..ad436d5c6c8 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -74,6 +74,9 @@ class Categorie extends CommonObject function fetch($id,$label='') { global $conf; + + // Check parameters + if (empty($id) && empty($label)) return -1; $sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; From 36b634784b24be32ba3a94202279dc6d62f99a76 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 25 Jul 2014 16:31:41 +0200 Subject: [PATCH 12/23] Fix : real delivery date on livraison was not displayed --- htdocs/expedition/liste.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 76dbd7cc9a9..29ab105ee91 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -58,7 +58,7 @@ $shipment=new Expedition($db); $helpurl='EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones'; llxHeader('',$langs->trans('ListOfSendings'),$helpurl); -$sql = "SELECT e.rowid, e.ref, e.date_delivery, e.date_expedition, e.fk_statut"; +$sql = "SELECT e.rowid, e.ref, e.date_delivery as date_expedition, l.date_delivery as date_livraison, e.fk_statut"; $sql.= ", s.nom as socname, s.rowid as socid"; $sql.= " FROM (".MAIN_DB_PREFIX."expedition as e"; if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all @@ -67,6 +67,8 @@ if (!$user->rights->societe->client->voir && !$socid) // Internal user with no p } $sql.= ")"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'shipping'"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.rowid = ee.fk_target AND ee.targettype = 'delivery'"; $sql.= " WHERE e.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all { @@ -104,7 +106,9 @@ if ($resql) print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"liste.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateReceived"),"liste.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); + if($conf->livraison_bon->enabled) { + print_liste_field_titre($langs->trans("DateReceived"),"liste.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); + } print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder); print "
\n"; $var=True; @@ -129,16 +133,18 @@ if ($resql) print ''; // Date delivery planed print "\n"; - // Date real - print "\n"; + if($conf->livraison_bon->enabled) { + // Date real + print "\n"; + } print ''; print "\n"; From 45435b597e2c689a68d079a7276e5ebc45b276aa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 17:18:19 +0200 Subject: [PATCH 13/23] Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas --- htdocs/adherents/liste.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 357fbc1aa43..3a34403425f 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2013 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -188,7 +188,7 @@ if ($resql) } $param=""; - if (isset($_GET["statut"])) $param.="&statut=".$statut; + if ($statut != "") $param.="&statut=".$statut; if ($search_nom) $param.="&search_nom=".$search_nom; if ($search_login) $param.="&search_login=".$search_login; if ($search_email) $param.="&search_email=".$search_email; @@ -201,7 +201,7 @@ if ($resql) print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; } - print ''; + print ''; print "
'; print ''; + print ''; + print '  '; + print $objp->ref_client; + print ''.dol_print_date($db->jdate($objp->df),'day').''.dol_print_date($db->jdate($objp->datelimite),'day').'
'.$langs->trans("Total").''.$langs->trans("Total").''.price($total_ht).''.price($total_tva).''.price($total_ttc).''; $product_static->type=$objp->fk_product_type; - $product_static->id=$objp->fk_product; + $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; $product_static->libelle=$objp->label; $text=$product_static->getNomUrl(1); - $text.= ' - '.$objp->label; - print "".$product_static->getNomUrl(1)."".$product_static->getNomUrl(1)."".price($pv, null, null, null, null, $rounding)."".price($pa, null, null, null, null, $rounding)."
"; - print dol_print_date($db->jdate($objp->date_delivery),"day"); + print dol_print_date($db->jdate($objp->date_expedition),"day"); /*$now = time(); if ( ($now - $db->jdate($objp->date_expedition)) > $conf->warnings->lim && $objp->statutid == 1 ) { }*/ print ""; - print dol_print_date($db->jdate($objp->date_expedition),"day"); - print ""; + print dol_print_date($db->jdate($objp->date_livraison),"day"); + print "'.$expedition->LibStatut($objp->fk_statut,5).'
"; // Filter on categories From 10e677d2d9aa4173e98a6be6cdda205c1713b5e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 17:28:06 +0200 Subject: [PATCH 14/23] Prepare script for 3.6 version --- build/perl/virtualmin/dolibarr.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index e702c8d4530..f105a89bc4d 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,8 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "3.6.0", "3.5.3", "3.5.2", "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" ); + # TODO Replace this with version of Dolibar we want to install + return ( "x.y.z", "3.6.0"); } sub script_dolibarr_category From a8547e9c4de4032c6ec4f3a8a7063222ca668317 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 17:30:10 +0200 Subject: [PATCH 15/23] Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas --- ChangeLog | 3 +++ build/debian/changelog | 7 +++++++ build/doxygen/dolibarr-doxygen.doxyfile | 2 +- build/exe/doliwamp/doliwamp.iss | 4 ++-- build/makepack-howto.txt | 3 +-- build/rpm/dolibarr_fedora.spec | 3 +++ build/rpm/dolibarr_generic.spec | 3 +++ build/rpm/dolibarr_mandriva.spec | 3 +++ build/rpm/dolibarr_opensuse.spec | 3 +++ htdocs/filefunc.inc.php | 2 +- 10 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5336bfd5878..c042efef003 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 3.5.5 compared to 3.5.4 ***** +Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas. + ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled. Fix: When using option MAIN_MAIL_ALLOW_SENDMAIL_F, a mail was sent to sender. diff --git a/build/debian/changelog b/build/debian/changelog index 567059dce4b..aeba0dfa190 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,3 +1,10 @@ +dolibarr (3.5.5-3) unstable; urgency=low + + [ Laurent Destailleur (eldy) ] + * New upstream release. + + -- Laurent Destailleur (eldy) Tue, 8 July 2014 12:00:00 +0100 + dolibarr (3.5.4-3) unstable; urgency=low [ Laurent Destailleur (eldy) ] diff --git a/build/doxygen/dolibarr-doxygen.doxyfile b/build/doxygen/dolibarr-doxygen.doxyfile index 41095c5ecce..7a6bcb43119 100644 --- a/build/doxygen/dolibarr-doxygen.doxyfile +++ b/build/doxygen/dolibarr-doxygen.doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 3.5.3 +PROJECT_NUMBER = 3.5 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 9b69bba1efa..5ff4e7770b0 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -17,9 +17,9 @@ ; ----- Change this ----- AppName=DoliWamp ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -AppVerName=DoliWamp-3.5.4 +AppVerName=DoliWamp-3.5.5 ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -OutputBaseFilename=DoliWamp-3.5.4 +OutputBaseFilename=DoliWamp-3.5.5 ; ----- End of change ;OutputManifestFile=build\doliwampbuild.log ; Define full path from which all relative path are defined diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index c43d1769458..7ab0da72138 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -13,8 +13,7 @@ beta version of Dolibarr, step by step. - Update version number with x.y.z-w in build/debian/changelog - Update version number with x.y.z-w in build/exe/doliwamp/doliwamp.iss - Update version number with x.y.z-w in build/rpm/*.spec -- Update version number with x.y.z in build/doxygen/dolibarr-doxygen.doxyfile -- Update version number with x.y.z in build/perl/virtualmin/dolibarr.pl +- Update version number with x.y in build/doxygen/dolibarr-doxygen.doxyfile - Commit all changes. - Add a Tag (x.y.betaz_YYYYMMDD) and push it: git push --tags - Create a branch (x.y). diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index fb1deb610c5..92b097801b4 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -331,6 +331,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3 +- Upstream release + * Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index f5532934b35..b2b7e745b34 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -567,6 +567,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3 +- Upstream release + * Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index da1aa858535..658601980f7 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -336,6 +336,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3 +- Upstream release + * Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 9ae11b015f8..d11630c3bb9 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -347,6 +347,9 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog +* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3 +- Upstream release + * Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 95192ea74b1..95916901c6d 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -29,7 +29,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.4'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.5'); if (! defined('EURO')) define('EURO',chr(128)); // Define syslog constants From adb70ecf24b0c6e4c66c223a75319cf61df70665 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 17:40:07 +0200 Subject: [PATCH 16/23] Fix: [ bug #1528 ] Leopard Services numeration module description is not translated. --- htdocs/core/modules/product/mod_codeproduct_leopard.php | 1 + htdocs/core/modules/societe/mod_codeclient_leopard.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 0864eeb7d77..7d9e0760a35 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -68,6 +68,7 @@ class mod_codeproduct_leopard extends ModeleProductCode */ function info($langs) { + $langs->load("companies"); return $langs->trans("LeopardNumRefModelDesc"); } diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index affee5274ca..8ecb43a8ac7 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -67,6 +67,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode */ function info($langs) { + $langs->load("companies"); return $langs->trans("LeopardNumRefModelDesc"); } From 41ab5a0ce2e4473f1a68641e7d36837a4469cd0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 19:02:32 +0200 Subject: [PATCH 17/23] Fix: date was not saved if not in future. --- .../class/opensurveysondage.class.php | 11 +++- htdocs/opensurvey/wizard/choix_date.php | 61 ++++++++++--------- htdocs/opensurvey/wizard/create_survey.php | 6 +- 3 files changed, 45 insertions(+), 33 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 37c04e50a29..c20c4ebca0d 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2013-2014 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -100,7 +100,12 @@ class Opensurveysondage extends CommonObject $this->cleanParameters(); // Check parameters - // Put here code to add control on parameters values + if (! $this->date_fin > 0) + { + $this->error='BadValueForEndDate'; + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); + return -1; + } // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_sondage("; diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 6e10e10778a..e835c274e7d 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -30,10 +30,9 @@ require_once(DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"); // Security check if (!$user->rights->opensurvey->write) accessforbidden(); -//le format du sondage est DATE +// Survey type is DATE $_SESSION["formatsondage"] = "D"; -//traitement de l'entrée des heures dans les cases texte $erreur = false; /* @@ -44,15 +43,16 @@ $erreur = false; if (GETPOST('confirmation')) { - //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) + // We save hours entered + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); - - for ($i = 0; $i < $nbofchoice; $i++) { - //affichage des 5 cases horaires - for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { - + + for ($i = 0; $i < $nbofchoice; $i++) + { + // Show hours choices + for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) + { $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; $case = $j + 1; @@ -128,7 +128,7 @@ if (GETPOST('confirmation')) $errheure[$i][$j]=true; $erreur=true; } - + if (issetAndNoEmpty('horaires'.$i, $_SESSION) === false || issetAndNoEmpty($j, $_SESSION['horaires'.$i]) === false) { if (issetAndNoEmpty('horaires'.$i, $_SESSION) === true) { $_SESSION["horaires$i"][$j] = ''; @@ -138,7 +138,7 @@ if (GETPOST('confirmation')) } } } - + if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") { $choixdate.=","; $choixdate .= $_SESSION["totalchoixjour"][$i]; @@ -154,7 +154,7 @@ if (GETPOST('confirmation')) } } } - + if (isset($errheure)) { setEventMessage($langs->trans("ErrorBadFormat"), 'errors'); } @@ -165,17 +165,22 @@ if (GETPOST('confirmation')) setEventMessage($langs->trans("MoreChoices"), 'errors'); $erreur=true; } - - if (!$erreur) { + + // Add survey into database + if (!$erreur) + { $_SESSION["toutchoix"]=substr("$choixdate",1); + ajouter_sondage(); } } // Reset days -if (GETPOST('reset')) { +if (GETPOST('reset')) +{ $nbofchoice=count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) { + for ($i = 0; $i < $nbofchoice; $i++) + { for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { unset($_SESSION["horaires$i"][$j]); } @@ -238,7 +243,7 @@ if (issetAndNoEmpty('moisavant_x') || issetAndNoEmpty('moisavant')) { } //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { @@ -260,10 +265,10 @@ if (issetAndNoEmpty('moisapres_x') || issetAndNoEmpty('moisapres')) { } //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) + for ($i = 0; $i < $nbofchoice; $i++) { //affichage des 5 cases horaires for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { @@ -278,7 +283,7 @@ if (issetAndNoEmpty('anneeavant_x') || issetAndNoEmpty('anneeavant')) { $_SESSION["annee"] -= 1; //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { @@ -295,7 +300,7 @@ if (issetAndNoEmpty('anneeapres_x') || issetAndNoEmpty('anneeapres')) { $_SESSION["annee"] += 1; //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { @@ -361,7 +366,7 @@ if (issetAndNoEmpty('choixjourajout')) { // Test pour éviter les doublons dans la variable qui contient toutes les dates $journeuf = true; - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('choixjourajout') === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('choixjourajout') === true) { $nbofchoice=count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { @@ -411,9 +416,9 @@ if (issetAndNoEmpty('choixjourretrait')) { } } - for ($i = 0; $i < $nbofchoice; $i++) + for ($i = 0; $i < $nbofchoice; $i++) { - if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $_POST["choixjourretrait"][0], $_SESSION["annee"])) + if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $_POST["choixjourretrait"][0], $_SESSION["annee"])) { for ($j = $i; $j < $nbofchoice; $j++) { $k = $j+1; @@ -458,9 +463,9 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) { if ($i < $premierjourmois) { print ''."\n"; } else { - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { - $nbofchoice=count($_SESSION["totalchoixjour"]); + $nbofchoice=count($_SESSION["totalchoixjour"]); for ($j = 0; $j < $nbofchoice; $j++) { //affichage des boutons ROUGES if (date("j", $_SESSION["totalchoixjour"][$j]) == $numerojour && date("n", $_SESSION["totalchoixjour"][$j]) == $_SESSION["mois"] && date("Y", $_SESSION["totalchoixjour"][$j]) == $_SESSION["annee"]) { @@ -513,7 +518,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) //affichage de la liste des jours choisis $nbofchoice=count($_SESSION["totalchoixjour"]); - + for ($i=0; $i<$nbofchoice; $i++) { print ''."\n"; @@ -525,7 +530,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) if (isset($errheure[$i][$j]) && $errheure[$i][$j]) { print ''."\n"; } else { //sinon la case est vide normalement - + print ''."\n"; } } diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index b63536247f5..cacc0ad8155 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -79,10 +79,10 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) $testdate = false; $champdatefin = dol_mktime(0,0,0,GETPOST('champdatefinmonth'),GETPOST('champdatefinday'),GETPOST('champdatefinyear')); - if (GETPOST('champdatefin') && $champdatefin) // A date was provided + if (GETPOST('champdatefin') && ($champdatefin > 0)) // A date was provided { // Expire date is not before today - if ($champdatefin - dol_now() > 0) + if ($champdatefin >= dol_now()) { $testdate = true; $_SESSION['champdatefin'] = dol_print_date($champdatefin,'dayrfc'); @@ -90,6 +90,8 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) else { $testdate = true; + //$testdate = false; + //$_SESSION['champdatefin'] = dol_print_date($champdatefin,'dayrfc'); //setEventMessage($langs->trans('ExpiredDate'),'errors'); } } From 0ca72dcfea0b5ddccf5a5ba34073235402ff62d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Jul 2014 23:51:58 +0200 Subject: [PATCH 18/23] Fix: Restore compatibility with old modules. --- htdocs/core/lib/admin.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 19441e507aa..c389f442830 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -889,7 +889,7 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql { while (($file = readdir($handle))!==false) { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') + if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') { if (is_dir($dirroot . '/' . $file . '/core/modules/')) { @@ -900,7 +900,6 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql closedir($handle); } } - //var_dump($modulesdir); foreach ($modulesdir as $dir) { @@ -961,7 +960,8 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql // Complete arrays //&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond - //$objMod + if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility + if (! empty($objMod->dictionaries)) { //var_dump($objMod->dictionaries['tabname']); From 1a96bc0f30d7a8f7d214a052067b3da1bddb254b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jul 2014 20:30:31 +0200 Subject: [PATCH 19/23] Fix: Bad url for cron Fix: must use html syntax, not xml --- htdocs/core/lib/cron.lib.php | 4 ++-- htdocs/cron/list.php | 8 ++++---- htdocs/public/cron/cron_run_jobs.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 34a21c83dab..79e23e90089 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -93,10 +93,10 @@ function dol_print_cron_urls() // Cron launch print ''.$langs->trans("URLToLaunchCronJobs").':
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login; print img_picto('','object_globe.png').' '.$url."
\n"; print ' '.$langs->trans("OrToLaunchASpecificJob").'
'; - $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; + $url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid'; print img_picto('','object_globe.png').' '.$url."
\n"; print '
'; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 453de0d8515..dd9eb8b6289 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -123,13 +123,13 @@ print $langs->trans('CronInfo'); if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1); - + } if ($action == 'execute') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1); - + } // liste des jobs creer @@ -218,13 +218,13 @@ if (count($object->lines) > 0) print $langs->trans('CronObject').':'. $line->objectname.'
'; print $langs->trans('CronMethod').':'. $line->methodename; if(!empty($line->params)) { - print '
'.$langs->trans('CronArgs').':'. $line->params; + print '
'.$langs->trans('CronArgs').':'. $line->params; } }elseif ($line->jobtype=='command') { print $langs->trans('CronCommand').':'. dol_trunc($line->command); if(!empty($line->params)) { - print '
'.$langs->trans('CronArgs').':'. $line->params; + print '
'.$langs->trans('CronArgs').':'. $line->params; } } print ''; diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index cb4ae42ff13..e6333526c7f 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -59,19 +59,19 @@ $langs->load("cron"); $key = GETPOST('securitykey','alpha'); if (empty($key)) { - echo 'securitykey is require'; + echo 'Securitykey is required. Check setup of cron jobs module.'; exit; } if($key != $conf->global->CRON_KEY) { - echo 'securitykey is wrong'; + echo 'Securitykey is wrong.'; exit; } // Check the key, avoid that a stranger starts cron $userlogin = GETPOST('userlogin','alpha'); if (empty($userlogin)) { - echo 'userlogin is require'; + echo 'Userlogin is required.'; exit; } require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -175,7 +175,7 @@ if (is_array($object->lines) && (count($object->lines)>0)) } else { - echo "No active jobs found"; + echo "Result: No active jobs found."; } $db->close(); From 6d7b50d5d4bfb33d7097c1c3917b9cadc76c39c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jul 2014 19:58:29 +0200 Subject: [PATCH 20/23] Fix: [ bug #1541 ] Surveys menu is not shown up if Export/Import module is not enabled. --- htdocs/core/menus/standard/eldy.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9e6eb820e8d..0ed33bbaae4 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -217,9 +217,9 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0) // Tools - $tmpentry=array('enabled'=>(! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled)), - 'perms'=>(! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run)), - 'module'=>'mailing|export|import'); + $tmpentry=array('enabled'=>(! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled) || ! empty($conf->opensurvey->enabled)), + 'perms'=>(! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run) || ! empty($user->rights->opensurvey->read)), + 'module'=>'mailing|export|import|opensurvey'); $showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal); if ($showmode) { From 21c7972f7eb0cf565129f1ed9e803e5171283711 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jul 2014 20:00:46 +0200 Subject: [PATCH 21/23] Fix: [ bug #1541 ] Surveys menu is not shown up if Export/Import module is not enabled. --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index f8e5828bbd1..cb650880ccd 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -15,7 +15,7 @@ insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, left insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run', '', 2, 90, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import|opensurvey', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read', '', 2, 90, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('boutique', '! empty($conf->boutique->enabled)', 11__+MAX_llx_menu__, __HANDLER__, 'top', 'shop', '', 0, '/boutique/index.php?mainmenu=shop&leftmenu=', 'OSCommerce', -1, 'shop', '', '', 0, 100, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('hrm', '$conf->holiday->enabled || $conf->deplacement->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/compta/hrm.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->holiday->write || $user->rights->deplacement->lire', '', 0, 80, __ENTITY__); From 096a61d5c0bb06c5ca471e3d7518eecae833311e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jul 2014 20:12:01 +0200 Subject: [PATCH 22/23] Fix: [ bug #1542 ] extrafields.class.php, showOutputField wrong translate. --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index de8e5fc636d..d5b49ea9ef2 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -979,7 +979,7 @@ class ExtraFields { foreach ($fields_label as $field_toshow) { - $translabel=$langs->trans($field_toshow); + $translabel=$langs->trans($obj->field_toshow); if ($translabel!=$field_toshow) { $value.=dol_trunc($translabel,18).' '; }else { From c9d27383a4c735c42f9c0fb1077fafbba1911b4e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jul 2014 00:50:57 +0200 Subject: [PATCH 23/23] Fix: When option to use optimize display for text borwser and blin person is on, box addon was broken. --- .../boxes/box_graph_invoices_permonth.php | 6 ++++++ .../box_graph_invoices_supplier_permonth.php | 6 ++++++ .../core/boxes/box_graph_orders_permonth.php | 6 ++++++ .../box_graph_orders_supplier_permonth.php | 6 ++++++ .../boxes/box_graph_product_distribution.php | 6 ++++++ .../boxes/box_graph_propales_permonth.php | 6 ++++++ htdocs/core/class/html.formother.class.php | 20 +++++++++++++++++-- htdocs/index.php | 11 ++++++++++ htdocs/langs/en_US/errors.lang | 1 + htdocs/langs/en_US/main.lang | 1 + 10 files changed, 67 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index bece2e55c6f..ad7cbc0e29c 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -197,6 +197,12 @@ class box_graph_invoices_permonth extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 4214a9a81b8..58d3a27f834 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -196,6 +196,12 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 7389c2c6b8b..81c9185c68f 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -197,6 +197,12 @@ class box_graph_orders_permonth extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 788528b501f..98779836576 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -196,6 +196,12 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index a05c4baf5ad..0029866b75a 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -301,6 +301,12 @@ class box_graph_product_distribution extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index d80d40c64f2..61e83f3cd60 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -202,6 +202,12 @@ class box_graph_propales_permonth extends ModeleBoxes } } + if (empty($conf->use_javascript_ajax)) + { + $langs->load("errors"); + $mesg=$langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); + } + if (! $mesg) { $stringtoshow=''; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index b6065909ade..fe1cd8ddb6b 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -927,6 +927,7 @@ class FormOther $arrayboxtoactivatelabel=array(); if (! empty($user->conf->$confuserzone)) { + $boxorder=''; $langs->load("boxes"); // Load label of boxes foreach($boxactivated as $box) { @@ -935,8 +936,23 @@ class FormOther if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')'; $arrayboxtoactivatelabel[$box->id]=$label; // We keep only boxes not shown for user, to show into combo list } - // Class Form must have been already loaded - $selectboxlist=Form::selectarray('boxcombo', $arrayboxtoactivatelabel,'',1); + foreach($boxidactivatedforuser as $boxid) + { + if (empty($boxorder)) $boxorder.='A:'; + $boxorder.=$boxid.','; + } + + //var_dump($boxidactivatedforuser); + + // Class Form must have been already loaded + $selectboxlist.=''; + $selectboxlist.=''; + $selectboxlist.=''; + $selectboxlist.=''; + $selectboxlist.=''; + $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel,'',1); + if (empty($conf->use_javascript_ajax)) $selectboxlist.=' '; + $selectboxlist.=''; } // Javascript code for dynamic actions diff --git a/htdocs/index.php b/htdocs/index.php index 3b0cc3c5306..d18c05d4f12 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -46,6 +46,17 @@ if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_IN exit; } +if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) +{ + require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; + $zone=GETPOST('areacode'); + $userid=GETPOST('userid'); + $boxorder=GETPOST('boxorder'); + $boxorder.=GETPOST('boxcombo'); + + $result=InfoBox::saveboxorder($db,$zone,$boxorder,$userid); +} + /* diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 93defd10ed5..b874ef58f07 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -153,3 +153,4 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). WarningNotRelevant=Irrelevant operation for this dataset +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. \ No newline at end of file diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index caddad9d997..9b8f06f262e 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -674,6 +674,7 @@ SetDemandReason=Set source ViewPrivateNote=View notes XMoreLines=%s line(s) hidden PublicUrl=Public URL +AddBox=Add box # Week day Monday=Monday