From 6d2159e8f0a3faa88b7468a6fe1fbcb580e33c33 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 11:30:18 +0100 Subject: [PATCH 01/16] New #8472 personal and professional titles added personal and professional titles added for employee users --- htdocs/user/card.php | 12 ++++++++++++ htdocs/user/class/user.class.php | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index ba7cd546d54..f57c329d5a1 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -204,6 +204,7 @@ if (empty($reshook)) { } if (!$error) { + $object->civility_code = GETPOST("civility_code", 'aZ09'); $object->lastname = GETPOST("lastname", 'alphanohtml'); $object->firstname = GETPOST("firstname", 'alphanohtml'); $object->login = GETPOST("login", 'alphanohtml'); @@ -366,6 +367,7 @@ if (empty($reshook)) { $db->begin(); + $object->civility_code = GETPOST("civility_code", 'aZ09'); $object->lastname = GETPOST("lastname", 'alphanohtml'); $object->firstname = GETPOST("firstname", 'alphanohtml'); $object->login = GETPOST("login", 'alphanohtml'); @@ -789,6 +791,11 @@ if ($action == 'create' || $action == 'adduserldap') print ''; + // Civility + print ''; + // Lastname print ''; print ''; @@ -2037,6 +2044,11 @@ if ($action == 'create' || $action == 'adduserldap') print ''; } + // Civility + print ''; + // Lastname print ""; print ''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3288571d2a7..be1cd4514e3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -74,6 +74,7 @@ class User extends CommonObject public $ldap_sid; public $search_sid; public $employee; + public $civility_code; /** * @var string gender @@ -400,7 +401,7 @@ class User extends CommonObject $login = trim($login); // Get user - $sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.personal_email, u.job,"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.civility as civility_code, u.birth, u.email, u.personal_email, u.job,"; $sql .= " u.socialnetworks,"; $sql .= " u.signature, u.office_phone, u.office_fax, u.user_mobile, u.personal_mobile,"; $sql .= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,"; @@ -470,6 +471,7 @@ class User extends CommonObject $this->ref_ext = $obj->ref_ext; $this->ldap_sid = $obj->ldap_sid; + $this->civility_code = $obj->civility_code; $this->lastname = $obj->lastname; $this->firstname = $obj->firstname; @@ -1293,6 +1295,8 @@ class User extends CommonObject // Clean parameters $this->setUpperOrLowerCase(); + + $this->civility_code = trim($this->civility_code); $this->login = trim($this->login); if (!isset($this->entity)) { $this->entity = $conf->entity; // If not defined, we use default value @@ -1419,6 +1423,7 @@ class User extends CommonObject // Define parameters $this->admin = 0; + $this->civility_code = $contact->civility_code; $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->gender = $contact->gender; @@ -1447,6 +1452,7 @@ class User extends CommonObject if ($result > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET fk_socpeople=".$contact->id; + $sql .= ", civility=".$contact->civility_code; if ($contact->socid) { $sql .= ", fk_soc=".$contact->socid; } @@ -1497,6 +1503,7 @@ class User extends CommonObject // Set properties on new user $this->admin = 0; + $this->civility_code = $member->civility_id; $this->lastname = $member->lastname; $this->firstname = $member->firstname; $this->gender = $member->gender; @@ -1632,6 +1639,7 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters + $this->civility_code = trim($this->civility_code); $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); $this->employee = $this->employee ? $this->employee : 0; @@ -1686,7 +1694,8 @@ class User extends CommonObject // Update datas $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; - $sql .= " lastname = '".$this->db->escape($this->lastname)."'"; + $sql .= " civility = '".$this->db->escape($this->civility_code)."'"; + $sql .= ", lastname = '".$this->db->escape($this->lastname)."'"; $sql .= ", firstname = '".$this->db->escape($this->firstname)."'"; $sql .= ", employee = ".(int) $this->employee; $sql .= ", login = '".$this->db->escape($this->login)."'"; @@ -1788,6 +1797,7 @@ class User extends CommonObject $result = $adh->fetch($this->fk_member); if ($result > 0) { + $adh->civility_code = $this->civility_code; $adh->firstname = $this->firstname; $adh->lastname = $this->lastname; $adh->login = $this->login; @@ -1838,6 +1848,7 @@ class User extends CommonObject $result = $tmpobj->fetch($this->contact_id); if ($result >= 0) { + $tmpobj->civility_code = $this->civility_code; $tmpobj->firstname = $this->firstname; $tmpobj->lastname = $this->lastname; $tmpobj->login = $this->login; From f035bd774d55b515b8c1c175a4fa9aa4da18d03e Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 11:59:30 +0100 Subject: [PATCH 02/16] New | personal and professional titles added for employee users in vcard personal and professional titles added for employee users in vcard --- htdocs/user/vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index ada3a992f44..6cdcd04417f 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -61,7 +61,7 @@ $v = new vCard(); $v->setProdId('Dolibarr '.DOL_VERSION); $v->setUid('DOLIBARR-USERID-'.$user2->id); -$v->setName($user2->lastname, $user2->firstname, "", $user2->civility, ""); +$v->setName($user2->lastname, $user2->firstname, "", $user2->civility_code, ""); $v->setFormattedName($user2->getFullName($langs, 1)); $v->setPhoneNumber($user2->phone_pro, "TYPE=WORK;VOICE"); From 1c221302cd9230ef1b1316cd2d0ca32c2ecf15fe Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 5 Dec 2020 11:09:16 +0000 Subject: [PATCH 03/16] Fixing style errors. --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f57c329d5a1..3d5c8b1852a 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2046,7 +2046,7 @@ if ($action == 'create' || $action == 'adduserldap') // Civility print ''; // Lastname From 0c0566201053036c9f0b8014ca7d4df1ca8387d2 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 16:31:44 +0100 Subject: [PATCH 04/16] Fix/FIX html tag formatting errors in the accounting area --- htdocs/accountancy/index.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 20010cc8f5c..ef7e8f1c5fc 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -103,13 +103,13 @@ if ($conf->accounting->enabled) // STEPS $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''; print "
\n"; print "
\n"; @@ -118,22 +118,22 @@ if ($conf->accounting->enabled) print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''."\n"; print "
\n"; $step++; $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step). $textlink; print "
\n"; if (!empty($conf->tax->enabled)) { $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step). $textlink; print "
\n"; } /*if (! empty($conf->salaries->enabled)) @@ -147,7 +147,7 @@ if ($conf->accounting->enabled) if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''; print "
\n"; } /* @@ -171,7 +171,7 @@ if ($conf->accounting->enabled) }*/ $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''; print "
\n"; @@ -188,22 +188,22 @@ if ($conf->accounting->enabled) $langs->loadLangs(array('bills', 'trips')); $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)) . $langs->transnoentitiesnoconv("BillsCustomers") . ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''."\n"; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("BillsSuppliers"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''."\n"; print "
\n"; if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("ExpenseReports"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''."\n"; print "
\n"; } $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step)). $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting") . $langs->transnoentitiesnoconv("WriteBookKeeping") ."\n"; print "
\n"; $step++; From e126f9ce5de8f3d0e884a199514c6f44fb91f104 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 16:41:36 +0100 Subject: [PATCH 05/16] Revert "Fix/FIX html tag formatting errors in the accounting area" This reverts commit 0c0566201053036c9f0b8014ca7d4df1ca8387d2. --- htdocs/accountancy/index.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index ef7e8f1c5fc..20010cc8f5c 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -103,13 +103,13 @@ if ($conf->accounting->enabled) // STEPS $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''); print "
\n"; print "
\n"; @@ -118,22 +118,22 @@ if ($conf->accounting->enabled) print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'')."\n"; print "
\n"; $step++; $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step). $textlink; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); print "
\n"; if (!empty($conf->tax->enabled)) { $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step). $textlink; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); print "
\n"; } /*if (! empty($conf->salaries->enabled)) @@ -147,7 +147,7 @@ if ($conf->accounting->enabled) if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''); print "
\n"; } /* @@ -171,7 +171,7 @@ if ($conf->accounting->enabled) }*/ $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step). ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''); print "
\n"; @@ -188,22 +188,22 @@ if ($conf->accounting->enabled) $langs->loadLangs(array('bills', 'trips')); $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)) . $langs->transnoentitiesnoconv("BillsCustomers") . ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'')."\n"; print "
\n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("BillsSuppliers"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'')."\n"; print "
\n"; if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step)). $langs->transnoentitiesnoconv("ExpenseReports"). ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'')."\n"; print "
\n"; } $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step)). $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting") . $langs->transnoentitiesnoconv("WriteBookKeeping") ."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n"; print "
\n"; $step++; From 7a8d031d56dc5cf823c300d24c9f701dc87a5dac Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:17:57 +0100 Subject: [PATCH 06/16] Fix #15675 fixed the error of installation start of version 13.0.0-beta --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..17474f840ad 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + if(isset($conf->theme)) { + $theme = $conf->theme; + } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 1917d9b5084084bdd0ad43af7c1862f1929dc2c4 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:23:31 +0100 Subject: [PATCH 07/16] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 7a8d031d56dc5cf823c300d24c9f701dc87a5dac. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 17474f840ad..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; + $theme = $conf->theme; + $path = 'theme/'.$theme; - if(isset($conf->theme)) { - $theme = $conf->theme; - } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 1a1850c6f16d361bd86c0e521b42d50e3afc38af Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sat, 5 Dec 2020 20:28:55 +0100 Subject: [PATCH 08/16] Fix | fixed the error of installation start of version 13.0.0-beta --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..4bee0a0de80 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + if (isset($conf->theme)) { + $theme = $conf->theme; + } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From f70806544537d44a78b2efc80c5acfca5d4df5b9 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:14:11 +0100 Subject: [PATCH 09/16] Revert "Fix | fixed the error of installation start of version 13.0.0-beta" This reverts commit 1a1850c6f16d361bd86c0e521b42d50e3afc38af. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4bee0a0de80..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; + $theme = $conf->theme; + $path = 'theme/'.$theme; - if (isset($conf->theme)) { - $theme = $conf->theme; - } // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 8697fda78b18588e87cc3e974cc1d81ba4bbb920 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:22:06 +0100 Subject: [PATCH 10/16] fix | fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..b7ea582702a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,7 +3191,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; // Define fullpathpicto to use into src From 2a4fe639aebf4f66925f20ea7eb51bbb8d07fa9d Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:28:18 +0100 Subject: [PATCH 11/16] Revert "fix | fixed the error of installation start of version 13.0.0-beta" This reverts commit 8697fda78b18588e87cc3e974cc1d81ba4bbb920. --- htdocs/core/lib/functions.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b7ea582702a..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,8 +3191,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; // Define fullpathpicto to use into src From 3b7e510e6100f7f3d4768cf7a92e55e1d2a00a0b Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:31:54 +0100 Subject: [PATCH 12/16] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..bc0ab3b382e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; - $path = 'theme/'.$theme; + $theme = isset($conf->theme) ? $conf->theme : null; + $path = 'theme/'.$theme; + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From e38c6e4322b757ebdde714b2fbd512d716e0847c Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:42:45 +0100 Subject: [PATCH 13/16] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 3b7e510e6100f7f3d4768cf7a92e55e1d2a00a0b. --- htdocs/core/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bc0ab3b382e..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,10 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 35ea990cffe509ba2a9abf3a043c067057c393ab Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:49:22 +0100 Subject: [PATCH 14/16] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..66f0ea78abf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From 50b80785f527f08893d3e4fec3d897f1c2dd9600 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:56:18 +0100 Subject: [PATCH 15/16] Revert "Fix #15675 fixed the error of installation start of version 13.0.0-beta" This reverts commit 35ea990cffe509ba2a9abf3a043c067057c393ab. --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 66f0ea78abf..890c16627aa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = isset($conf->theme) ? $conf->theme : null; + $theme = $conf->theme; $path = 'theme/'.$theme; - + // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters From dadb257c85719df681d67e2f80a2393fa9458355 Mon Sep 17 00:00:00 2001 From: Zebedeu Date: Sun, 6 Dec 2020 07:58:46 +0100 Subject: [PATCH 16/16] Fix #15675 fixed the error of installation start of version 13.0.0-beta this patch fixed the problem but nevertheless does not pass the test because at the time of installation the variable $conf->theme is null --- htdocs/core/lib/functions.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 890c16627aa..6fe7454aabf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3191,9 +3191,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_URL_ROOT/theme/$conf->theme/img/$picto $url = DOL_URL_ROOT; - $theme = $conf->theme; + $theme = isset($conf->theme) ? $conf->theme : null; $path = 'theme/'.$theme; - // Define fullpathpicto to use into src if ($pictoisfullpath) { // Clean parameters
'; + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); + print '
'.$langs->trans("Lastname").'
'; + print $formcompany->select_civility( GETPOSTISSET( "civility_code" ) ? GETPOST( "civility_code" , 'aZ09' ) : $object->civility_code , 'civility_code' ); + print '
'.$langs->trans("Lastname").'
'; - print $formcompany->select_civility( GETPOSTISSET( "civility_code" ) ? GETPOST( "civility_code" , 'aZ09' ) : $object->civility_code , 'civility_code' ); + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); print '