From 20c50e809d848a335195df76d54b82964ebd7e18 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 May 2018 10:43:40 +0200 Subject: [PATCH 01/23] Start 6.0.8 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 7f5b0f5e746..9ab5de809b9 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.7'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.8'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From d1fd39936c8079dc642231fe54ff2a2265b91223 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 8 May 2018 09:04:04 +0200 Subject: [PATCH 02/23] Fix: Bug on invoice status list on left menu --- htdocs/core/menus/standard/eldy.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 171c2a52f8d..0104f787bf8 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2012-2015 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Marcos García + * Copyright (C) 2018 Ferran Marcet * * 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 @@ -802,7 +803,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/compta/facture/card.php?action=create",$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, '', $mainmenu, 'customers_bills_list'); - if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|draft|notpaid|paid|canceled)$/', $leftmenu)) + if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) { $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0",$langs->trans("BillShortStatusDraft"),2,$user->rights->facture->lire); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1",$langs->trans("BillShortStatusNotPaid"),2,$user->rights->facture->lire); From 842c6168a25cbd90d3b8d616b8d5841662e3aab9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 May 2018 11:50:35 +0200 Subject: [PATCH 03/23] FIX #8762 --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 05c5982dc00..e09b6cd2bb0 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -498,7 +498,7 @@ class FormFile $modellist=ModelePDFCards::liste_modeles($this->db); } } - elseif ($modulepart == 'agenda') + elseif ($modulepart == 'agenda' || $modulepart == 'actions') { if (is_array($genallowed)) $modellist=$genallowed; else From 2f1ac6fad87b6c1dc47f8aba3136772ae976a59c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 13 May 2018 20:35:07 +0200 Subject: [PATCH 04/23] Fix : Double WHERE on admin/journal_list.php --- htdocs/accountancy/admin/journals_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 37c166dabe9..d65f7eeba7d 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -86,7 +86,7 @@ $tablib[35]= "DictionaryAccountancyJournal"; // Requests to extract data $tabsql=array(); -$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a WHERE a.entity=".$conf->entity; +$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a"; // Criteria to sort dictionaries $tabsqlsort=array(); From ca09fddfb32aa5e583b33277ad4acd7462119cd0 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 14 May 2018 15:16:07 +0200 Subject: [PATCH 05/23] FIX : Select user on add time spent form --- htdocs/projet/tasks/time.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 79ff8f9d9b0..2da534e53a0 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -568,7 +568,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $contactsoftask=$object->getListContactId('internal'); if (count($contactsoftask)>0) { - $userid=$contactsoftask[0]; + if(in_array($user->id, $contactsoftask)) $userid = $user->id; + else $userid=$contactsoftask[0]; print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsoftask, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToTheTask"), 'maxwidth200'); } else From 9552a914d82d233dc928841a5e02c305adf7af8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 May 2018 15:16:19 +0200 Subject: [PATCH 06/23] FIX link for projets not linked to a thirdparties --- htdocs/projet/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index c922ca0514b..1ff9e22041d 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -290,7 +290,10 @@ if ( $resql ) print $langs->trans("OthersNotLinkedToThirdParty"); } print ''; - print ''.$obj->nb.''; + print ''; + if ($obj->socid) print ''.$obj->nb.''; + else print ''.$obj->nb.''; + print ''; print "\n"; $i++; From a46362a71f9709400f90a676e4b800de15ea42b3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 May 2018 15:17:10 +0200 Subject: [PATCH 07/23] Prepare 7.0.3 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 99a6b550f45..b8126b4fcc8 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); -if (! defined('DOL_VERSION')) define('DOL_VERSION','7.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (! defined('DOL_VERSION')) define('DOL_VERSION','7.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (! defined('EURO')) define('EURO',chr(128)); From 88bc2dd41629710baa007f6852d2e89d6be3d237 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 14 May 2018 20:59:38 +0200 Subject: [PATCH 08/23] Correct insert --- htdocs/accountancy/admin/journals_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index d65f7eeba7d..971fdc20811 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -102,7 +102,7 @@ $tabfieldvalue[35]= "code,label,nature"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert=array(); -$tabfieldinsert[35]= "code,label,nature,entity"; +$tabfieldinsert[35]= "code,label,nature"; // Nom du rowid si le champ n'est pas de type autoincrement // Example: "" if id field is "rowid" and has autoincrement on From 630e38072b84c68a3a4dd5ebc927e78f7b11ac74 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 15 May 2018 17:02:54 +0200 Subject: [PATCH 09/23] fix SQL and add hook --- htdocs/projet/contact.php | 37 +++++++++++++++++++------------------ htdocs/projet/element.php | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 72b82ac2bb0..6da1028d473 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -49,6 +49,7 @@ $socid=0; //if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id,'projet&project'); +$hookmanager->initHooks(array('projectcontactcard','globalcard')); /* * Actions @@ -150,26 +151,26 @@ if ($id > 0 || ! empty($ref)) // Project card - + $linkback = ''.$langs->trans("BackToList").''; - + $morehtmlref='
'; // Title $morehtmlref.=$object->title; // Thirdparty - if ($object->thirdparty->id > 0) + if ($object->thirdparty->id > 0) { $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref.='
'; - + // Define a complementary filter for search of next/prev ref. if (! $user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } - + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -178,7 +179,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print ''; - + // Visibility print ''; - + // Opportunity percent print ''; } - + // Date start - end print '
'.$langs->trans("Visibility").''; if ($object->public) print $langs->trans('SharedProject'); @@ -192,7 +193,7 @@ if ($id > 0 || ! empty($ref)) $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); if ($code) print $langs->trans("OppStatus".$code); print '
'.$langs->trans("OpportunityProbability").''; if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %'; @@ -203,7 +204,7 @@ if ($id > 0 || ! empty($ref)) if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency); print '
'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; $start = dol_print_date($object->date_start,'dayhour'); @@ -222,40 +223,40 @@ if ($id > 0 || ! empty($ref)) // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; - + print "
"; print ''; print '
'; print '
'; print '
'; - + print ''; - + // Description print ''; - + // Categories if ($conf->categorie->enabled) { print '"; } - + print '
'.$langs->trans("Description").''; print nl2br($object->description); print '
'.$langs->trans("Categories").''; print $form->showCategories($object->id,'project',1); print "
'; - + print '
'; print '
'; print ''; - + print '
'; - + dol_fiche_end(); - + print '
'; - + // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl')); foreach($dirtpls as $reldir) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 17b3cbd65f9..85bbf906fef 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -145,7 +145,7 @@ $morehtmlref.=''; if (! $user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); - $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; + $object->next_prev_filter=" te.rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); From 5c727c077b34a335f0a4916c18440b3db1464b9c Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Wed, 16 May 2018 16:34:19 +0200 Subject: [PATCH 10/23] fix task contact card without withproject parameters --- htdocs/projet/tasks/contact.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index a2db82fc0ed..fad5466cb7f 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -303,6 +303,7 @@ if ($id > 0 || ! empty($ref)) // Project if (empty($withproject)) { + $result=$projectstatic->fetch($object->fk_project); $morehtmlref.='
'; $morehtmlref.=$langs->trans("Project").': '; $morehtmlref.=$projectstatic->getNomUrl(1); @@ -310,7 +311,11 @@ if ($id > 0 || ! empty($ref)) // Third party $morehtmlref.=$langs->trans("ThirdParty").': '; - $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); + if($projectstatic->socid>0) { + $projectstatic->fetch_thirdparty(); + $morehtmlref.=$projectstatic->thirdparty->getNomUrl(1); + } + $morehtmlref.='
'; } From 5804d1d4a302915551f97aef1006d8f4fb7d2a0f Mon Sep 17 00:00:00 2001 From: Inovea Conseil Date: Thu, 17 May 2018 10:16:44 +0200 Subject: [PATCH 11/23] Fix missing params for commonGenerateDocument ADD param moreparams for compatibility with commonGenerateDocument --- htdocs/compta/facture/class/facture.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b73307277c8..1d4dd3a45a9 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -15,6 +15,7 @@ * Copyright (C) 2013 Cedric Gross * Copyright (C) 2013 Florian Henry * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2018 Nicolas ZABOURI * * 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 @@ -3979,9 +3980,10 @@ class Facture extends CommonInvoice * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref + * @param null|array $moreparams Array to provide more information * @return int <0 if KO, >0 if OK */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) + public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null) { global $conf,$langs; @@ -4000,7 +4002,7 @@ class Facture extends CommonInvoice $modelpath = "core/modules/facture/doc/"; - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } /** From dc7a1610e78d89e7489eaff5da52214882076f03 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 17 May 2018 18:56:01 +0200 Subject: [PATCH 12/23] Fix: extrafiels is not passing orders to invoice --- htdocs/commande/orderstoinvoice.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 40071a0b21d..49a6a88a78f 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2017 Juanjo Menent + * Copyright (C) 2012-2018 Juanjo Menent * Copyright (C) 2015 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -285,6 +285,13 @@ if (($action == 'create' || $action == 'add') && !$error) { $fk_parent_line = 0; } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_options = $lines[$i]->array_options; + } + $result = $object->addline( $desc, $lines[$i]->subprice, @@ -309,7 +316,8 @@ if (($action == 'create' || $action == 'add') && !$error) $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, - $lines[$i]->label + $lines[$i]->label, + $array_options ); if ($result > 0) { From 0aa8c6f498eacb95248bb263cc6937ed7921d9d5 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 17 May 2018 19:05:25 +0200 Subject: [PATCH 13/23] Fix: extrafiels is not passing orders to invoice --- htdocs/core/actions_massactions.inc.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 5a713168c48..6f07abd2c55 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2018 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 @@ -601,6 +602,13 @@ if ($massaction == 'confirm_createbills') { $fk_parent_line = 0; } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_options = $lines[$i]->array_options; + } + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -625,7 +633,8 @@ if ($massaction == 'confirm_createbills') $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, - $lines[$i]->label + $lines[$i]->label, + $array_options ); if ($result > 0) { From 90d2ccc79caff16e5efd4275f514bc8679ce743f Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 17 May 2018 21:29:15 +0200 Subject: [PATCH 14/23] Fix product vat update error handling Product vat update does not show update error if update result negative. --- htdocs/product/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index a2afb5f9bb8..fc5c20c3d1a 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -152,7 +152,7 @@ if (empty($reshook)) $db->begin(); $resql = $object->update($object->id, $user); - if (! $resql) + if (! $resql || $resql < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); From 26e10caa7d4fa8ff4ce12b1d2cab6df24621b3c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 May 2018 09:15:18 +0200 Subject: [PATCH 15/23] FIX #8813 --- htdocs/accountancy/class/accountingaccount.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 6b7e925832b..3f5c11691ad 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -84,7 +84,8 @@ class AccountingAccount extends CommonObject * @param int $limittocurrentchart 1=Do not load record if it is into another accounting system * @return int <0 if KO, 0 if not found, Id of record if OK and found */ - function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) { + function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) + { global $conf; if ($rowid || $account_number) { @@ -96,10 +97,10 @@ class AccountingAccount extends CommonObject if ($rowid) { $sql .= " a.rowid = '" . $rowid . "'"; } elseif ($account_number) { - $sql .= " a.account_number = '" . $account_number . "'"; + $sql .= " a.account_number = '" . $this->db->escape($account_number) . "'"; } if (! empty($limittocurrentchart)) { - $sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; + $sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')'; } dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG); @@ -203,7 +204,7 @@ class AccountingAccount extends CommonObject $sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->db->escape($this->account_number) . "'"); $sql .= ", " . (empty($this->account_parent) ? 'NULL' : "'" . $this->db->escape($this->account_parent) . "'"); $sql .= ", " . (empty($this->label) ? 'NULL' : "'" . $this->db->escape($this->label) . "'"); - $sql .= ", " . (empty($this->account_category) ? 'NULL' : "'" . $this->db->escape($this->account_category) . "'"); + $sql .= ", " . (empty($this->account_category) ? '0' : $this->db->escape($this->account_category)); $sql .= ", " . $user->id; $sql .= ", " . (! isset($this->active) ? 'NULL' : $this->db->escape($this->active)); $sql .= ")"; @@ -274,7 +275,7 @@ class AccountingAccount extends CommonObject $sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'"; $sql .= " , account_parent = '" . $this->db->escape($this->account_parent) . "'"; $sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "null"); - $sql .= " , fk_accounting_category = '" . $this->db->escape($this->account_category) . "'"; + $sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category)); $sql .= " , fk_user_modif = " . $user->id; $sql .= " , active = " . $this->active; $sql .= " WHERE rowid = " . $this->id; From dd259043cd3522169081bbfd320597f40fc85ad2 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 18 May 2018 09:20:18 +0200 Subject: [PATCH 16/23] Fix: Cashdesk does not apply multi-price or price per customer --- htdocs/cashdesk/facturation_verif.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index ec21de2225d..8867a61e80a 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2010 Laurent Destailleur + * Copyright (C) 2018 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 @@ -145,7 +146,8 @@ switch (GETPOST('action','alpha')) $obj_facturation->id($ret['rowid']); $obj_facturation->ref($ret['ref']); $obj_facturation->stock($ret['reel']); - $obj_facturation->prix($ret['price']); + //$obj_facturation->prix($ret['price']); + $obj_facturation->prix($pu_ht); $vatrate = $tva_tx; From 80bce6b62d43537d56e9baaab4fb11ce573cfbca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 May 2018 09:25:59 +0200 Subject: [PATCH 17/23] Add phpunit for accountingaccount --- test/phpunit/CommandeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index 1d0e4fbf616..443bd1d1932 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -174,7 +174,7 @@ class CommandeTest extends PHPUnit_Framework_TestCase * @depends testCommandeFetch * The depends says test is run only if previous is ok */ - public function testCommandUpdate($localobject) + public function testCommandeUpdate($localobject) { global $conf,$user,$langs,$db; $conf=$this->savconf; @@ -196,7 +196,7 @@ class CommandeTest extends PHPUnit_Framework_TestCase * @param Object $localobject Order * @return Commande * - * @depends testCommandUpdate + * @depends testCommandeUpdate * The depends says test is run only if previous is ok */ public function testCommandeValid($localobject) From e2369dea295a2d73df3c18660b42aeee006b350c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 May 2018 11:17:21 +0200 Subject: [PATCH 18/23] FIX #8722 --- htdocs/compta/facture/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 56b7adc01d5..e3e0f60ce31 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -720,7 +720,6 @@ if (empty($reshook)) $sql.= ' WHERE pf.fk_facture = '.$object->id; $sql.= ' AND pf.fk_paiement = p.rowid'; $sql.= ' AND p.entity IN (' . getEntity('facture').')'; - $sql.= ' ORDER BY p.datep, p.tms'; $resql = $db->query($sql); if (! $resql) dol_print_error($db); From 79bbeb05aed3cb97981b8391cf598a6d046d38fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 May 2018 11:17:33 +0200 Subject: [PATCH 19/23] Add missing phpunit tests --- test/phpunit/AccountingAccount.php | 225 +++++++++++++++++++++++++++++ test/phpunit/AllTests.php | 3 + 2 files changed, 228 insertions(+) create mode 100644 test/phpunit/AccountingAccount.php diff --git a/test/phpunit/AccountingAccount.php b/test/phpunit/AccountingAccount.php new file mode 100644 index 00000000000..ba7f567b4a0 --- /dev/null +++ b/test/phpunit/AccountingAccount.php @@ -0,0 +1,225 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file test/phpunit/AccountingAccount.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +//require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/accountancy/class/accountingaccount.class.php'; + +if (empty($user->id)) { + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class AccountingAccountTest extends PHPUnit_Framework_TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return AccountingAccountTest + */ + function __construct() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + + // Static methods + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + if (empty($conf->accounting->enabled)) { print __METHOD__." module accouting must be enabled.\n"; die(); } + + print __METHOD__."\n"; + } + + // tear down after class + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testAccountingAccountCreate + * + * @return void + */ + public function testAccountingAccountCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new AccountingAccount($this->savdb); + $localobject->fk_pcg_version = 'PCG99-ABREGE'; + $localobject->account_category = 0; + $localobject->pcg_type = 'XXXXX'; + $localobject->pcg_subtype = 'XXXXX'; + $localobject->account_parent = 0; + $localobject->label = 'Account specimen'; + $localobject->active = 0; + $result=$localobject->create($user); + + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } + + /** + * testAccountingAccountFetch + * + * @param int $id Id order + * @return AccountingAccount + * + * @depends testAccountingAccountCreate + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new AccountingAccount($this->savdb); + $result=$localobject->fetch($id); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } + + /** + * testAccountingAccountUpdate + * + * @param Object $localobject AccountingAccount + * @return AccountingAccount + * + * @depends testAccountingAccountFetch + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject->label='New label'; + $result=$localobject->update($user); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject->id; + } + + /** + * testAccountingAccountDelete + * + * @param int $id Id of order + * @return void + * + * @depends testAccountingAccountUpdate + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new AccountingAccount($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); + + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } + +} diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index d1f0e8b5158..baf6b960e2b 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -200,6 +200,9 @@ class AllTests require_once dirname(__FILE__).'/CategorieTest.php'; $suite->addTestSuite('CategorieTest'); + require_once dirname(__FILE__).'/AccountingAccountTest.php'; + $suite->addTestSuite('AccountingAccountTest'); + require_once dirname(__FILE__).'/RestAPIUserTest.php'; $suite->addTestSuite('RestAPIUserTest'); From 24d353c9a75b80984c685e63d4c0020d0ad3b54c Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Thu, 10 May 2018 16:08:45 +0200 Subject: [PATCH 20/23] inversion of dateo and datee --- htdocs/fichinter/class/fichinter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 4dee1f94f24..73e71b46398 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -369,8 +369,8 @@ class Fichinter extends CommonObject $this->statut = $obj->fk_statut; $this->duration = $obj->duree; $this->datec = $this->db->jdate($obj->datec); - $this->datee = $this->db->jdate($obj->dateo); - $this->dateo = $this->db->jdate($obj->datee); + $this->dateo = $this->db->jdate($obj->dateo); + $this->datee = $this->db->jdate($obj->datee); $this->datet = $this->db->jdate($obj->datet); $this->datev = $this->db->jdate($obj->datev); $this->datem = $this->db->jdate($obj->datem); From e5561ecdfb92576509bc1892dc7fe0d0ca919ba4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 May 2018 22:14:15 +0200 Subject: [PATCH 21/23] Remove useless files --- .../template/dev/codesniffer/DolibarrPSR2.xml | 12 - .../template/dev/git-hooks/README | 15 - .../template/dev/git-hooks/post-commit | 2 - .../template/dev/git-hooks/pre-commit | 2 - .../template/dev/git-hooks/pre-push | 2 - .../modulebuilder/template/dev/img/README.md | 53 --- .../template/dev/img/gfdl-129x44.png | Bin 4709 -> 0 bytes .../template/dev/img/gfdl-66x23.png | Bin 2453 -> 0 bytes .../template/dev/img/gfdl-logo.svg | 110 ----- .../template/dev/img/gpl-v3-logo.svg | 389 ------------------ .../template/dev/img/gplv3-127x51.png | Bin 3471 -> 0 bytes .../template/dev/img/gplv3-88x31.png | Bin 2666 -> 0 bytes .../template/dev/img/mymodule.svg | 70 ---- 13 files changed, 655 deletions(-) delete mode 100644 htdocs/modulebuilder/template/dev/codesniffer/DolibarrPSR2.xml delete mode 100644 htdocs/modulebuilder/template/dev/git-hooks/README delete mode 100755 htdocs/modulebuilder/template/dev/git-hooks/post-commit delete mode 100755 htdocs/modulebuilder/template/dev/git-hooks/pre-commit delete mode 100755 htdocs/modulebuilder/template/dev/git-hooks/pre-push delete mode 100644 htdocs/modulebuilder/template/dev/img/README.md delete mode 100644 htdocs/modulebuilder/template/dev/img/gfdl-129x44.png delete mode 100644 htdocs/modulebuilder/template/dev/img/gfdl-66x23.png delete mode 100644 htdocs/modulebuilder/template/dev/img/gfdl-logo.svg delete mode 100644 htdocs/modulebuilder/template/dev/img/gpl-v3-logo.svg delete mode 100644 htdocs/modulebuilder/template/dev/img/gplv3-127x51.png delete mode 100644 htdocs/modulebuilder/template/dev/img/gplv3-88x31.png delete mode 100644 htdocs/modulebuilder/template/dev/img/mymodule.svg diff --git a/htdocs/modulebuilder/template/dev/codesniffer/DolibarrPSR2.xml b/htdocs/modulebuilder/template/dev/codesniffer/DolibarrPSR2.xml deleted file mode 100644 index 48d3f5d8d1d..00000000000 --- a/htdocs/modulebuilder/template/dev/codesniffer/DolibarrPSR2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - The PSR2 standard with Dolibarr quirks. - - - - - - - - - \ No newline at end of file diff --git a/htdocs/modulebuilder/template/dev/git-hooks/README b/htdocs/modulebuilder/template/dev/git-hooks/README deleted file mode 100644 index a5d024c1bf5..00000000000 --- a/htdocs/modulebuilder/template/dev/git-hooks/README +++ /dev/null @@ -1,15 +0,0 @@ -# Git hooks - -Optional [GIT hooks](https://git-scm.com/book/it/v2/Customizing-Git-Git-Hooks) are provided. -These are just wrappers calling composer scripts. -They ensure best practices are followed during module development. - -Install: -```sh -composer git_hooks_install -``` - -Remove: -```sh -composer git_hooks_remove -``` diff --git a/htdocs/modulebuilder/template/dev/git-hooks/post-commit b/htdocs/modulebuilder/template/dev/git-hooks/post-commit deleted file mode 100755 index d44ff23047c..00000000000 --- a/htdocs/modulebuilder/template/dev/git-hooks/post-commit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -composer git_post_commit diff --git a/htdocs/modulebuilder/template/dev/git-hooks/pre-commit b/htdocs/modulebuilder/template/dev/git-hooks/pre-commit deleted file mode 100755 index d8bd735325c..00000000000 --- a/htdocs/modulebuilder/template/dev/git-hooks/pre-commit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -composer git_pre_commit diff --git a/htdocs/modulebuilder/template/dev/git-hooks/pre-push b/htdocs/modulebuilder/template/dev/git-hooks/pre-push deleted file mode 100755 index 61848c24831..00000000000 --- a/htdocs/modulebuilder/template/dev/git-hooks/pre-push +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -composer git_pre_push diff --git a/htdocs/modulebuilder/template/dev/img/README.md b/htdocs/modulebuilder/template/dev/img/README.md deleted file mode 100644 index f44c37f30c6..00000000000 --- a/htdocs/modulebuilder/template/dev/img/README.md +++ /dev/null @@ -1,53 +0,0 @@ -Source images -============= - -Used to generate icons and publication assets. - -Icons ------ - -### Dolibarr - -These resides in the [/img](../../img) directory. - -#### Small - -Required. -Name must begin by ```object_```. - -- Sample: ![object_mymodule.png](../../img/object_mymodule.png) [object_mymodule.png](../../img/object_mymodule.png) -- Size: 14×14 pixels -- Type: PNG - -#### Large - -Optional. - -- Sample: ![mymodule.png](../../img/mymodule.png) [mymodule.png](../../img/mymodule.png) -- Size: 32×32 pixels -- Type: PNG - -### Dolistore - -Designed to fit a 512×512 icon + publisher branding. - -- Size: 704×704 -- Type: PNG - -Export to 512×512 - -### Transifex - -- Size: 96×96 -- Type: PNG - -### Others - -To be on the safe side, you may also want to generate all popular sizes: -- 16×16 -- 32×32 -- 48×48 -- 64×64 -- 128×128 -- 256×256 -- 512×512 diff --git a/htdocs/modulebuilder/template/dev/img/gfdl-129x44.png b/htdocs/modulebuilder/template/dev/img/gfdl-129x44.png deleted file mode 100644 index f2bacfd179a99f051654eaa6ba30089dd8691d7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4709 zcmV-r5}NIaP)00004b3#c}2nYxW zd%dU$Ce+szoV9OJ5UN#164pJ za0WO590CqYl2p=>Ff$P7r^@&6|A`4W3~T|`N|IF5`l0|F2QD6e^`*?6HSvE?zuzWy zyMy#Y+3fr|ot#{w$8|vvh>MLRF(HQFAT4@*Ao`#{g7ksTbDaj8&CYi}{6cX_1=ZDc z)YjEgS$PJ#-O--t24Fq#t|UnZ!Knn_0@G$(KZf-mukiof_TYiBsGJ!$KgNmd)2_I% zupp*S8%=UjB1uCNNE#A{R;xjhB#KKaFq<0@MLTx81H0YsJa;&-+Z{wk7>JLH0>Er; z;H!;4^RM+=*|RqjNs<^kIF5*jFm~)Z&{jb{0u~CuTR_UtA@QW`S$zQ?#cvabLt^BW z3&}d+RDe+<2eatz8QgTkIC63eIdnLOoLnP$`9;oSUJ;E=mUhe3^iorh^99<#UT*QJ z`!Y#+=ygtHpJvG5I6nBtpV+u*45;IFTL%GwW}e%XH%;1QP+nClxU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HzazZOCvbKY_3wN?_0-8% zus`)Z7A}5?ox9Qj*!e*Gf&`KNb$wkYg&2TLD)+rtU_ar>|QxcyhJc?^aiX3reYW6S1s zxah{=ka&36Tds+FS%U9UF=MV?evpJNJL;9f{@(YSFn;VFU4ksqMH~sqdVanuDOuv4N*A5u9 zO39=NBb+O2RL)g4a=FYozh1N>+MILk<#OMXC9F0ZGMS7A?wg51DMzJLy2`NHM8xK` z2RfaG$jC4TCdM#s?C?$xg0;y1!~M6o)<*zXtu|NrR;%c$M}S&|IzUB$TIqFStuJ=& zO6Q?vZ=z84A~rb%xl-G4rgNaRB@lpNKsrF`&Q%P%WI(qF?ZJt+Dd#QZ=lSh4Zwkyu11U**Z!Xw&5P^)DBDsa~Oac(|+vsCW68*B``Pvg{tFKP3<8$Y*-phn5(leR~@6iCL6oxK6TBd1il82 zdhjp0RxO1>qlrNm$MXEMi{)qMWt4gglYy^Q(urnp_V+a2uPm&tcq(?~y*O-5#3mpjZ_ z2o2Q}+dqQX{*hchaxjx7T*jb_W3gIA=FWSDAGW0doD^_wdlqtDch(|WraUuzr+ zjV6vAFQB%r0ZWsWCX2OsnZ9$mev`$DDB6jN3~PSr&KKXdld7n=oDV)9GUg1KF z()HkpAP7p}W?%_0*2{I`Vk5cuqW%O2YtQaYpwpn!2cpyVLKN-P)-|~8QBYUcK$)qU zBS-UHUHWbC+`_I$3I6v8f-nTQ8@LikqLqd46YXzi*`oyiUkJ|Oy#Y9Ta);rZ1+H)Y n1+_VfIJdB^ZFB6>wzmHTwMhFML%JGy00000NkvXXu0mjfK;ap? diff --git a/htdocs/modulebuilder/template/dev/img/gfdl-66x23.png b/htdocs/modulebuilder/template/dev/img/gfdl-66x23.png deleted file mode 100644 index b43479bf3c817b3f780eb453ef3c4e770e1ddc35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2453 zcmV;G32OFElDZw|yVYEgfW}Cy|k! zgx#J@dYX;&G#ew5FXBW=C5OK*=2TfN#mCEavsn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D^)J3Nz}RG#0Wcb+(0`hyo%tQ~Y&I;` zJ@+<#zsgf9<_s0QT;9;oLqwOL?Amp*6K5xHhRw~=x z`IIMD{uV`10Z`QdE|+_NJC~~mfUd5AGJv+Wu23NW?jA2k|9O(4dsgw*w!LiLxP%+0 zO%Ca+Y9Qpx?e?Oo0ovPL?E2^+lEE-!SqBatW6iVgW6PUQIM=7%86g4Lj?853T!rMM zc)r}fg~dxY^759QY<+bXqef+N{6rk*vS0i+-r9q^#|yxe>lXHt&Aa#J zL5nJ{sORo`o*^-J!LVEAKq5d8MP9z^jvMCxX6vIv(yS;d#m6gXZ+DTFX2W4mMv~5| zd%QkGK}41%R5gIluV9Ia=;y=T<3%<~NRk0X37`f7!_F74&yPVAF&cwD{bw#}vTO`p z-WEN)0k7B3tDBe6?e;Kv$}iBPred{C42uMS?zZDp{%b2zgvmTAD=TH_UL!aQhB{#a zM3_zeboylzUaGDCCSi__;aD_I)!uA;PTl>aZDK2Z(k_hHoDtS z1Y_s|IeoXz9}~ - - - - - - - - - image/svg+xml - - - - - - - - - GFDL - - - - - - - diff --git a/htdocs/modulebuilder/template/dev/img/gpl-v3-logo.svg b/htdocs/modulebuilder/template/dev/img/gpl-v3-logo.svg deleted file mode 100644 index 6754c994bda..00000000000 --- a/htdocs/modulebuilder/template/dev/img/gpl-v3-logo.svg +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/htdocs/modulebuilder/template/dev/img/gplv3-127x51.png b/htdocs/modulebuilder/template/dev/img/gplv3-127x51.png deleted file mode 100644 index 3e9136e626683ac152b73bc8fffcb15d1806091a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3471 zcmV;A4RG>_P)00006VoOIv00000008+zyMF)x4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;F;3!pVfB?=REr#P}w zA&>1^Qsfk~9`9#VdhTY}braLXevgkv(Skr0Ob;b4hEa4Clr(F0Nt7=jN#$#3f=$VW6Xh*@(j{vbuYq@sws=T%rnA=_;?S6r{F<3oQhLA!%km*`)>J%^kix9qP z1v?sL+DOad^~K~2`>1tKM}nkZ$U)8a6mp4f90L+Sw&K)-BY_L>M8X6-%l9Eb#xgmh zfShYm1eeYlLfaU zxB)l=KT2>qS>!5In6Rd-HDy~lIT2*`G^8_;rEc(b6MWr+#SwUBGB?6dxHkC}j!oK! zz;_~0a|1Y9RDK@5H`oxM!$qsaQO-_#5coP@eg#v8tgCUkF;j+`WQQ$u;}(Y~d@I>z zm|s`tXXEmt2!55zW_+o`FJ~hATf&SMv@J))j?z)~bG$>SSQW84cBD4tFh}SeaZ$Or z$XVJ%U8RtR4RaZuG(SHp@KXq>Hl~j=mDb0?Q!g6A4GznpC`nKz74W(9nt-o+`Y+AZ zg2R%5;;R(wxi&kx-oTIfSkc?<)ce0EaO{-UB14CvB{Ykt93NVoVS`-t4nAdS6ZqzX z#&eG7Eg4tK!1@8;LVuxWu7>rE!|lhZ8WQ{^O`wNvfEp^g`C>Yr>7udIDw?f6%1}*{ zv!DGaRfB`ivgltnQC*sI#AmV5SPbx2JmeRTAXWii1-+Gf)U$AgjY1|+SS|f=0e;he xS`h1WfrqgdO~;o)s%+--KQtI%YYC5M`ag&6T?f%9P7444002ovPDHLkV1mp+x~c#G diff --git a/htdocs/modulebuilder/template/dev/img/gplv3-88x31.png b/htdocs/modulebuilder/template/dev/img/gplv3-88x31.png deleted file mode 100644 index ba78d4c4941dabf2fcac5409a92ac4c57920c69f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2666 zcmV-w3YGPVP)Px#32;bRa{vGVivR!tivi)#(!2lw00(qQO+^RT0uvMpF24YJ`L;(K) z{{a7>y{D4^014_zL_t(&-tC%skW|$b#(x5`77PlZ01Xf|tXfvU1+9P)Nl;9MMIeIW zf~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PO)u<>K8*eH(mXo|E4b6{n4!WlMoas%ZhvALqY1(?UYejX$qum2H*6CFz(2o?R^x zDEv(hmVvj&jg=p^uDHvkZKlwQXnG#Q_KXL#Ubbsr9Nn7x7-IFOx}g0W@Fj z20>x8!ootY1Jtn~{dF~g`?~m)`Q!|iyHa6%kmfQnQM3*U9~p3ePDSc@Q2%*2Wf?S% zmJ%okp_W5IHRG)GOwilcdW(Gu*4g{T~>dyLTd*<7nqH5>P4bO#m15lF^bQk0@fXG4I;>Zi8G4~)h=aS0UnUjaR`^J~?z=+$ zHTWKdViR&!n`TiY-;I@$Nas4sHq*3$R%RqSBP!U};>Y>BK#9N@@vNzKHf)UY&9JQQ zCMxp?bTg|ev(NnmCWO%6!B~MAp&w|lz>EMc4xx`RjCHn%FPzVQekwkb8YeK{!Gi*~ zsNb|P0)6c!`IJklP`iK9vb6vc-7RoHJ0Nq5dRwk5m+UDA)gAo?O?LN0*eFN#QW*D#LIwjzkygL(4{)S zRcNGevoWb@0%ujrt~sxh79Qi@G*o92@TaP*zZ6=F7pc}Mlq8{3Nv<1-3c80vD-#)#iR!fAg3`3i=|n0Ep+VCB*yVN$x?2_YiZ5k$@3&Tcz#W!=Gm9%=?NxpL Y19h*OP%`Tk_W%F@07*qoM6N<$g8#_jNdN!< diff --git a/htdocs/modulebuilder/template/dev/img/mymodule.svg b/htdocs/modulebuilder/template/dev/img/mymodule.svg deleted file mode 100644 index f51ead1a94e..00000000000 --- a/htdocs/modulebuilder/template/dev/img/mymodule.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - M - - From 69141c9493e0c3c0804a359a70d1a5e96d843466 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 May 2018 22:24:27 +0200 Subject: [PATCH 22/23] Fix PSR True->true and GETPOST file name for local checksum check --- htdocs/admin/system/filecheck.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 60c20dfafe7..e730b44821b 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -72,7 +72,7 @@ print '
'; $file_list = array('missing' => array(), 'updated' => array()); // Local file to compare to -$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml'; +$xmlshortfile = GETPOST('xmlshortfile','alpha')?GETPOST('xmlshortfile','alpha'):'/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)?'':$conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; // Remote file to compare to $xmlremote = GETPOST('xmlremote'); @@ -83,8 +83,8 @@ if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signa // Test if remote test is ok -$enableremotecheck = True; -if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=False; +$enableremotecheck = true; +if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || ! empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) $enableremotecheck=false; $enableremotecheck = true; print '
'; From afa57fd66d0bb813dba2c25b4cdc2467ee38e8b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 May 2018 23:33:20 +0200 Subject: [PATCH 23/23] Fix syntax error --- htdocs/admin/system/filecheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index e730b44821b..fa9d46bf327 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -72,7 +72,7 @@ print '
'; $file_list = array('missing' => array(), 'updated' => array()); // Local file to compare to -$xmlshortfile = GETPOST('xmlshortfile','alpha')?GETPOST('xmlshortfile','alpha'):'/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)?'':$conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)'.xml'; +$xmlshortfile = GETPOST('xmlshortfile','alpha')?GETPOST('xmlshortfile','alpha'):'/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX)?'':$conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; // Remote file to compare to $xmlremote = GETPOST('xmlremote');