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 { 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 ''; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index c310bb18627..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; } @@ -463,6 +463,7 @@ class AdherentType extends CommonObject } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -472,7 +473,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; @@ -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; 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 ''; 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 ''; } 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 ''; 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 ''; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 02b7aa42315..e24c6b6d32d 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 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 ''; 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 '';