From 19085ed200d89ee974d18afae0e1ce4d07d37fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:08:59 +0200 Subject: [PATCH 01/11] dol_print_object_info return void --- htdocs/bom/bom_agenda.php | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index a1db711dd3e..a4bf134e3ce 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -23,25 +23,12 @@ */ // Load Dolibarr environment -$res=0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; -// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME -$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1; -while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; } -if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include substr($tmp, 0, ($i+1))."/main.inc.php"; -if (! $res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i+1)))."/main.inc.php")) $res=@include dirname(substr($tmp, 0, ($i+1)))."/main.inc.php"; -// Try main.inc.php using relative path -if (! $res && file_exists("../main.inc.php")) $res=@include "../main.inc.php"; -if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php"; -if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main.inc.php"; -if (! $res) die("Include of main fails"); - +require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/bom/class/bom.class.php'); -dol_include_once('/bom/lib/bom.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; +require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php'; // Load translation files required by the page @@ -196,7 +183,7 @@ if ($object->id > 0) print '
'; $object->info($object->id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From 06421c200dbba9e4d79bb2c91f889734bd9c6b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:13:46 +0200 Subject: [PATCH 02/11] Update agenda.php --- htdocs/adherents/agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 5b2c3e912dd..105251ec114 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -137,7 +137,7 @@ if ($object->id > 0) print '
'; $object->info($id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From 7d66cc1ab1bd0a4905515d36edfec5b4126e119c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:14:29 +0200 Subject: [PATCH 03/11] Update agenda.php --- htdocs/societe/agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 2bf407ec88d..a9283f6e236 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -127,7 +127,7 @@ if ($socid > 0) print '
'; $object->info($socid); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From c8027ccf1a2aac850dfa62064e36d0c633dc7799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:15:10 +0200 Subject: [PATCH 04/11] Update agenda.php --- htdocs/contact/agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 6e093a934dd..2b135c3cc37 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -227,7 +227,7 @@ else print '
'; $object->info($id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From 53a09a0dd46f06b77357bb3174ec701956e53090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:15:51 +0200 Subject: [PATCH 05/11] Update agenda.php --- htdocs/product/agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 28b3c06ffa1..2ec5345009e 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -141,7 +141,7 @@ if ($id > 0 || $ref) print '
'; $object->info($object->id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From ff37fddcf16a14407403d3364b6b2a3a16377e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:16:45 +0200 Subject: [PATCH 06/11] Update myobject_agenda.php --- htdocs/modulebuilder/template/myobject_agenda.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 924db3b8632..b536b264952 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -196,7 +196,7 @@ if ($object->id > 0) print '
'; $object->info($object->id); - print dol_print_object_info($object, 1); + dol_print_object_info($object, 1); print ''; From 7b317c4cbfc8c0ce38b2fec02fc6bcffbc6cf189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:28:34 +0200 Subject: [PATCH 07/11] printObjectLines return void --- htdocs/modulebuilder/template/myobject_card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index e5223c86608..ed6a421ac86 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -389,7 +389,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (! empty($object->lines)) { - $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); + // printObjectLines return void + $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); } // Form to add new line From a09584ae4ba93a995db3780870cf83b071d47f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:46:47 +0200 Subject: [PATCH 08/11] The method _load_ldap_dn() cannot be called... The method _load_ldap_dn() cannot be called from this context as it is declared private in class AdherentType. --- htdocs/adherents/class/adherent_type.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index c310bb18627..d51bbfef28a 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -462,7 +462,7 @@ class AdherentType extends CommonObject return ''; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -472,7 +472,7 @@ class AdherentType extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - private function _load_ldap_dn($info, $mode = 0) + public function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; From 5a05cc184beacdcfba01480b433613b99e5f33d9 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 19 May 2019 10:48:43 +0200 Subject: [PATCH 09/11] Fix Accountancy Export OpenConcerto --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index b9339a8150b..8ca2de4a132 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -616,7 +616,7 @@ class AccountancyExport $date = dol_print_date($line->doc_date, '%d/%m/%Y'); print $date . $separator; - print $line->code_journal; + print $line->code_journal . $separator; if (empty($line->subledger_account)) { print length_accountg($line->numero_compte) . $separator; } else { From a368a6a43ed8b59570289ac855976f5012783e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:51:54 +0200 Subject: [PATCH 10/11] Update adherent_type.class.php --- htdocs/adherents/class/adherent_type.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index d51bbfef28a..5e7847efa82 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -65,7 +65,7 @@ class AdherentType extends CommonObject * @var string Adherent type label */ public $label; - + /** * @var string Adherent type nature */ @@ -410,7 +410,7 @@ class AdherentType extends CommonObject return -1; } } - + /** * Return translated label by the nature of a adherent (physical or moral) * @@ -422,7 +422,7 @@ class AdherentType extends CommonObject global $langs; if ($morphy == 'phy') { return $langs->trans("Physical"); } elseif ($morphy == 'mor') { return $langs->trans("Moral"); } - else return $langs->trans("Physical & Morale"); + else return $langs->trans("Physical & Morale"); //return $morphy; } @@ -462,7 +462,8 @@ class AdherentType extends CommonObject return ''; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -485,12 +486,13 @@ class AdherentType extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Initialize the info array (array of LDAP values) that will be used to call LDAP functions * * @return array Tableau info des attributs */ - private function _load_ldap_info() + public function _load_ldap_info() { // phpcs:enable global $conf,$langs; From 5def839813af872aa7fff871cf945174fe59540a Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 20 May 2019 11:56:26 +0200 Subject: [PATCH 11/11] FIX : Padding on create project icon --- htdocs/comm/propal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 4950efb19ab..c8cba5c3dda 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1679,7 +1679,7 @@ if ($action == 'create') print ''; print '' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id).'">' . $langs->trans("AddProject") . ''; + print '   id).'">' . $langs->trans("AddProject") . ''; print ''; print ''; }