From ae70dc11c6930fb53bb69198a7429a33a9f3b456 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Mon, 25 Jul 2022 22:28:07 +0200 Subject: [PATCH 001/105] Fixed labels --- htdocs/eventorganization/class/conferenceorbooth.class.php | 4 ++-- htdocs/langs/en_US/eventorganization.lang | 1 + htdocs/modulebuilder/template/class/myobject.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index 3df55ff48f3..a2eb140c789 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -105,8 +105,8 @@ class ConferenceOrBooth extends ActionComm public $fields = array( 'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), 'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'help'=>"Help text", 'showoncombobox'=>'1',), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'help'=>"OrganizationEvenLabelName", 'showoncombobox'=>'1',), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), 'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1), 'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width300'), diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 858e0937788..4b05b4e312e 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -139,6 +139,7 @@ OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event re OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner) +OrganizationEvenLabelName=Public name of the conference or booth NewSuggestionOfBooth=Application for a booth NewSuggestionOfConference=Application for a conference diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index eedb4de0b13..b755d956342 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -108,7 +108,7 @@ class MyObject extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>'Help text', 'showoncombobox'=>2, 'validate'=>1), 'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for amount', 'validate'=>1), 'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>1, 'default'=>'0', 'position'=>45, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for quantity', 'css'=>'maxwidth75imp', 'validate'=>1), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'picto'=>'company', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty', 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx'), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'picto'=>'company', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'OrganizationEventLinkToThirdParty', 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx'), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'validate'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx'), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>60, 'validate'=>1), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'validate'=>1, 'cssview'=>'wordbreak'), diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5fae77938e8..7f9715d0580 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -265,7 +265,7 @@ class Ticket extends CommonObject 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth125 tdoverflowmax50'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketCategory', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100 tdoverflowmax200'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"), //'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), // what is this ? From 195b9f5ebc10c5a1e3a54bc8d26750cf4418ea2d Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Tue, 26 Jul 2022 00:02:14 +0200 Subject: [PATCH 002/105] Propagate all errors messages --- htdocs/public/eventorganization/attendee_new.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index 661ae6accfe..8bb85022b2e 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -60,6 +60,7 @@ global $dolibarr_main_url_root; // Init vars $errmsg = ''; +$errors = array(); $error = 0; $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -90,6 +91,7 @@ if ($type == 'conf') { if ($resultproject < 0) { $error++; $errmsg .= $project->error; + $errors = array_merge($errors, $project->errors); } } @@ -99,6 +101,7 @@ if ($type == 'global') { if ($resultproject < 0) { $error++; $errmsg .= $project->error; + $errors = array_merge($errors, $project->errors); } else { $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."projet"; $sql .= " WHERE ".MAIN_DB_PREFIX."eventorganization_conferenceorboothattendee = ".((int) $project->id); @@ -279,6 +282,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen if ($resultconfattendee < 0) { $error++; $errmsg .= $confattendee->error; + $errors = array_merge($errors, $confattendee->errors); } } @@ -403,6 +407,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen // If an error was found $error++; $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); } elseif ($resultfetchthirdparty == 0) { // No thirdparty found + a payment is expected // Creation of a new thirdparty if (!empty($societe)) { @@ -441,6 +446,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen if ($readythirdparty < 0) { $error++; $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); } else { $thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs); $thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs); @@ -472,6 +478,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen if ($resultprod < 0) { $error++; $errmsg .= $productforinvoicerow->error; + $errors = array_merge($errors, $productforinvoicerow->errors); } else { $facture = new Facture($db); if (empty($confattendee->fk_invoice)) { @@ -668,7 +675,7 @@ if ($maxattendees && $currentnbofattendees >= $maxattendees) { print '
'; -dol_htmloutput_errors($errmsg); +dol_htmloutput_errors($errmsg, $errors); if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { if (empty($maxattendees) || $currentnbofattendees < $maxattendees) { From d8fa7d84cc23e5e15d80bdb15e00655e542853e8 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Tue, 26 Jul 2022 14:40:17 +0200 Subject: [PATCH 003/105] Allow "smallint" values to store 0 in MySQL db without conversion to NULL It was an issue with ConferenceOrBoothAttendee instances --- htdocs/core/class/commonobject.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9cfe5b47de5..13e7cb333b8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8675,7 +8675,7 @@ abstract class CommonObject public function isInt($info) { if (is_array($info)) { - if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) { + if (isset($info['type']) && (preg_match('/(^int|int$)/i', $info['type']))) { return true; } else { return false; @@ -8934,6 +8934,8 @@ abstract class CommonObject return 'NULL'; } elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) { return price2num("$value"); + } else if (preg_match('/int$/i', $fieldsentry['type'])) { + return (int)$value; } elseif ($fieldsentry['type'] == 'boolean') { if ($value) { return 'true'; From 0c416a1e38d7f04d6d3a4657e484e95a3dda50dd Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 26 Jul 2022 15:38:50 +0200 Subject: [PATCH 004/105] better hook management --- htdocs/takepos/invoice.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e3f4a106c67..a37752863a0 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -562,14 +562,16 @@ if (empty($reshook)) { $invoice->fetch_thirdparty(); $array_options = array(); + $line = array('description' => $prod->description, 'price' => $price, 'tva_tx' => $tva_tx, 'locatax1_tx' => $localtax1_tx, 'locatax2_tx' => $localtax2_tx, 'remise_percent' => $customer->remise_percent, 'price_ttc' => $price_ttc, 'array_options' => $array_options); + // complete line by hook - $parameters = array('prod' => $prod); - $reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); + $parameters = array('prod' => $prod, 'line' => $line); + $reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) { - $idoflineadded = $invoice->addline($prod->description, $price, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $array_options, 100, '', null, 0); - } + if (!empty($hookmanager->resArray)) $line = $hookmanager->resArray; + + $idoflineadded = $invoice->addline($line['description'], $line['price'], $qty, $line['tva_tx'], $line['localtax1_tx'], $line['localtax2_tx'], $idproduct, $line['remise_percent'], '', 0, 0, 0, '', $price_base_type, $line['price_ttc'], $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $line['array_options'], 100, '', null, 0); if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) { $CUSTOMER_DISPLAY_line1 = $prod->label; From 3e930f92b8dd4d1a406decfc5c192885b2ecfce9 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 26 Jul 2022 15:47:03 +0200 Subject: [PATCH 005/105] add reshook test --- htdocs/takepos/invoice.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index a37752863a0..3657ca7f4b6 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -569,9 +569,14 @@ if (empty($reshook)) { $reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (!empty($hookmanager->resArray)) $line = $hookmanager->resArray; - $idoflineadded = $invoice->addline($line['description'], $line['price'], $qty, $line['tva_tx'], $line['localtax1_tx'], $line['localtax2_tx'], $idproduct, $line['remise_percent'], '', 0, 0, 0, '', $price_base_type, $line['price_ttc'], $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $line['array_options'], 100, '', null, 0); + if (empty($reshook)) { + if (!empty($hookmanager->resArray)) { + $line = $hookmanager->resArray; + } + + $idoflineadded = $invoice->addline($line['description'], $line['price'], $qty, $line['tva_tx'], $line['localtax1_tx'], $line['localtax2_tx'], $idproduct, $line['remise_percent'], '', 0, 0, 0, '', $price_base_type, $line['price_ttc'], $prod->type, -1, 0, '', 0, (!empty($parent_line)) ? $parent_line : '', null, '', '', $line['array_options'], 100, '', null, 0); + } if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) { $CUSTOMER_DISPLAY_line1 = $prod->label; From 4776c9fdaaf29caa7b228e491acb96dc7372dad2 Mon Sep 17 00:00:00 2001 From: bagtaib Date: Tue, 26 Jul 2022 16:30:21 +0200 Subject: [PATCH 006/105] change button position --- htdocs/admin/tools/dolibarr_export.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index fae91d3ecb4..83ae97bafa3 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -171,8 +171,7 @@ print ''; print ''; print ''; -print ''; -print ''; print '
'; print '
'.$langs->trans("ExportMethod").''; @@ -194,8 +193,9 @@ if (in_array($type, array('mysql', 'mysqli'))) { print '
'; print '
'; -print ''; -print ''; +print '
'; +print ''; print ''; @@ -216,6 +216,7 @@ function hideoptions(){ '; print ''; -print ''; +print ''; print ''; print '
'; +print '
'; +print '
'; From 3f81d21c7cea2245989e5ce873b9f4d80b99ef28 Mon Sep 17 00:00:00 2001 From: bagtaib Date: Tue, 26 Jul 2022 18:32:48 +0200 Subject: [PATCH 007/105] make a button look like a link --- htdocs/admin/tools/dolibarr_export.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 83ae97bafa3..78c0d9690c1 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -197,7 +197,8 @@ print ''; print '
'; print ''; -print ''; +print ''; print ''; @@ -432,7 +432,7 @@ if (in_array($type, array('pgsql'))) { } print ''; -print ''; +print ''; print ''; print ''; From 1d8b39260b4b364c5f5d16c81337e7df6c03271a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 27 Jul 2022 09:50:43 +0000 Subject: [PATCH 015/105] Fixing style errors. --- htdocs/admin/stock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index bbd72667874..2b25d7deb5a 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -643,7 +643,7 @@ print ''."\n"; print ''; print ''.$langs->trans("MainDefaultWarehouse").''; print ''; -print $formproduct->selectWarehouses(!empty($conf->global->MAIN_DEFAULT_WAREHOUSE) ? $conf->global->MAIN_DEFAULT_WAREHOUSE : -1 , 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition'); +print $formproduct->selectWarehouses(!empty($conf->global->MAIN_DEFAULT_WAREHOUSE) ? $conf->global->MAIN_DEFAULT_WAREHOUSE : -1, 'default_warehouse', '', 1, 0, 0, '', 0, 0, array(), 'left reposition'); print ''; print ""; print "\n"; From f1b3f51b3a3a901f33db90161fe81c8c6b3bf638 Mon Sep 17 00:00:00 2001 From: bagtaib Date: Wed, 27 Jul 2022 14:14:34 +0200 Subject: [PATCH 016/105] add missing --- htdocs/admin/tools/dolibarr_export.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 0cde0348314..1a68b17c3e0 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -195,6 +195,7 @@ print ''; print ''; print ''; +print ''; print ''; print ''; print '
'; From 29cb21fdabeb7e2026598ccd0da2ef477f837026 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 27 Jul 2022 17:48:10 +0200 Subject: [PATCH 017/105] FIX - php V8 functions lib dolGetButtonAction --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 61a603f48bd..1eb72d50455 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10422,7 +10422,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = global $hookmanager, $action, $object, $langs; //var_dump($params); - if ($params['isDropdown']) + if (isset($params['isDropdown'])) $class = "dropdown-item"; else { $class = 'butAction'; From 31d4d0dcd42c56c2664e029b04ba23e566325f51 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 27 Jul 2022 18:09:11 +0200 Subject: [PATCH 018/105] FIX - php V8 user right in propal card and use $user->hasRight --- htdocs/comm/propal/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 06c36ce517c..f1a92d032cf 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -120,9 +120,9 @@ $usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreat $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->validate))); $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->send))); -$usercancreateorder = $user->rights->commande->creer; -$usercancreateinvoice = $user->rights->facture->creer; -$usercancreatecontract = $user->rights->contrat->creer; +$usercancreateorder = $user->hasRight('commande', 'creer'); +$usercancreateinvoice = $user->hasRight('facture', 'creer'); +$usercancreatecontract = $user->hasRight('contrat', 'creer'); $usercancreateintervention = $user->hasRight('ficheinter', 'creer'); $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); From 6519edabc5c12831c171fce308330b3339bec4a2 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 27 Jul 2022 21:34:36 +0200 Subject: [PATCH 019/105] Error messages for category --- htdocs/categories/class/categorie.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index dad25199566..f860023ed4f 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -332,6 +332,7 @@ class Categorie extends CommonObject // Check parameters if (empty($id) && empty($label) && empty($ref_ext)) { + $this->error = "No category to search for"; return -1; } if (!is_null($type) && !is_numeric($type)) { @@ -389,6 +390,7 @@ class Categorie extends CommonObject return 1; } else { + $this->error = "No category found"; return 0; } } else { From 244f3913b075f4f4faf9f21e56f3e24a14c37342 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 27 Jul 2022 21:35:52 +0200 Subject: [PATCH 020/105] Qualify cactionevents for eventorganization --- htdocs/comm/action/class/cactioncomm.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index d2b089491a7..db62dfe6a9f 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -216,6 +216,9 @@ class CActionComm if ($obj->module == 'shipping' && !empty($conf->expedition->enabled) && !empty($user->rights->expedition->lire)) { $qualified = 1; } + if (preg_split("/@/", $obj->module, -1)[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) { + $qualified = 1; + } // For the generic case with type = 'module...' and module = 'myobject@mymodule' $regs = array(); if (preg_match('/^module/', $obj->type)) { From 5600fd63df04a657e834946fee04bfffc64243f7 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 27 Jul 2022 21:36:57 +0200 Subject: [PATCH 021/105] Retrieve category and insert default const at init of eventorganization module --- .../core/modules/modEventOrganization.class.php | 17 ++++++++++++++++- htdocs/langs/en_US/eventorganization.lang | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 93318bb952e..ad62dca3f3c 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -24,6 +24,7 @@ * \brief Description and activation file for the EventOrganization */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; /** * Description and activation class for module EventOrganization @@ -367,7 +368,21 @@ class modEventOrganization extends DolibarrModules } } - return $this->_init($sql, $options); + $langs->load("eventorganization"); + $cat = new Categorie($this->db); + $sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX.$cat->table_element."(label, type, entity, description, visible) VALUES('".$langs->trans('ApplicantOrVisitor')."', 2, 1, '".$langs->trans('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF')."', 1)"; + + $init = $this->_init($sql, $options); + + if(empty($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF)) { + $langs->load('eventorganization'); + $res = $cat->fetch(null, $langs->trans('ApplicantOrVisitor')); + if($cat->id) { + dolibarr_set_const($this->db, 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF', $res); + } + } + + return $init; } /** diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 4b05b4e312e..7966c6712ad 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -60,6 +60,7 @@ ConferenceOrBoothTab = Conference Or Booth AmountPaid = Amount paid DateOfRegistration = Date of registration ConferenceOrBoothAttendee = Conference Or Booth Attendee +ApplicantOrVisitor=Applicant or visitor # # Template Mail From e271175de6c9f0cb6c91865b3472a7708d0e5330 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 27 Jul 2022 21:37:06 +0200 Subject: [PATCH 022/105] Display all errors --- htdocs/public/project/suggestconference.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 22589c941d2..ca34a05253d 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -463,8 +463,7 @@ print '
'; print '
'; print '
'; - -dol_htmloutput_errors($errmsg); +dol_htmloutput_errors($errmsg, $errors); // Print form print '
'."\n"; From e9528443b26fbcff5733c5a846e281e1fc4800d1 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Wed, 27 Jul 2022 22:12:36 +0200 Subject: [PATCH 023/105] Insert speaker contact type into db --- htdocs/core/modules/modEventOrganization.class.php | 1 + htdocs/langs/en_US/eventorganization.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index ad62dca3f3c..57b05131025 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -371,6 +371,7 @@ class modEventOrganization extends DolibarrModules $langs->load("eventorganization"); $cat = new Categorie($this->db); $sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX.$cat->table_element."(label, type, entity, description, visible) VALUES('".$langs->trans('ApplicantOrVisitor')."', 2, 1, '".$langs->trans('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF')."', 1)"; + $sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active) VALUES(300, 'conferenceorbooth', 'external', 'SPEAKER', '".$langs->trans('Speaker')."', 1)"; $init = $this->_init($sql, $options); diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 7966c6712ad..b4179b04be6 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -61,6 +61,7 @@ AmountPaid = Amount paid DateOfRegistration = Date of registration ConferenceOrBoothAttendee = Conference Or Booth Attendee ApplicantOrVisitor=Applicant or visitor +Speaker=Speaker # # Template Mail From d66aa960bb57ccdf7cd137ea1ece07540b1d7d31 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Thu, 28 Jul 2022 14:33:33 +0200 Subject: [PATCH 024/105] Resolve --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1eb72d50455..707f8cb7384 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10422,7 +10422,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = global $hookmanager, $action, $object, $langs; //var_dump($params); - if (isset($params['isDropdown'])) + if (!empty($params['isDropdown'])) $class = "dropdown-item"; else { $class = 'butAction'; From 0fe441bc2a9f7ecad8cad7d7403041f86a4b1439 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 28 Jul 2022 17:29:09 +0200 Subject: [PATCH 025/105] use getDolGlobal... --- htdocs/core/lib/takepos.lib.php | 2 +- htdocs/takepos/admin/terminal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 66ea16a6123..c2468c98169 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -56,7 +56,7 @@ function takepos_admin_prepare_head() $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); for ($i = 1; $i <= $numterminals; $i++) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i; - $head[$h][1] = (! empty($conf->global->{"TAKEPOS_TERMINAL_NAME_".$i}) ? $conf->global->{"TAKEPOS_TERMINAL_NAME_".$i} : $langs->trans("TerminalName", $i)); + $head[$h][1] = getDolGlobalString('TAKEPOS_TERMINAL_NAME_'.$i, $langs->trans("TerminalName", $i)); $head[$h][2] = 'terminal'.$i; $h++; } diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index 29bc7fa5712..0bfe4ebd080 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -152,7 +152,7 @@ print "\n"; print ''.$langs->trans("TerminalNameDesc").''; print ''; -print 'global->{"TAKEPOS_TERMINAL_NAME_".$terminal} : $langs->trans("TerminalName", $terminal)).'" >'; +print 'trans("TerminalName", $terminal)).'" >'; print ''; print ''.$langs->trans("CashDeskThirdPartyForSell").''; From 4b3fdcc9f60fb92e0f3f4722ec5408bf06203753 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 28 Jul 2022 17:36:58 +0200 Subject: [PATCH 026/105] use getDolGlobal... --- htdocs/takepos/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 8cbdd7adb13..e9717e7c992 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -955,7 +955,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { - global->{"TAKEPOS_TERMINAL_NAME_".$_SESSION["takeposterminal"]}) ? $conf->global->{"TAKEPOS_TERMINAL_NAME_".$_SESSION["takeposterminal"]} : $langs->trans("TerminalName", $_SESSION["takeposterminal"])); ?> + trans("TerminalName", $_SESSION["takeposterminal"])); ?> - '.dol_print_date(dol_now(), "day").''; @@ -1014,11 +1014,11 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {

trans("TerminalSelect"); ?>

From 4bc54fc845078746597e0beae71422f2ccab2a5f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 28 Jul 2022 19:43:58 +0200 Subject: [PATCH 027/105] Fix picto on stripe charge.php --- htdocs/stripe/charge.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 2cd61bfe5d0..7f17d51800d 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018-2022 Thibault FOUCART * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -251,16 +251,15 @@ if (!$rowid) { $object = new Commande($db); $object->fetch($charge->metadata->dol_id); if ($object->id > 0) { - print "".img_picto('', 'object_order')." ".$object->ref.""; + print "".img_picto('', 'order')." ".$object->ref.""; } else { print $FULLTAG; } } elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") { - print $charge->metadata->dol_type.' '.$charge->metadata->dol_id.' - '; $object = new Facture($db); $object->fetch($charge->metadata->dol_id); if ($object->id > 0) { - print "".img_picto('', 'object_invoice')." ".$object->ref.""; + print "".img_picto('', 'bill')." ".$object->ref.""; } else { print $FULLTAG; } From e13d5ea5aa27693aa4c244c3b03d536e4d886a25 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 11:54:56 +0200 Subject: [PATCH 028/105] Fix missing import key --- htdocs/contact/list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 8a1765118da..97dd6444d0a 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -374,6 +374,7 @@ $sql = "SELECT s.rowid as socid, s.nom as name,"; $sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.address, p.zip, p.town, p.poste, p.email,"; $sql .= " p.socialnetworks, p.photo,"; $sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; +$sql .= " p.import_key,"; $sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectcontactlevel,"; $sql .= " co.label as country, co.code as country_code"; // Add fields from extrafields @@ -1062,6 +1063,7 @@ while ($i < min($num, $limit)) { $contactstatic->country = $obj->country; $contactstatic->country_code = $obj->country_code; $contactstatic->photo = $obj->photo; + $contactstatic->import_key = $obj->import_key; $contactstatic->fk_prospectlevel = $obj->fk_prospectcontactlevel; @@ -1285,9 +1287,10 @@ while ($i < min($num, $limit)) { $totalarray['nbfield']++; } } + // Import key if (!empty($arrayfields['p.import_key']['checked'])) { print ''; - print $obj->import_key; + print dol_escape_htmltag($obj->import_key); print "\n"; if (!$i) { $totalarray['nbfield']++; From e25b599ee3a3251402833939b18364e034d50b0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 12:52:27 +0200 Subject: [PATCH 029/105] Fix position of fields --- htdocs/contact/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 97dd6444d0a..0bb902f7ca1 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -206,16 +206,16 @@ foreach ($object->fields as $key => $val) { } // Add none object fields to fields for list -$arrayfields['country.code_iso'] = array('label'=>"Country", 'position'=>22, 'checked'=>0); +$arrayfields['country.code_iso'] = array('label'=>"Country", 'position'=>66, 'checked'=>0); if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - $arrayfields['s.nom'] = array('label'=>"ThirdParty", 'position'=>25, 'checked'=>1); + $arrayfields['s.nom'] = array('label'=>"ThirdParty", 'position'=>113, 'checked'=> 1); } $arrayfields['unsubscribed'] = array( 'label'=>'No_Email', 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled)), - 'position'=>41); + 'position'=>111); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { From f0c85237137f701a68f7d56d1e717c99aa4976c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 14:50:21 +0200 Subject: [PATCH 030/105] Debug v16 --- htdocs/compta/index.php | 25 +++++++++++++++---------- htdocs/core/lib/invoice.lib.php | 4 +++- htdocs/langs/en_US/admin.lang | 2 +- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e7cb0b1d4b5..55ee99f4cb6 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -102,19 +102,24 @@ print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'bill'); print '
'; -print getNumberInvoicesPieChart('customers'); -print '
'; +if (isModEnabled('facture')) { + print getNumberInvoicesPieChart('customers'); + print '
'; +} -if (!empty($conf->fournisseur->enabled)) { +if (isModEnabled('fournisseur') || isModEnabled('supplier_invoice')) { print getNumberInvoicesPieChart('fourn'); print '
'; } -print getCustomerInvoiceDraftTable($max, $socid); - -if (!empty($conf->fournisseur->enabled)) { +if (isModEnabled('facture')) { + print getCustomerInvoiceDraftTable($max, $socid); print '
'; +} + +if (isModEnabled('fournisseur') || isModEnabled('supplier_invoice')) { print getDraftSupplierTable($max, $socid); + print '
'; } print '
'; @@ -273,7 +278,7 @@ if (isModEnabled('facture') && !empty($user->rights->facture->lire)) { // Last modified supplier invoices -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { +if ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) { $langs->load("boxes"); $facstatic = new FactureFournisseur($db); @@ -400,7 +405,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU // Latest donations -if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) { +if (isModEnabled('don') && !empty($user->rights->don->lire)) { include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $langs->load("boxes"); @@ -490,7 +495,7 @@ if (!empty($conf->don->enabled) && !empty($user->rights->don->lire)) { /** * Social contributions to pay */ -if (!empty($conf->tax->enabled) && !empty($user->rights->tax->charges->lire)) { +if (isModEnabled('tax') && !empty($user->rights->tax->charges->lire)) { if (!$socid) { $chargestatic = new ChargeSociales($db); @@ -582,7 +587,7 @@ if (!empty($conf->tax->enabled) && !empty($user->rights->tax->charges->lire)) { /* * Customers orders to be billed */ -if (isModEnabled('facture') && !empty($conf->commande->enabled) && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { +if (isModEnabled('facture') && isModEnabled('commande') && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { $commandestatic = new Commande($db); $langs->load("orders"); diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index ea53ae065e3..52daea0f150 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -254,7 +254,9 @@ function supplier_invoice_rec_prepare_head($object) function getNumberInvoicesPieChart($mode) { global $conf, $db, $langs, $user; - if (isModEnabled('facture') && !empty($user->rights->facture->lire)) { + if (($mode == 'customers' && isModEnabled('facture') && !empty($user->rights->facture->lire)) + || ($mode = 'suppliers') && (isModEnabled('fournisseur') || isModEnabled('supplier_invoice')) && !empty($user->rights->facture->lire) + ) { include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; $now = date_create(date('Y-m-d', dol_now())); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5b43bc2b457..c8d7d48ff1c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1129,7 +1129,7 @@ ValueOfConstantKey=Value of a configuration constant ConstantIsOn=Option %s is on NbOfDays=No. of days AtEndOfMonth=At end of month -CurrentNext=Current/Next +CurrentNext=A given day in month Offset=Offset AlwaysActive=Always active Upgrade=Upgrade From cc9cc7f832750ad94c241a7bf559f161f23ce4be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 13:58:30 +0200 Subject: [PATCH 031/105] Picto --- htdocs/product/stock/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 9aad5f382cc..6efe9f0d9e8 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -141,7 +141,7 @@ print '
'; $max = 10; $sql = "SELECT p.rowid, p.label as produit, p.tobatch, p.tosell, p.tobuy,"; $sql .= " e.ref as warehouse_ref, e.rowid as warehouse_id, e.ref as warehouse_label, e.lieu, e.statut as warehouse_status,"; -$sql .= " m.value as qty, m.datem, m.batch, m.eatby, m.sellby"; +$sql .= " m.rowid as mid, m.value as qty, m.datem, m.batch, m.eatby, m.sellby"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql .= ", ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= ", ".MAIN_DB_PREFIX."product as p"; @@ -200,7 +200,7 @@ if ($resql) { $tmplotstatic->eatby = $objp->eatby; print ''; - print ''.dol_print_date($db->jdate($objp->datem), 'dayhour').''; + print ''.img_picto($langs->trans("Ref").' '.$objp->mid, 'movement', 'class="pictofixedwidth"').dol_print_date($db->jdate($objp->datem), 'dayhour').''; print ''; print $producttmp->getNomUrl(1); print "\n"; From d1d5e0836f1ca86da8301c6ce794eed48a3414c5 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Fri, 29 Jul 2022 13:04:04 +0200 Subject: [PATCH 032/105] Fix : HasRight on user.class.php for $permlevel2 --- htdocs/user/class/user.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fcd1505a402..b8c19ea28f1 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -775,16 +775,16 @@ class User extends CommonObject // For backward compatibility with old permissions called "lire", "creer", "create", "supprimer" // instead of "read", "write", "delete" if ($permlevel2 == 'read' && !empty($this->rights->$rightsPath->$permlevel1->lire)) { - return $this->rights->$rightsPath->lire; + return $this->rights->$rightsPath->$permlevel1->lire; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->creer)) { - return $this->rights->$rightsPath->create; + return $this->rights->$rightsPath->$permlevel1->create; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->create)) { - return $this->rights->$rightsPath->create; + return $this->rights->$rightsPath->$permlevel1->create; } if ($permlevel2 == 'delete' && !empty($this->rights->$rightsPath->$permlevel1->supprimer)) { - return $this->rights->$rightsPath->supprimer; + return $this->rights->$rightsPath->$permlevel1->supprimer; } } } else { From b27e8582f173ca17f179b7c76fee75c2a5ce35e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:22:16 +0200 Subject: [PATCH 033/105] Log --- ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c8e78fe83b..c93a61a15c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,9 @@ English Dolibarr ChangeLog For users: --------------- -NEW: PHP 8.1 compatibility +NEW: PHP 8.1 compatibility. + Warning: Application works correctly with PHP8 and 8.1 but you may experience a lot of PHP warning into the PHP server log files (depending + on the PHP setup). Removal of all PHP warnings on server side is planned for v17. NEW: Support for recurring purchase invoices. NEW: #20292 Include German public holidays NEW: Can show ZATCA QRCode on PDFs From 6d2219e00c37aa8ad8074dea86bca311c18e65cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:26:34 +0200 Subject: [PATCH 034/105] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 13e7cb333b8..ab61d1f3381 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8189,7 +8189,7 @@ abstract class CommonObject $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); } - } else if(val > 0) { + } elseif(val > 0) { var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone(); $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); @@ -8212,7 +8212,7 @@ abstract class CommonObject if ($("#"+child_list).val() == 0 && $("#"+parent_list).val() == 0){ $("#"+child_list).hide(); //Show mother lists - } else if ($("#"+parent_list).val() != 0){ + } elseif ($("#"+parent_list).val() != 0){ $("#"+parent_list).show(); } //Show the child list if the parent list value is selected @@ -8320,8 +8320,8 @@ abstract class CommonObject /** * Get buy price to use for margin calculation. This function is called when buy price is unknown. * Set buy price = sell price if ForceBuyingPriceIfNull configured, - * else if calculation MARGIN_TYPE = 'costprice' and costprice is defined, use costprice as buyprice - * else if calculation MARGIN_TYPE = 'pmp' and pmp is calculated, use pmp as buyprice + * elseif calculation MARGIN_TYPE = 'costprice' and costprice is defined, use costprice as buyprice + * elseif calculation MARGIN_TYPE = 'pmp' and pmp is calculated, use pmp as buyprice * else set min buy price as buy price * * @param float $unitPrice Product unit price @@ -8934,7 +8934,7 @@ abstract class CommonObject return 'NULL'; } elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) { return price2num("$value"); - } else if (preg_match('/int$/i', $fieldsentry['type'])) { + } elseif (preg_match('/int$/i', $fieldsentry['type'])) { return (int)$value; } elseif ($fieldsentry['type'] == 'boolean') { if ($value) { From c181b0bff4d480162efc139e6cbabc5b0112df26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:27:20 +0200 Subject: [PATCH 035/105] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index ab61d1f3381..60c986b5531 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8935,7 +8935,7 @@ abstract class CommonObject } elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) { return price2num("$value"); } elseif (preg_match('/int$/i', $fieldsentry['type'])) { - return (int)$value; + return (int) $value; } elseif ($fieldsentry['type'] == 'boolean') { if ($value) { return 'true'; From 5e4ed0dea0940a795cd8a418e8e5d9ca622530d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:28:33 +0200 Subject: [PATCH 036/105] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 60c986b5531..ea58d599100 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8189,7 +8189,7 @@ abstract class CommonObject $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); } - } elseif(val > 0) { + } else if(val > 0) { var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone(); $("select[name=\""+child_list+"\"] option[parent]").remove(); $("select[name=\""+child_list+"\"]").append(options); @@ -8212,7 +8212,7 @@ abstract class CommonObject if ($("#"+child_list).val() == 0 && $("#"+parent_list).val() == 0){ $("#"+child_list).hide(); //Show mother lists - } elseif ($("#"+parent_list).val() != 0){ + } else if ($("#"+parent_list).val() != 0){ $("#"+parent_list).show(); } //Show the child list if the parent list value is selected From 75a8fdce111730bb1fbdd0ab3b445da93780db76 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 29 Jul 2022 13:33:16 +0000 Subject: [PATCH 037/105] Fixing style errors. --- htdocs/core/modules/modEventOrganization.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 57b05131025..c70897ae9df 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -375,10 +375,10 @@ class modEventOrganization extends DolibarrModules $init = $this->_init($sql, $options); - if(empty($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF)) { + if (empty($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF)) { $langs->load('eventorganization'); $res = $cat->fetch(null, $langs->trans('ApplicantOrVisitor')); - if($cat->id) { + if ($cat->id) { dolibarr_set_const($this->db, 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF', $res); } } From 9cc9b841387e8339786e8f7607d03275436e8621 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 15:39:37 +0200 Subject: [PATCH 038/105] Update modEventOrganization.class.php --- htdocs/core/modules/modEventOrganization.class.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index c70897ae9df..5dd212b355d 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -368,21 +368,8 @@ class modEventOrganization extends DolibarrModules } } - $langs->load("eventorganization"); - $cat = new Categorie($this->db); - $sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX.$cat->table_element."(label, type, entity, description, visible) VALUES('".$langs->trans('ApplicantOrVisitor')."', 2, 1, '".$langs->trans('EVENTORGANIZATION_CATEG_THIRDPARTY_CONF')."', 1)"; - $sql[] = "INSERT IGNORE INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active) VALUES(300, 'conferenceorbooth', 'external', 'SPEAKER', '".$langs->trans('Speaker')."', 1)"; - $init = $this->_init($sql, $options); - if (empty($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF)) { - $langs->load('eventorganization'); - $res = $cat->fetch(null, $langs->trans('ApplicantOrVisitor')); - if ($cat->id) { - dolibarr_set_const($this->db, 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF', $res); - } - } - return $init; } From 05ca9da7e1a63627cdbf9a3967e320740deae9ec Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Fri, 29 Jul 2022 15:46:13 +0200 Subject: [PATCH 039/105] Fix : php 8.1 warnings --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 4 +- htdocs/main.inc.php | 26 ++++++------- htdocs/user/card.php | 50 ++++++++++++------------- htdocs/user/document.php | 24 ++++++------ htdocs/user/group/card.php | 22 +++++------ htdocs/user/group/list.php | 9 +++-- htdocs/user/group/perms.php | 10 ++--- htdocs/user/hierarchy.php | 4 +- htdocs/user/list.php | 28 +++++++------- htdocs/user/note.php | 14 +++---- htdocs/user/param_ihm.php | 14 +++---- htdocs/user/perms.php | 16 ++++---- 13 files changed, 112 insertions(+), 111 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b286adae481..89ce32b9069 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10422,7 +10422,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = global $hookmanager, $action, $object, $langs; //var_dump($params); - if ($params['isDropdown']) + if (!empty($params['isDropdown'])) $class = "dropdown-item"; else { $class = 'butAction'; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 3b2a1c1ec50..4707657d3e3 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1154,7 +1154,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = if ($user->rights->user->user->lire) { if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { $newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->rights->user->user->creer || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home'); + $newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home'); $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->rights->user->user->lire || $user->admin); $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->rights->user->user->lire || $user->admin); if (isModEnabled('categorie')) { @@ -1162,7 +1162,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat'); } $newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); - $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); } } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5108a5eb332..782f75b0190 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2413,7 +2413,7 @@ function printDropdownQuickadd() "title" => "MenuNewMember@members", "name" => "Adherent@members", "picto" => "object_member", - "activation" => !empty($conf->adherent->enabled) && $user->rights->adherent->creer, // vs hooking + "activation" => !empty($conf->adherent->enabled) && $user->hasRight("adherent", "write"), // vs hooking "position" => 5, ), array( @@ -2421,7 +2421,7 @@ function printDropdownQuickadd() "title" => "MenuNewThirdParty@companies", "name" => "ThirdParty@companies", "picto" => "object_company", - "activation" => !empty($conf->societe->enabled) && $user->rights->societe->creer, // vs hooking + "activation" => !empty($conf->societe->enabled) && $user->hasRight("societe", "write"), // vs hooking "position" => 10, ), array( @@ -2429,7 +2429,7 @@ function printDropdownQuickadd() "title" => "NewContactAddress@companies", "name" => "Contact@companies", "picto" => "object_contact", - "activation" => !empty($conf->societe->enabled) && $user->rights->societe->contact->creer, // vs hooking + "activation" => !empty($conf->societe->enabled) && $user->hasRight("societe", "contact", "write"), // vs hooking "position" => 20, ), array( @@ -2437,7 +2437,7 @@ function printDropdownQuickadd() "title" => "NewPropal@propal", "name" => "Proposal@propal", "picto" => "object_propal", - "activation" => !empty($conf->propal->enabled) && $user->rights->propale->creer, // vs hooking + "activation" => !empty($conf->propal->enabled) && $user->hasRight("propale", "write"), // vs hooking "position" => 30, ), @@ -2446,7 +2446,7 @@ function printDropdownQuickadd() "title" => "NewOrder@orders", "name" => "Order@orders", "picto" => "object_order", - "activation" => !empty($conf->commande->enabled) && $user->rights->commande->creer, // vs hooking + "activation" => !empty($conf->commande->enabled) && $user->hasRight("commande", "write"), // vs hooking "position" => 40, ), array( @@ -2454,7 +2454,7 @@ function printDropdownQuickadd() "title" => "NewBill@bills", "name" => "Bill@bills", "picto" => "object_bill", - "activation" => isModEnabled('facture') && $user->rights->facture->creer, // vs hooking + "activation" => isModEnabled('facture') && $user->hasRight("facture", "write"), // vs hooking "position" => 50, ), array( @@ -2462,7 +2462,7 @@ function printDropdownQuickadd() "title" => "NewContractSubscription@contracts", "name" => "Contract@contracts", "picto" => "object_contract", - "activation" => !empty($conf->contrat->enabled) && $user->rights->contrat->creer, // vs hooking + "activation" => !empty($conf->contrat->enabled) && $user->hasRight("contrat", "write"), // vs hooking "position" => 60, ), array( @@ -2470,7 +2470,7 @@ function printDropdownQuickadd() "title" => "SupplierProposalNew@supplier_proposal", "name" => "SupplierProposal@supplier_proposal", "picto" => "supplier_proposal", - "activation" => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer, // vs hooking + "activation" => !empty($conf->supplier_proposal->enabled) && $user->hasRight("supplier_invoice", "write"), // vs hooking "position" => 70, ), array( @@ -2478,7 +2478,7 @@ function printDropdownQuickadd() "title" => "NewSupplierOrderShort@orders", "name" => "SupplierOrder@orders", "picto" => "supplier_order", - "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->creer) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->creer), // vs hooking + "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "commande", "write")) || (!empty($conf->supplier_order->enabled) && $user->hasRight("supplier_invoice", "write")), // vs hooking "position" => 80, ), array( @@ -2486,7 +2486,7 @@ function printDropdownQuickadd() "title" => "NewBill@bills", "name" => "SupplierBill@bills", "picto" => "supplier_invoice", - "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->creer) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->creer), // vs hooking + "activation" => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "write")) || (!empty($conf->supplier_invoice->enabled) && $user->hasRight("supplier_invoice", "write")), // vs hooking "position" => 90, ), array( @@ -2494,7 +2494,7 @@ function printDropdownQuickadd() "title" => "NewProduct@products", "name" => "Product@products", "picto" => "object_product", - "activation" => !empty($conf->product->enabled) && $user->rights->produit->creer, // vs hooking + "activation" => !empty($conf->product->enabled) && $user->hasRight("produit", "write"), // vs hooking "position" => 100, ), array( @@ -2502,7 +2502,7 @@ function printDropdownQuickadd() "title" => "NewService@products", "name" => "Service@products", "picto" => "object_service", - "activation" => !empty($conf->service->enabled) && $user->rights->service->creer, // vs hooking + "activation" => !empty($conf->service->enabled) && $user->hasRight("service", "write"), // vs hooking "position" => 110, ), array( @@ -2510,7 +2510,7 @@ function printDropdownQuickadd() "title" => "AddUser@users", "name" => "User@users", "picto" => "user", - "activation" => $user->rights->user->user->creer, // vs hooking + "activation" => $user->hasRight("user", "user", "write"), // vs hooking "position" => 500, ), ), diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 5f8a4be0446..8e375933a91 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -76,15 +76,15 @@ $dateendvalidity = dol_mktime(0, 0, 0, GETPOST('dateendvaliditymonth', 'int'), G $dateofbirth = dol_mktime(0, 0, 0, GETPOST('dateofbirthmonth', 'int'), GETPOST('dateofbirthday', 'int'), GETPOST('dateofbirthyear', 'int')); // Define value to know what current user can do on users -$canadduser = (!empty($user->admin) || $user->rights->user->user->creer); -$canreaduser = (!empty($user->admin) || $user->rights->user->user->lire); -$canedituser = (!empty($user->admin) || $user->rights->user->user->creer); -$candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); +$canadduser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$canreaduser = (!empty($user->admin) || $user->hasRight("user", "user", "read")); +$canedituser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$candisableuser = (!empty($user->admin) || $user->hasRight("user", "user", "delete")); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); - $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); + $canreadgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "read")); + $caneditgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "write")); } $childids = $user->getAllChildIds(1); // For later, test on salary visibility @@ -92,8 +92,8 @@ $childids = $user->getAllChildIds(1); // For later, test on salary visibility // Define value to know what current user can do on properties of edited user if ($id > 0) { // $user is the current logged user, $id is the user we want to edit - $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) || (($user->id != $id) && $user->rights->user->user->creer)); - $caneditpassword = ((($user->id == $id) && $user->rights->user->self->password) || (($user->id != $id) && $user->rights->user->user->password)); + $caneditfield = ((($user->id == $id) && $user->hasRight("user", "self", "write")) || (($user->id != $id) && $user->hasRight("user", "user", "write"))); + $caneditpassword = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password"))); } // Security check @@ -712,7 +712,7 @@ if (empty($reshook)) { // Actions to build doc $upload_dir = $conf->user->dir_output; - $permissiontoadd = $user->rights->user->user->creer; + $permissiontoadd = $user->hasRight("user", "user", "write"); include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -1165,7 +1165,7 @@ if ($action == 'create' || $action == 'adduserldap') { } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (!empty($conf->categorie->enabled) && !empty($user->hasRight("categorie", "read"))) { print ''.$form->editfieldkey('Categories', 'usercats', '', $object, 0).''; $cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1); print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), 0, 0, 'maxwdith300 widthcentpercentminusx', 0, '90%'); @@ -1234,9 +1234,9 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; print ''; - if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && in_array($id, $childids)) - || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { + if ((!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "read")) && in_array($id, $childids)) + || (!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "readall"))) + || (!empty($conf->hrm->enabled) && !empty($user->hasRight("hrm", "employee", "read")))) { $langs->load("salaries"); // THM @@ -1365,7 +1365,7 @@ if ($action == 'create' || $action == 'adduserldap') { $title = $langs->trans("User"); $linkback = ''; - if ($user->rights->user->user->lire || $user->admin) { + if ($user->hasRight("user", "user", "read") || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } } @@ -1417,7 +1417,7 @@ if ($action == 'create' || $action == 'adduserldap') { $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; print '
'; @@ -1541,8 +1541,8 @@ if ($action == 'create' || $action == 'adduserldap') { // Sensitive salary/value information if ((empty($user->socid) && in_array($id, $childids)) // A user can always see salary/value information for its subordinates - || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { + || (!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "readall"))) + || (!empty($conf->hrm->enabled) && !empty($user->hasRight("hrm", "employee", "read")))) { $langs->load("salaries"); // Salary @@ -1625,7 +1625,7 @@ if ($action == 'create' || $action == 'adduserldap') { } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (!empty($conf->categorie->enabled) && !empty($user->hasRight("categorie", "read"))) { print ''.$langs->trans("Categories").''; print ''; print $form->showCategories($object->id, Categorie::TYPE_USER, 1); @@ -1804,7 +1804,7 @@ if ($action == 'create' || $action == 'adduserldap') { print ''."\n"; // API key - if (!empty($conf->api->enabled) && ($user->id == $id || $user->admin || $user->rights->api->apikey->generate)) { + if (!empty($conf->api->enabled) && ($user->id == $id || $user->admin || $user->hasRight("api", "apikey", "generate"))) { print ''.$langs->trans("ApiKey").''; print ''; if (!empty($object->api_key)) { @@ -2369,7 +2369,7 @@ if ($action == 'create' || $action == 'adduserldap') { print "\n"; // API key - if (!empty($conf->api->enabled) && ($user->id == $id || $user->admin || $user->rights->api->apikey->generate)) { + if (!empty($conf->api->enabled) && ($user->id == $id || $user->admin || $user->hasRight("api", "apikey", "generate"))) { print ''.$langs->trans("ApiKey").''; print ''; print ''; @@ -2566,7 +2566,7 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (!empty($conf->categorie->enabled) && !empty($user->hasRight("categorie", "read"))) { print ''.$form->editfieldkey('Categories', 'usercats', '', $object, 0).''; print ''; print img_picto('', 'category', 'class="pictofixedwidth"'); @@ -2711,8 +2711,8 @@ if ($action == 'create' || $action == 'adduserldap') { // Sensitive salary/value information if ((empty($user->socid) && in_array($id, $childids)) // A user can always see salary/value information for its subordinates - || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { + || (!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "readall"))) + || (!empty($conf->hrm->enabled) && !empty($user->hasRight("hrm", "employee", "read")))) { $langs->load("salaries"); // Salary @@ -2803,8 +2803,8 @@ if ($action == 'create' || $action == 'adduserldap') { $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->user->dir_output."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $user->rights->user->user->lire; - $delallowed = $user->rights->user->user->creer; + $genallowed = $user->hasRight("user", "user", "read"); + $delallowed = $user->hasRight("user", "user", "write"); print $formfile->showdocuments('user', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', empty($soc->default_lang) ? '' : $soc->default_lang); $somethingshown = $formfile->numoffiles; diff --git a/htdocs/user/document.php b/htdocs/user/document.php index ed1fe30df4e..31ec618a795 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -41,23 +41,23 @@ $ref = GETPOST('ref', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'userdoc'; // To manage different context of search // Define value to know what current user can do on users -$canadduser = (!empty($user->admin) || $user->rights->user->user->creer); -$canreaduser = (!empty($user->admin) || $user->rights->user->user->lire); -$canedituser = (!empty($user->admin) || $user->rights->user->user->creer); -$candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); +$canadduser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$canreaduser = (!empty($user->admin) || $user->hasRight("user", "user", "read")); +$canedituser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$candisableuser = (!empty($user->admin) || $user->hasRight("user", "user", "delete")); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); - $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); + $canreadgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "read")); + $caneditgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "write")); } // Define value to know what current user can do on properties of edited user if ($id) { // $user est le user qui edite, $id est l'id de l'utilisateur edite - $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) - || (($user->id != $id) && $user->rights->user->user->creer)); - $caneditpassword = ((($user->id == $id) && $user->rights->user->self->password) - || (($user->id != $id) && $user->rights->user->user->password)); + $caneditfield = ((($user->id == $id) && $user->hasRight("user", "self", "write")) + || (($user->id != $id) && $user->hasRight("user", "user", "write"))); + $caneditpassword = ((($user->id == $id) && $user->hasRight("user", "self", "password")) + || (($user->id != $id) && $user->hasRight("user", "user", "passsword"))); } $permissiontoadd = $caneditfield; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles @@ -147,7 +147,7 @@ if ($object->id) { print dol_get_fiche_head($head, 'document', $langs->trans("User"), -1, 'user'); $linkback = ''; - if ($user->rights->user->user->lire || $user->admin) { + if ($user->hasRight("user", "user", "read") || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } @@ -155,7 +155,7 @@ if ($object->id) { $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; print '
'; diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 92d309e554b..9b6e9e1c317 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -32,16 +32,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Defini si peux lire/modifier utilisateurs et permisssions -$canreadperms = ($user->admin || $user->rights->user->user->lire); -$caneditperms = ($user->admin || $user->rights->user->user->creer); -$candisableperms = ($user->admin || $user->rights->user->user->supprimer); +$canreadperms = ($user->admin || $user->hasRight("user", "user", "read")); +$caneditperms = ($user->admin || $user->hasRight("user", "user", "write")); +$candisableperms = ($user->admin || $user->hasRight("user", "user", "delete")); $feature2 = 'user'; // Advanced permissions if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $canreadperms = ($user->admin || $user->rights->user->group_advance->read); - $caneditperms = ($user->admin || $user->rights->user->group_advance->write); - $candisableperms = ($user->admin || $user->rights->user->group_advance->delete); + $canreadperms = ($user->admin || $user->hasRight("user", "group_advance", "read")); + $caneditperms = ($user->admin || $user->hasRight("user", "group_advance", "write")); + $candisableperms = ($user->admin || $user->hasRight("user", "group_advance", "delete")); $feature2 = 'group_advance'; } @@ -238,7 +238,7 @@ if (empty($reshook)) { // Actions to build doc $upload_dir = $conf->user->dir_output.'/usergroups'; - $permissiontoadd = $user->rights->user->user->creer; + $permissiontoadd = $user->hasRight("user", "user", "write"); include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } @@ -250,7 +250,7 @@ $title = $object->name.' - '.$langs->trans("Card"); if ($action == 'create') { $title = $langs->trans("NewGroup"); } - +$help_url = ""; llxHeader('', $title, $help_url); @@ -329,7 +329,7 @@ if ($action == 'create') { $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin); print '
'; print '
'; @@ -485,8 +485,8 @@ if ($action == 'create') { $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->user->dir_output."/usergroups/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $user->rights->user->user->creer; - $delallowed = $user->rights->user->user->supprimer; + $genallowed = $user->hasRight("user", "user", "write"); + $delallowed = $user->hasRight("user", "user", "delete"); $somethingshown = $formfile->showdocuments('usergroup', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $mysoc->default_lang); diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index bb130b33e75..8f7f907eb7b 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -38,10 +38,10 @@ $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choi $contextpage = GETPOST('optioncss', 'aZ09'); // Defini si peux lire/modifier utilisateurs et permisssions -$caneditperms = ($user->admin || $user->rights->user->user->creer); +$caneditperms = ($user->admin || $user->hasRight("user", "user", "write")); // Advanced permissions if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $caneditperms = ($user->admin || $user->rights->user->group_advance->write); + $caneditperms = ($user->admin || $user->hasRight("user", "group_advance", "write")); } // Load variable for pagination @@ -70,7 +70,7 @@ $fieldstosearchall = array( ); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - if (!$user->rights->user->group_advance->read && !$user->admin) { + if (!$user->hasRight("user", "group_advance", "read") && !$user->admin) { accessforbidden(); } } @@ -80,7 +80,7 @@ if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global-> accessforbidden(); } -if (!$user->rights->user->user->lire && !$user->admin) { +if (!$user->hasRight("user", "user", "read") && !$user->admin) { accessforbidden(); } @@ -121,6 +121,7 @@ if (empty($reshook)) { * View */ $title = $langs->trans("ListOfGroups"); +$help_url=""; llxHeader('', $title, $help_url); $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions"; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index edf20d0884c..15fcc2a319f 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -50,15 +50,15 @@ if (!isset($id) || empty($id)) { } // Define if user can read permissions -$canreadperms = ($user->admin || $user->rights->user->user->lire); +$canreadperms = ($user->admin || $user->hasRight("user", "user", "read")); // Define if user can modify group permissions -$caneditperms = ($user->admin || $user->rights->user->user->creer); +$caneditperms = ($user->admin || $user->hasRight("user", "user", "write")); // Advanced permissions $advancedpermsactive = false; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $advancedpermsactive = true; - $canreadperms = ($user->admin || ($user->rights->user->group_advance->read && $user->rights->user->group_advance->readperms)); - $caneditperms = ($user->admin || $user->rights->user->group_advance->write); + $canreadperms = ($user->admin || ($user->hasRight("user", "group_advance", "read") && $user->hasRight("user", "group_advance", "readperms"))); + $caneditperms = ($user->admin || $user->hasRight("user", "group_advance", "write")); } // Security check @@ -206,7 +206,7 @@ if ($object->id > 0) { $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin); print '
'; print '
'; diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 92d0490f1c6..3f8326d3b7b 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -60,9 +60,9 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $userstatic = new User($db); // Define value to know what current user can do on users -$canadduser = (!empty($user->admin) || $user->rights->user->user->creer); +$canadduser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); -if (!$user->rights->user->user->lire && !$user->admin) { +if (!$user->hasRight("user", "user", "read") && !$user->admin) { accessforbidden(); } diff --git a/htdocs/user/list.php b/htdocs/user/list.php index a47fa7a51c2..f0196789e25 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -131,7 +131,7 @@ $arrayfields = array( 'u.email'=>array('label'=>"EMail", 'checked'=>1, 'position'=>35), 'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>(!empty($conf->api->enabled) && $user->admin)), 'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45), - 'u.salary'=>array('label'=>"Salary", 'checked'=>1, 'position'=>80, 'enabled'=>(!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))), + 'u.salary'=>array('label'=>"Salary", 'checked'=>1, 'position'=>80, 'enabled'=>(!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "readall")))), 'u.datelastlogin'=>array('label'=>"LastConnexion", 'checked'=>1, 'position'=>100), 'u.datepreviouslogin'=>array('label'=>"PreviousConnexion", 'checked'=>0, 'position'=>110), 'u.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), @@ -174,26 +174,26 @@ if ($mode == 'employee' && !GETPOSTISSET('search_employee')) { } // Define value to know what current user can do on users -$permissiontoadd = (!empty($user->admin) || $user->rights->user->user->creer); -$canreaduser = (!empty($user->admin) || $user->rights->user->user->lire); -$canedituser = (!empty($user->admin) || $user->rights->user->user->creer); -$candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); +$permissiontoadd = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$canreaduser = (!empty($user->admin) || $user->hasRight("user", "user", "read")); +$canedituser = (!empty($user->admin) || $user->hasRight("user", "user", "write")); +$candisableuser = (!empty($user->admin) || $user->hasRight("user", "user", "delete")); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); - $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); + $canreadgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "read")); + $caneditgroup = (!empty($user->admin) || $user->hasRight("user", "group_advance", "write")); } $error = 0; // Permission to list if ($mode == 'employee') { - if (empty($user->rights->salaries->read)) { + if (empty($user->hasRight("salaries", "read"))) { accessforbidden(); } } else { - if (empty($user->rights->user->user->lire) && empty($user->admin)) { + if (empty($user->hasRight("user", "user", "read")) && empty($user->admin)) { accessforbidden(); } } @@ -441,7 +441,7 @@ if ($search_categ == -2) { if ($search_warehouse > 0) { $sql .= " AND u.fk_warehouse = ".((int) $search_warehouse); } -if ($mode == 'employee' && empty($user->rights->salaries->readall)) { +if ($mode == 'employee' && empty($user->hasRight("salaries", "readall"))) { $sql .= " AND u.rowid IN (".$db->sanitize(join(',', $childids)).")"; } // Add where from extra fields @@ -658,7 +658,7 @@ $moreforfilter = ''; $moreforfilter.= '
';*/ // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { +if (!empty($conf->categorie->enabled) && $user->hasRight("categorie", "read")) { $moreforfilter .= '
'; $tmptitle = $langs->trans('Category'); $moreforfilter .= img_picto($langs->trans("Category"), 'category', 'class="pictofixedwidth"').$formother->select_categories(Categorie::TYPE_USER, $search_categ, 'search_categ', 1, $tmptitle); @@ -939,9 +939,9 @@ while ($i < $imaxinloop) { $li = $object->getNomUrl(-1, '', 0, 0, 24, 1, 'login', '', 1); $canreadhrmdata = 0; - if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && in_array($obj->rowid, $childids)) - || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { + if ((!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "read")) && in_array($obj->rowid, $childids)) + || (!empty($conf->salaries->enabled) && !empty($user->hasRight("salaries", "readall"))) + || (!empty($conf->hrm->enabled) && !empty($user->hasRight("hrm", "employee", "read")))) { $canreadhrmdata = 1; } $canreadsecretapi = 0; diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 2aeb496c20f..2b1e02b1376 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -39,7 +39,7 @@ $object->fetch($id, '', '', 1); $object->getrights(); // If user is not user read and no permission to read other users, we stop -if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { +if (($object->id != $user->id) && (!$user->hasRight("user", "user", "read"))) { accessforbidden(); } @@ -48,7 +48,7 @@ $socid = 0; if ($user->socid > 0) { $socid = $user->socid; } -$feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); +$feature2 = (($socid && $user->hasRight("user", "self", "write")) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); @@ -67,7 +67,7 @@ if ($reshook < 0) { } if (empty($reshook)) { - if ($action == 'update' && $user->rights->user->user->creer && !GETPOST("cancel")) { + if ($action == 'update' && $user->hasRight("user", "user", "write") && !GETPOST("cancel")) { $db->begin(); $res = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5)); @@ -99,7 +99,7 @@ if ($id) { $linkback = ''; - if ($user->rights->user->user->lire || $user->admin) { + if ($user->hasRight("user", "user", "read") || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } @@ -107,7 +107,7 @@ if ($id) { $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; @@ -138,7 +138,7 @@ if ($id) { } print ''; - $editenabled = (($action == 'edit') && !empty($user->rights->user->user->creer)); + $editenabled = (($action == 'edit') && !empty($user->hasRight("user", "user", "write"))); // Note print ''.$langs->trans("Note").''; @@ -171,7 +171,7 @@ if ($id) { print '
'; - if ($user->rights->user->user->creer && $action != 'edit') { + if ($user->hasRight("user", "user", "write") && $action != 'edit') { print ''.$langs->trans('Modify').""; } diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 4c138bfde6e..6a5eea96490 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; $langs->loadLangs(array('companies', 'products', 'admin', 'users', 'languages', 'projects', 'members')); // Defini si peux lire/modifier permisssions -$canreaduser = ($user->admin || $user->rights->user->user->lire); +$canreaduser = ($user->admin || $user->hasRight("user", "user", "read")); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); @@ -40,8 +40,8 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'use if ($id) { // $user est le user qui edite, $id est l'id de l'utilisateur edite - $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) - || (($user->id != $id) && $user->rights->user->user->creer)); + $caneditfield = ((($user->id == $id) && $user->hasRight("user", "self", "write")) + || (($user->id != $id) && $user->hasRight("user", "user", "write"))); } // Security check @@ -49,7 +49,7 @@ $socid = 0; if ($user->socid > 0) { $socid = $user->socid; } -$feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); +$feature2 = (($socid && $user->hasRight("user", "self", "write")) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && !$canreaduser) { @@ -231,11 +231,11 @@ if ($action == 'edit') { $linkback = ''; - if ($user->rights->user->user->lire || $user->admin) { + if ($user->hasRight("user", "user", "read") || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin); print '
'; @@ -346,7 +346,7 @@ if ($action == 'edit') { $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 47d68703d69..bfc234abce1 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -50,13 +50,13 @@ if (!isset($id) || empty($id)) { } // Define if user can read permissions -$canreaduser = ($user->admin || $user->rights->user->user->lire); +$canreaduser = ($user->admin || $user->hasRight("user", "user", "read")); // Define if user can modify other users and permissions -$caneditperms = ($user->admin || $user->rights->user->user->creer); +$caneditperms = ($user->admin || $user->hasRight("user", "user", "write")); // Advanced permissions if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $canreaduser = ($user->admin || ($user->rights->user->user->lire && $user->rights->user->user_advance->readperms)); - $caneditselfperms = ($user->id == $id && $user->rights->user->self_advance->writeperms); + $canreaduser = ($user->admin || ($user->hasRight("user", "user", "read") && $user->hasRight("user", "user_advance", "readperms"))); + $caneditselfperms = ($user->id == $id && $user->hasRight("user", "self_advance", "writeperms")); $caneditperms = (($caneditperms || $caneditselfperms) ? 1 : 0); } @@ -65,9 +65,9 @@ $socid = 0; if (isset($user->socid) && $user->socid > 0) { $socid = $user->socid; } -$feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); +$feature2 = (($socid && $user->hasRight("user", "self", "write")) ? '' : 'user'); // A user can always read its own card if not advanced perms enabled, or if he has advanced perms, except for admin -if ($user->id == $id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->user->self_advance->readperms) && empty($user->admin))) { +if ($user->id == $id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->hasRight("user", "self_advance", "readperms")) && empty($user->admin))) { accessforbidden(); } @@ -249,7 +249,7 @@ if ($result) { $linkback = ''; -if ($user->rights->user->user->lire || $user->admin) { +if ($user->hasRight("user", "user", "read") || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } @@ -257,7 +257,7 @@ $morehtmlref = 'trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; -dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); +dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; From 51d022914b4765f2855483b287941b42ad7481ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 16:03:21 +0200 Subject: [PATCH 040/105] Fix missing auto increment key. Fix error duplicate of type of contact. --- htdocs/admin/dict.php | 2 +- .../install/mysql/data/llx_c_type_contact.sql | 113 +++++++++--------- .../install/mysql/migration/15.0.0-16.0.0.sql | 20 ++++ .../mysql/tables/llx_c_type_contact.sql | 2 +- 4 files changed, 79 insertions(+), 58 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fa5d6deae97..38fbfec8c87 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2375,7 +2375,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; - } elseif (in_array($value, array('element', 'source'))) { //Example: the type and source of the element (for contact types) + } elseif (in_array($value, array('element', 'source'))) { // Example: the type and source of the element (for contact types) print ''; print $form->selectarray($value, $elementList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql index 825e21ddf42..5852e295c6b 100644 --- a/htdocs/install/mysql/data/llx_c_type_contact.sql +++ b/htdocs/install/mysql/data/llx_c_type_contact.sql @@ -32,88 +32,89 @@ -- -- The types of contact of an element --- Les types de contact d'un element +-- +-- The unique key is set on (element, source, code) -- -- Contract / Contrat -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (10, 'contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (11, 'contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (20, 'contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (21, 'contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (22, 'contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1); -- Proposal / Propal -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (31, 'propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (40, 'propal', 'external', 'BILLING', 'Contact client facturation propale', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (41, 'propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (42, 'propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'BILLING', 'Contact client facturation propale', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1); -- Customer Invoice / Facture -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (50, 'facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (60, 'facture', 'external', 'BILLING', 'Contact client facturation', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (61, 'facture', 'external', 'SHIPPING', 'Contact client livraison', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (62, 'facture', 'external', 'SERVICE', 'Contact client prestation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'BILLING', 'Contact client facturation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'SHIPPING', 'Contact client livraison', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('facture', 'external', 'SERVICE', 'Contact client prestation', 1); -- Supplier Invoice -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (70, 'invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (71, 'invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (72, 'invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (73, 'invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); -- Agenda -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (80, 'agenda', 'internal', 'ACTOR', 'Responsable', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (81, 'agenda', 'internal', 'GUEST', 'Guest', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (85, 'agenda', 'external', 'ACTOR', 'Responsable', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (86, 'agenda', 'external', 'GUEST', 'Guest', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'internal', 'ACTOR', 'Responsable', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'internal', 'GUEST', 'Guest', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'external', 'ACTOR', 'Responsable', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('agenda', 'external', 'GUEST', 'Guest', 1); -- Customer Order / Commande -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (91, 'commande', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (100,'commande', 'external', 'BILLING', 'Contact client facturation commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (101,'commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (102,'commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'BILLING', 'Contact client facturation commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1); -- Intervention / Fichinter -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (120, 'fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (121, 'fichinter', 'internal', 'INTERVENING', 'Intervenant', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (130, 'fichinter', 'external', 'BILLING', 'Contact client facturation intervention', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (131, 'fichinter', 'external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'internal', 'INTERVENING', 'Intervenant', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'external', 'BILLING', 'Contact client facturation intervention', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('fichinter', 'external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1); -- Supplier Order -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (140, 'order_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (141, 'order_supplier', 'internal', 'SHIPPING', 'Responsable réception de la commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (142, 'order_supplier', 'external', 'BILLING', 'Contact fournisseur facturation commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (143, 'order_supplier', 'external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (145, 'order_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'internal', 'SHIPPING', 'Responsable réception de la commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'BILLING', 'Contact fournisseur facturation commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('order_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison commande', 1); -- Resource -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (150, 'dolresource', 'internal', 'USERINCHARGE', 'In charge of resource', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (151, 'dolresource', 'external', 'THIRDINCHARGE', 'In charge of resource', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('dolresource', 'internal', 'USERINCHARGE', 'In charge of resource', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('dolresource', 'external', 'THIRDINCHARGE', 'In charge of resource', 1); -- Tickets -insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (155, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (156, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL); +insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL); +insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL); +insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL); +insert into llx_c_type_contact (element, source, code, libelle, active, module) values ('ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL); -- Projects / Projet - All project code can start with 'PROJECT' -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (161, 'project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (170, 'project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (171, 'project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); -- Project Tasks - All task code can start with 'TASK' -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (180, 'project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (181, 'project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (190, 'project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (191, 'project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1); -- Supplier proposal -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); -- Event Organization -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); -insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); +insert into llx_c_type_contact (element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1); diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index 2131f1a4061..c94b1cfcdaa 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -135,8 +135,28 @@ ALTER TABLE llx_partnership ADD UNIQUE INDEX uk_fk_type_fk_member (fk_type, fk_m ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL; + -- v16 +ALTER TABLE llx_element_contact DROP FOREIGN KEY fk_element_contact_fk_c_type_contact; +ALTER TABLE llx_societe_contacts DROP FOREIGN KEY fk_societe_contacts_fk_c_type_contact; + +--VMYSQL4.3 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY(rowid); +--VMYSQL4.3 ALTER TABLE llx_c_type_contact CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; + +--VPGSQL8.2 CREATE SEQUENCE llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid; +--VPGSQL8.2 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY (rowid); +--VPGSQL8.2 ALTER TABLE llx_c_type_contact ALTER COLUMN rowid SET DEFAULT nextval('llx_c_type_contact_rowid_seq'); +--VPGSQL8.2 SELECT setval('llx_c_type_contact_rowid_seq', MAX(rowid)) FROM llx_c_type_contact; + +insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); +insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); +insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1); + +ALTER TABLE llx_element_contact ADD CONSTRAINT fk_element_contact_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); + + DROP TABLE llx_payment_salary_extrafields; DROP TABLE llx_asset_model_extrafields; DROP TABLE llx_asset_type_extrafields; diff --git a/htdocs/install/mysql/tables/llx_c_type_contact.sql b/htdocs/install/mysql/tables/llx_c_type_contact.sql index 4b12661657e..e2275e71e5f 100644 --- a/htdocs/install/mysql/tables/llx_c_type_contact.sql +++ b/htdocs/install/mysql/tables/llx_c_type_contact.sql @@ -29,7 +29,7 @@ create table llx_c_type_contact ( - rowid integer PRIMARY KEY, + rowid integer AUTO_INCREMENT PRIMARY KEY, element varchar(30) NOT NULL, source varchar(8) DEFAULT 'external' NOT NULL, code varchar(32) NOT NULL, From c4323b99a948ae409910fc84ddef028cc7605d57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jul 2022 19:47:36 +0200 Subject: [PATCH 041/105] css --- htdocs/core/ajax/selectsearchbox.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 090fc52cb4f..54e3e1e4470 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -64,11 +64,11 @@ $arrayresult = array(); // Define $searchform -if (isModEnabled('adherent') && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) { +if (isModEnabled('adherent') && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->hasRight('adherent', 'lire')) { $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) { +if (((isModEnabled('societe') && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_order') || isModEnabled('supplier_invoice'))) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->hasRight('societe', 'lire')) { $arrayresult['searchintothirdparty'] = array('position'=>10, 'shortcut'=>'T', 'img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('', 'object_company', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } @@ -76,7 +76,7 @@ if (isModEnabled('societe') && empty($conf->global->MAIN_SEARCHFORM_CONTACT_DISA $arrayresult['searchintocontact'] = array('position'=>15, 'shortcut'=>'A', 'img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('', 'object_contact', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (((!empty($conf->product->enabled) && $user->hasRight('produit', 'lire')) || (!empty($conf->service->enabled) && $user->hasRight('service', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) { +if (((isModEnabled('product') && $user->hasRight('produit', 'lire')) || (isModEnabled('service') && $user->hasRight('service', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) { $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); // search on lot/serial numbers if (isModEnabled('productbatch')) { @@ -108,13 +108,13 @@ if (isModEnabled('facture') && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INV $arrayresult['searchintoinvoice'] = array('position'=>90, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) { +if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->hasRight('supplier_proposal', 'lire')) { $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) { +if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) { $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } -if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { +if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_supplier_invoice', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } @@ -129,7 +129,7 @@ if (isModEnabled('facture') && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INV } // Vendor payments -if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { +if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) { $arrayresult['searchintovendorpayments'] = array( 'position'=>175, 'img'=>'object_payment', @@ -139,7 +139,7 @@ if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_S } // Miscellaneous payments -if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS_DISABLED) && $user->rights->banque->lire) { +if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS_DISABLED) && $user->hasRight('banque', 'lire')) { $arrayresult['searchintomiscpayments'] = array( 'position'=>180, 'img'=>'object_payment', @@ -148,24 +148,24 @@ if (isModEnabled('banque') && empty($conf->global->MAIN_SEARCHFORM_MISC_PAYMENTS 'url'=>DOL_URL_ROOT.'/compta/bank/various_payment/list.php?leftmenu=tax_various'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('contrat') && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) { +if (isModEnabled('contrat') && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->hasRight('contrat', 'lire')) { $arrayresult['searchintocontract'] = array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('', 'object_contract', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('ficheinter') && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->rights->ficheinter->lire) { +if (isModEnabled('ficheinter') && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->hasRight('ficheinter', 'lire')) { $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('ticket') && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) { +if (isModEnabled('ticket') && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->hasRight('ticket', 'read')) { $arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } // HR -if (isModEnabled('user') && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) { +if (isModEnabled('user') && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->hasRight('user', 'user', 'lire')) { $arrayresult['searchintouser'] = array('position'=>200, 'shortcut'=>'U', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('', 'object_user', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('expensereport') && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) { +if (isModEnabled('expensereport') && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->hasRight('expensereport', 'lire')) { $arrayresult['searchintoexpensereport'] = array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('', 'object_trip', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('holiday') && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read) { +if (isModEnabled('holiday') && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->hasRight('holiday', 'read')) { $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } From 5d2d0384f819af7d5755d6e4d7deeff1048e274b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 17:05:02 +0200 Subject: [PATCH 042/105] Debug v16 --- htdocs/admin/dict.php | 46 ++++++++++--------- .../modules/modEventOrganization.class.php | 2 +- .../conferenceorbooth_card.php | 3 ++ .../conferenceorboothattendee_list.php | 2 +- ...ventorganization_conferenceorbooth.lib.php | 12 ++--- htdocs/projet/card.php | 21 ++++++--- htdocs/public/project/suggestbooth.php | 6 +-- htdocs/public/project/suggestconference.php | 6 +-- 8 files changed, 56 insertions(+), 42 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 38fbfec8c87..dd29ee1cde3 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -622,34 +622,33 @@ $sourceList = array(); if ($id == 11) { $elementList = array( '' => '', - 'societe' => $langs->trans('ThirdParty'), + 'agenda' => img_picto('', 'action', 'class="pictofixedwidth"').$langs->trans('Agenda'), + 'dolresource' => img_picto('', 'resource', 'class="pictofixedwidth"').$langs->trans('Resource'), + 'societe' => img_picto('', 'company', 'class="pictofixedwidth"').$langs->trans('ThirdParty'), // 'proposal' => $langs->trans('Proposal'), // 'order' => $langs->trans('Order'), // 'invoice' => $langs->trans('Bill'), - 'supplier_proposal' => $langs->trans('SupplierProposal'), - 'order_supplier' => $langs->trans('SupplierOrder'), - 'invoice_supplier' => $langs->trans('SupplierBill'), // 'intervention' => $langs->trans('InterventionCard'), // 'contract' => $langs->trans('Contract'), - 'project' => $langs->trans('Project'), - 'project_task' => $langs->trans('Task'), - 'ticket' => $langs->trans('Ticket'), - 'agenda' => $langs->trans('Agenda'), - 'dolresource' => $langs->trans('Resource'), - // old deprecated - 'propal' => $langs->trans('Proposal'), - 'commande' => $langs->trans('Order'), - 'facture' => $langs->trans('Bill'), - 'fichinter' => $langs->trans('InterventionCard'), - 'contrat' => $langs->trans('Contract'), + 'project' => img_picto('', 'project', 'class="pictofixedwidth"').$langs->trans('Project'), + 'project_task' => img_picto('', 'projecttask', 'class="pictofixedwidth"').$langs->trans('Task'), + 'propal' => img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans('Proposal'), + 'commande' => img_picto('', 'order', 'class="pictofixedwidth"').$langs->trans('Order'), + 'facture' => img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans('Bill'), + 'fichinter' => img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterventionCard'), + 'contrat' => img_picto('', 'contract', 'class="pictofixedwidth"').$langs->trans('Contract'), + 'ticket' => img_picto('', 'ticket', 'class="pictofixedwidth"').$langs->trans('Ticket'), + 'supplier_proposal' => img_picto('', 'supplier_proposal', 'class="pictofixedwidth"').$langs->trans('SupplierProposal'), + 'order_supplier' => img_picto('', 'supplier_order', 'class="pictofixedwidth"').$langs->trans('SupplierOrder'), + 'invoice_supplier' => img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans('SupplierBill'), ); - if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) { - $elementList["societe"] = $langs->trans('ThirdParty'); + if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + $elementList['conferenceorbooth'] = img_picto('', 'eventorganization', 'class="pictofixedwidth"').$langs->trans('ConferenceOrBooth'); } complete_elementList_with_modules($elementList); - asort($elementList); + //asort($elementList); $sourceList = array( 'internal' => $langs->trans('Internal'), 'external' => $langs->trans('External') @@ -1202,7 +1201,6 @@ if (GETPOST('from')) { if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -//var_dump($elementList); /* @@ -1960,7 +1958,7 @@ if ($id > 0) { $valuetoshow = price($valuetoshow); } if ($value == 'private') { - $valuetoshow = yn($elementList[$valuetoshow]); + $valuetoshow = yn($valuetoshow); } elseif ($value == 'libelle_facture') { $langs->load("bills"); $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); @@ -2376,8 +2374,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; } elseif (in_array($value, array('element', 'source'))) { // Example: the type and source of the element (for contact types) + $tmparray = array(); + if ($value == 'element') { + $tmparray = $elementList; + } else { + $tmparray = $sourceList; + } print ''; - print $form->selectarray($value, $elementList, (!empty($obj->{$value}) ? $obj->{$value}:'')); + print $form->selectarray($value, $tmparray, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0, '', 0, 0, 0, '', 'maxwidth250'); print ''; } elseif (in_array($value, array('public', 'use_default'))) { // Fields 0/1 with a combo select Yes/No diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 5dd212b355d..a7a6c048a4d 100644 --- a/htdocs/core/modules/modEventOrganization.class.php +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -258,7 +258,7 @@ class modEventOrganization extends DolibarrModules 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'left', // This is a Left menu entry 'titre'=>'New', - 'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1', + 'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1&usage_opportunity=0', 'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000+$r, 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index 0d5991bb0ac..ac64a16602f 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -185,7 +185,9 @@ if (!empty($withproject)) { // Tabs for project $tab = 'eventorganisation'; $withProjectUrl = "&withproject=1"; + $head = project_prepare_head($projectstatic); + print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', ''); $param = ($mode == 'mine' ? '&mode=mine' : ''); @@ -468,6 +470,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $res = $object->fetch_optionals(); $head = conferenceorboothPrepareHead($object, $withproject); + print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBooth"), -1, $object->picto); $formconfirm = ''; diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index 972e546255f..c1626f7bbf3 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -947,7 +947,7 @@ if ($num == 0) { $colspan++; } } - print ''.$langs->trans("NoRecordFound").''; + print ''.$langs->trans("NoRecordFound").''; } diff --git a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php index 6a76a14a38c..8d0f442e900 100644 --- a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php +++ b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php @@ -47,12 +47,12 @@ function conferenceorboothPrepareHead($object, $with_project = 0) $head[$h][2] = 'card'; $h++; - /* - $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl; - $head[$h][1] = $langs->trans("ContactsAddresses"); - $head[$h][2] = 'contact'; - $h++; - */ + if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl; + $head[$h][1] = $langs->trans("ContactsAddresses"); + $head[$h][2] = 'contact'; + $h++; + } /* $head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 1e9fd292c69..aabf14e8655 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -563,7 +563,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print ''; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print ' '; + print ' '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print ''; print ''; print '
'; } if (empty($conf->global->PROJECT_HIDE_TASKS)) { - print ' '; + print ' '; $htmltext = $langs->trans("ProjectFollowTasks"); print ''; print '
'; } if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { - print ' '; + print ' '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print ''; print '
'; } if (!empty($conf->eventorganization->enabled)) { - print ' '; + print ' '; $htmltext = $langs->trans("EventOrganizationDescriptionLong"); print ''; } @@ -734,7 +738,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; - // Change probability from status + // Change probability from status or role of project print ''; print '
'; diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index cb1b1089b0c..52193e4fcd4 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -101,7 +101,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'"); +$arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { @@ -612,8 +612,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''; } // Type of event -print ''.$langs->trans("EventType").'*'."\n"; -print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).''; +print ''.$langs->trans("Format").'*'."\n"; +print ''.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).''; // Label print ''.$langs->trans("LabelOfBooth").'*'."\n"; print ''."\n"; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index ca34a05253d..05cc8e61a82 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -102,7 +102,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'"); +$arrayofconfboothtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { @@ -546,8 +546,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''; } // Type of event -print ''.$langs->trans("EventType").'*'."\n"; -print ''.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).''; +print ''.$langs->trans("Format").'*'."\n"; +print ''.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).''; // Label print ''.$langs->trans("LabelOfconference").'*'."\n"; print ''."\n"; From 77389b3855d4faf579b87a9c10312651bb837f4e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 17:35:31 +0200 Subject: [PATCH 043/105] Fix trans --- htdocs/core/class/translate.class.php | 5 ++++- htdocs/langs/am_ET/errors.lang | 2 +- htdocs/langs/ar_DZ/errors.lang | 2 +- htdocs/langs/ar_JO/errors.lang | 2 +- htdocs/langs/ar_SA/errors.lang | 2 +- htdocs/langs/ar_SY/errors.lang | 2 +- htdocs/langs/az_AZ/errors.lang | 2 +- htdocs/langs/bg_BG/errors.lang | 2 +- htdocs/langs/bn_BD/errors.lang | 2 +- htdocs/langs/bn_IN/errors.lang | 2 +- htdocs/langs/bs_BA/errors.lang | 2 +- htdocs/langs/ca_ES/errors.lang | 2 +- htdocs/langs/cs_CZ/errors.lang | 2 +- htdocs/langs/cy_GB/errors.lang | 2 +- htdocs/langs/da_DK/errors.lang | 2 +- htdocs/langs/de_DE/errors.lang | 2 +- htdocs/langs/el_GR/errors.lang | 2 +- htdocs/langs/en_US/errors.lang | 2 +- htdocs/langs/es_ES/errors.lang | 2 +- htdocs/langs/et_EE/errors.lang | 2 +- htdocs/langs/eu_ES/errors.lang | 2 +- htdocs/langs/fa_IR/errors.lang | 2 +- htdocs/langs/fi_FI/errors.lang | 2 +- htdocs/langs/fr_FR/errors.lang | 2 +- htdocs/langs/gl_ES/errors.lang | 2 +- htdocs/langs/he_IL/errors.lang | 2 +- htdocs/langs/hi_IN/errors.lang | 2 +- htdocs/langs/hr_HR/errors.lang | 2 +- htdocs/langs/hu_HU/errors.lang | 2 +- htdocs/langs/id_ID/errors.lang | 2 +- htdocs/langs/is_IS/errors.lang | 2 +- htdocs/langs/it_IT/errors.lang | 2 +- htdocs/langs/ja_JP/errors.lang | 2 +- htdocs/langs/ka_GE/errors.lang | 2 +- htdocs/langs/kk_KZ/errors.lang | 2 +- htdocs/langs/km_KH/errors.lang | 2 +- htdocs/langs/kn_IN/errors.lang | 2 +- htdocs/langs/ko_KR/errors.lang | 2 +- htdocs/langs/lo_LA/errors.lang | 2 +- htdocs/langs/lt_LT/errors.lang | 2 +- htdocs/langs/lv_LV/errors.lang | 2 +- htdocs/langs/mk_MK/errors.lang | 2 +- htdocs/langs/mn_MN/errors.lang | 2 +- htdocs/langs/ms_MY/errors.lang | 2 +- htdocs/langs/my_MM/errors.lang | 2 +- htdocs/langs/nb_NO/errors.lang | 2 +- htdocs/langs/ne_NP/errors.lang | 2 +- htdocs/langs/nl_NL/errors.lang | 2 +- htdocs/langs/pl_PL/errors.lang | 2 +- htdocs/langs/pt_PT/errors.lang | 2 +- htdocs/langs/ro_RO/errors.lang | 2 +- htdocs/langs/ru_RU/errors.lang | 2 +- htdocs/langs/sk_SK/errors.lang | 2 +- htdocs/langs/sl_SI/errors.lang | 2 +- htdocs/langs/sq_AL/errors.lang | 2 +- htdocs/langs/sr_RS/errors.lang | 2 +- htdocs/langs/sv_SE/errors.lang | 2 +- htdocs/langs/sw_SW/errors.lang | 2 +- htdocs/langs/ta_IN/errors.lang | 2 +- htdocs/langs/tg_TJ/errors.lang | 2 +- htdocs/langs/th_TH/errors.lang | 2 +- htdocs/langs/tr_TR/errors.lang | 2 +- htdocs/langs/uk_UA/errors.lang | 2 +- htdocs/langs/ur_PK/errors.lang | 2 +- htdocs/langs/uz_UZ/errors.lang | 2 +- htdocs/langs/vi_VN/errors.lang | 2 +- htdocs/langs/zh_CN/errors.lang | 2 +- htdocs/langs/zh_HK/errors.lang | 2 +- htdocs/langs/zh_TW/errors.lang | 2 +- test/phpunit/LangTest.php | 4 ++++ 70 files changed, 76 insertions(+), 69 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index c11f94fa047..255cdb2fb67 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -637,7 +637,10 @@ class Translate ); if (strpos($key, 'Format') !== 0) { - $str = sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings. + try { + $str = sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings. + } catch (Exception $e) { + } } // Crypt string into HTML diff --git a/htdocs/langs/am_ET/errors.lang b/htdocs/langs/am_ET/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/am_ET/errors.lang +++ b/htdocs/langs/am_ET/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_DZ/errors.lang b/htdocs/langs/ar_DZ/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ar_DZ/errors.lang +++ b/htdocs/langs/ar_DZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_JO/errors.lang b/htdocs/langs/ar_JO/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ar_JO/errors.lang +++ b/htdocs/langs/ar_JO/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_SA/errors.lang b/htdocs/langs/ar_SA/errors.lang index 0b94eabbb83..436921eaaef 100644 --- a/htdocs/langs/ar_SA/errors.lang +++ b/htdocs/langs/ar_SA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_SY/errors.lang b/htdocs/langs/ar_SY/errors.lang index 0bac7cf07c8..8097d3a5b6f 100644 --- a/htdocs/langs/ar_SY/errors.lang +++ b/htdocs/langs/ar_SY/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/az_AZ/errors.lang b/htdocs/langs/az_AZ/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/az_AZ/errors.lang +++ b/htdocs/langs/az_AZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bg_BG/errors.lang b/htdocs/langs/bg_BG/errors.lang index ceb6c75ae21..f254274c96d 100644 --- a/htdocs/langs/bg_BG/errors.lang +++ b/htdocs/langs/bg_BG/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bn_BD/errors.lang b/htdocs/langs/bn_BD/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/bn_BD/errors.lang +++ b/htdocs/langs/bn_BD/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bn_IN/errors.lang b/htdocs/langs/bn_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/bn_IN/errors.lang +++ b/htdocs/langs/bn_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bs_BA/errors.lang b/htdocs/langs/bs_BA/errors.lang index 864a09e3e63..25fa336f994 100644 --- a/htdocs/langs/bs_BA/errors.lang +++ b/htdocs/langs/bs_BA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index 26ec96567de..1cdc1133512 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primer heu de configurar el vostre pla ErrorFailedToFindEmailTemplate=No s'ha pogut trobar la plantilla amb el nom de codi %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durada no definida al servei. No hi ha manera de calcular el preu per hora. ErrorActionCommPropertyUserowneridNotDefined=El propietari de l'usuari és obligatori -ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %n, codi: %s) no existeix al diccionari del tipus d'esdeveniment +ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %s, codi: %s) no existeix al diccionari del tipus d'esdeveniment CheckVersionFail=Error de comprovació de versió ErrorWrongFileName=El nom del fitxer no pot contenir __COSA__ ErrorNotInDictionaryPaymentConditions=No es troba al Diccionari de condicions de pagament, modifiqueu-lo. diff --git a/htdocs/langs/cs_CZ/errors.lang b/htdocs/langs/cs_CZ/errors.lang index e530b0dbba3..15fdd697542 100644 --- a/htdocs/langs/cs_CZ/errors.lang +++ b/htdocs/langs/cs_CZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/cy_GB/errors.lang b/htdocs/langs/cy_GB/errors.lang index 01244d8d8eb..67831088584 100644 --- a/htdocs/langs/cy_GB/errors.lang +++ b/htdocs/langs/cy_GB/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Yn gyntaf rhaid i chi osod eich siart c ErrorFailedToFindEmailTemplate=Wedi methu dod o hyd i dempled gydag enw cod %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Hyd heb ei ddiffinio ar y gwasanaeth. Dim ffordd i gyfrifo'r pris fesul awr. ErrorActionCommPropertyUserowneridNotDefined=Mae angen perchennog y defnyddiwr -ErrorActionCommBadType=Nid yw'r math o ddigwyddiad a ddewiswyd (id: %n, cod: %s) yn bodoli mewn geiriadur Math o Ddigwyddiad +ErrorActionCommBadType=Nid yw'r math o ddigwyddiad a ddewiswyd (id: %s, cod: %s) yn bodoli mewn geiriadur Math o Ddigwyddiad CheckVersionFail=Fersiwn gwirio yn methu ErrorWrongFileName=Ni all enw'r ffeil fod â __SOMETHING__ ynddi ErrorNotInDictionaryPaymentConditions=Ddim yn y Geiriadur Telerau Talu, addaswch. diff --git a/htdocs/langs/da_DK/errors.lang b/htdocs/langs/da_DK/errors.lang index f290ed2774a..eb45404ac14 100644 --- a/htdocs/langs/da_DK/errors.lang +++ b/htdocs/langs/da_DK/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du skal først konfigurere din kontopla ErrorFailedToFindEmailTemplate=Kunne ikke finde skabelon med kodenavn %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varighed er ikke defineret i tjenesten. Ingen måde at beregne timeprisen på. ErrorActionCommPropertyUserowneridNotDefined=Brugerens ejer kræves -ErrorActionCommBadType=Den valgte hændelsestype (id: %n, kode: %s) findes ikke i begivenhedstypeordbogen +ErrorActionCommBadType=Den valgte hændelsestype (id: %s, kode: %s) findes ikke i begivenhedstypeordbogen CheckVersionFail=Versionskontrol mislykkedes ErrorWrongFileName=Filens navn kan ikke indeholde __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Ikke i ordbogen om betalingsbetingelser, bedes du ændre. diff --git a/htdocs/langs/de_DE/errors.lang b/htdocs/langs/de_DE/errors.lang index f0dcb3381c3..b871ef62d28 100644 --- a/htdocs/langs/de_DE/errors.lang +++ b/htdocs/langs/de_DE/errors.lang @@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Sie müssen zuerst Ihren Kontenplan ein ErrorFailedToFindEmailTemplate=Vorlage mit Codename %s konnte nicht gefunden werden ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Die Dauer für die Leistung ist nicht definiert. Es besteht keine Möglichkeit, den Stundenpreis zu berechnen. ErrorActionCommPropertyUserowneridNotDefined=Der Besitzer des Benutzers ist erforderlich -ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %n, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden +ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %s, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden CheckVersionFail=Versionsprüfung fehlgeschlagen ErrorWrongFileName=Der Dateiname darf nicht __SOMETHING__ enthalten ErrorNotInDictionaryPaymentConditions=Nicht im Dictionary der Zahlungsbedingungen, bitte ändern. diff --git a/htdocs/langs/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index f30e49f7fe7..15d6c44b1c8 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Πρέπει πρώτα να ρυθμί ErrorFailedToFindEmailTemplate=Αδυναμία εύρεσης προτύπου με κωδικό όνομα %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Η διάρκεια δεν έχει οριστεί στην υπηρεσία. Δεν υπάρχει τρόπος υπολογισμού της ωριαίας τιμής. ErrorActionCommPropertyUserowneridNotDefined=Απαιτείται το owner id του χρήστη -ErrorActionCommBadType=Ο επιλεγμένος τύπος συμβάντος (αναγνωριστικό: %n, κωδικός: %s) δεν υπάρχει στο λεξικό Τύπου συμβάντος +ErrorActionCommBadType=Ο επιλεγμένος τύπος συμβάντος (αναγνωριστικό: %s, κωδικός: %s) δεν υπάρχει στο λεξικό Τύπου συμβάντος CheckVersionFail=Αποτυχία ελέγχου έκδοσης ErrorWrongFileName=Το όνομα του αρχείου δεν μπορεί να έχει __ΚΑΤΙ__ σε αυτό ErrorNotInDictionaryPaymentConditions=Δεν υπάρχει στο Λεξικό Όρων Πληρωμής, παρακαλώ τροποποιήστε. diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 7e29572c9f5..9d38eab591e 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 1c8597c2b51..23f51ef871b 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primero debe configurar su plan de cuen ErrorFailedToFindEmailTemplate=No se pudo encontrar la plantilla con el nombre de código %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duración no definida en el servicio. No hay forma de calcular el precio por hora. ErrorActionCommPropertyUserowneridNotDefined=Se requiere el propietario del usuario -ErrorActionCommBadType=El tipo de evento seleccionado (id: %n, código: %s) no existe en el diccionario de tipo de evento +ErrorActionCommBadType=El tipo de evento seleccionado (id: %s, código: %s) no existe en el diccionario de tipo de evento CheckVersionFail=Error de verificación de versión ErrorWrongFileName=El nombre del archivo no puede contener __SOMETHING__ ErrorNotInDictionaryPaymentConditions=No está en el Diccionario de términos de pago, modifíquelo. diff --git a/htdocs/langs/et_EE/errors.lang b/htdocs/langs/et_EE/errors.lang index e6cb1458234..3e4e7b3638a 100644 --- a/htdocs/langs/et_EE/errors.lang +++ b/htdocs/langs/et_EE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/eu_ES/errors.lang b/htdocs/langs/eu_ES/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/eu_ES/errors.lang +++ b/htdocs/langs/eu_ES/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 1231bb9e621..4cd240fef47 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fi_FI/errors.lang b/htdocs/langs/fi_FI/errors.lang index bbbace60e76..9a5148d92c3 100644 --- a/htdocs/langs/fi_FI/errors.lang +++ b/htdocs/langs/fi_FI/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 234dc56941c..fa0112fc021 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Vous devez d’abord configurer votre p ErrorFailedToFindEmailTemplate=Aucun gabarit trouvé avec le code %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durée non définie sur le service. Pas moyen de calculer le prix horaire. ErrorActionCommPropertyUserowneridNotDefined=Le propriétaire de l'utilisateur est requis -ErrorActionCommBadType=Le type d'événement sélectionné (id: %n, code: %s) n'existe pas dans le dictionnaire des types d'événement +ErrorActionCommBadType=Le type d'événement sélectionné (id: %s, code: %s) n'existe pas dans le dictionnaire des types d'événement CheckVersionFail=Échec de la vérification de version ErrorWrongFileName=Le nom du fichier ne peut pas contenir __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Pas dans le dictionnaire des conditions de paiement, veuillez modifier. diff --git a/htdocs/langs/gl_ES/errors.lang b/htdocs/langs/gl_ES/errors.lang index eda9523d233..4042618fcf8 100644 --- a/htdocs/langs/gl_ES/errors.lang +++ b/htdocs/langs/gl_ES/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primeiro debe configurar o seu plan de ErrorFailedToFindEmailTemplate=Fallo ao atopar o modelo co nome de código %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duración non definida no servizo. Non hai forma de calcular o prezo por hora. ErrorActionCommPropertyUserowneridNotDefined=É preciso o supervisor do usuario -ErrorActionCommBadType=O tipo de evento seleccionado (id: %n, código: %s) non existe no diccionario Tipo de Evento +ErrorActionCommBadType=O tipo de evento seleccionado (id: %s, código: %s) non existe no diccionario Tipo de Evento CheckVersionFail=Fallou a comprobación da versión ErrorWrongFileName=O nome do ficheiro non pode conte __SOMETHING__ nel ErrorNotInDictionaryPaymentConditions=Non está no Dicionario de Condicións de Pagamento. Modifíqueo. diff --git a/htdocs/langs/he_IL/errors.lang b/htdocs/langs/he_IL/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/he_IL/errors.lang +++ b/htdocs/langs/he_IL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hi_IN/errors.lang b/htdocs/langs/hi_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/hi_IN/errors.lang +++ b/htdocs/langs/hi_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hr_HR/errors.lang b/htdocs/langs/hr_HR/errors.lang index 1d6bf9b2ee0..31f089cdee2 100644 --- a/htdocs/langs/hr_HR/errors.lang +++ b/htdocs/langs/hr_HR/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Nije uspjelo pronaći predložak s kodnim nazivom %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Trajanje nije definirano na usluzi. Nema načina da se izračuna satnica. ErrorActionCommPropertyUserowneridNotDefined=Potreban je vlasnik korisnika -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Provjera verzije nije uspjela ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hu_HU/errors.lang b/htdocs/langs/hu_HU/errors.lang index 6e46cdadd26..f9cd488d322 100644 --- a/htdocs/langs/hu_HU/errors.lang +++ b/htdocs/langs/hu_HU/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Először be kell állítania a számla ErrorFailedToFindEmailTemplate=Nem sikerült megtalálni a %s kódnevű sablont ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=A szolgáltatás időtartama nincs meghatározva. Nincs mód az óraárak kiszámítására. ErrorActionCommPropertyUserowneridNotDefined=A felhasználó tulajdonosa kötelező -ErrorActionCommBadType=A kiválasztott eseménytípus (azonosító: %n, kód: %s) nem létezik az Eseménytípus szótárban +ErrorActionCommBadType=A kiválasztott eseménytípus (azonosító: %s, kód: %s) nem létezik az Eseménytípus szótárban CheckVersionFail=A verzióellenőrzés sikertelen ErrorWrongFileName=A fájl nevében nem lehet __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Nem szerepel a Fizetési feltételek szótárban, kérjük módosítsa. diff --git a/htdocs/langs/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index bbe8da704b3..869322fa9cc 100644 --- a/htdocs/langs/id_ID/errors.lang +++ b/htdocs/langs/id_ID/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Anda harus terlebih dahulu mengatur bag ErrorFailedToFindEmailTemplate=Gagal menemukan template dengan nama kode %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durasi tidak ditentukan pada layanan. Tidak ada cara untuk menghitung harga per jam. ErrorActionCommPropertyUserowneridNotDefined=Pemilik pengguna diperlukan -ErrorActionCommBadType=Jenis peristiwa yang dipilih (id: %n, kode: %s) tidak ada di kamus Jenis Peristiwa +ErrorActionCommBadType=Jenis peristiwa yang dipilih (id: %s, kode: %s) tidak ada di kamus Jenis Peristiwa CheckVersionFail=Pemeriksaan versi gagal ErrorWrongFileName=Nama file tidak boleh memiliki __SOMETHING__ di dalamnya ErrorNotInDictionaryPaymentConditions=Tidak ada dalam Kamus Istilah Pembayaran, harap ubah. diff --git a/htdocs/langs/is_IS/errors.lang b/htdocs/langs/is_IS/errors.lang index a6d3ae56134..d8282e3e62a 100644 --- a/htdocs/langs/is_IS/errors.lang +++ b/htdocs/langs/is_IS/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/it_IT/errors.lang b/htdocs/langs/it_IT/errors.lang index f784773bb16..e7d8359baaf 100644 --- a/htdocs/langs/it_IT/errors.lang +++ b/htdocs/langs/it_IT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Devi prima impostare il tuo piano dei c ErrorFailedToFindEmailTemplate=Impossibile trovare il modello con nome in codice %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durata non definita in servizio. Non c'è modo di calcolare il prezzo orario. ErrorActionCommPropertyUserowneridNotDefined=Il proprietario dell'utente è obbligatorio -ErrorActionCommBadType=Il tipo di evento selezionato (id: %n, codice: %s) non esiste nel dizionario del tipo di evento +ErrorActionCommBadType=Il tipo di evento selezionato (id: %s, codice: %s) non esiste nel dizionario del tipo di evento CheckVersionFail=Controllo della versione fallito ErrorWrongFileName=Il nome del file non può contenere __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Non nel dizionario dei termini di pagamento, modificare. diff --git a/htdocs/langs/ja_JP/errors.lang b/htdocs/langs/ja_JP/errors.lang index d415243148a..f2e201f1c53 100644 --- a/htdocs/langs/ja_JP/errors.lang +++ b/htdocs/langs/ja_JP/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=最初に勘定科目表を設定する ErrorFailedToFindEmailTemplate=コードネーム%sのテンプレートが見つからない ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=サービスで期間が定義されていない。時給計算する方法がない。 ErrorActionCommPropertyUserowneridNotDefined=ユーザの所有者が必要 -ErrorActionCommBadType=選択したイベント種別 (id: %n, code: %s) がイベント種別辞書に存在しない +ErrorActionCommBadType=選択したイベント種別 (id: %s, code: %s) がイベント種別辞書に存在しない CheckVersionFail=バージョンチェックに失敗する ErrorWrongFileName=ファイル名に__SOMETHING__を含めることはできない ErrorNotInDictionaryPaymentConditions=支払条件辞書にないので、変更すること。 diff --git a/htdocs/langs/ka_GE/errors.lang b/htdocs/langs/ka_GE/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ka_GE/errors.lang +++ b/htdocs/langs/ka_GE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/kk_KZ/errors.lang b/htdocs/langs/kk_KZ/errors.lang index e10bb476fff..6792201a546 100644 --- a/htdocs/langs/kk_KZ/errors.lang +++ b/htdocs/langs/kk_KZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Алдымен сіз өзіңізді ErrorFailedToFindEmailTemplate=%s коды бар үлгі табылмады ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Қызмет көрсету мерзімі анықталмаған. Сағаттық бағаны есептеуге болмайды. ErrorActionCommPropertyUserowneridNotDefined=Пайдаланушының иесі қажет -ErrorActionCommBadType=Таңдалған оқиға түрі (идентификатор: %n, код: %s) оқиға түрі сөздігінде жоқ +ErrorActionCommBadType=Таңдалған оқиға түрі (идентификатор: %s, код: %s) оқиға түрі сөздігінде жоқ CheckVersionFail=Нұсқаны тексеру сәтсіз аяқталды ErrorWrongFileName=Файл атауында __SOMETHING__ болмайды ErrorNotInDictionaryPaymentConditions=Төлем шарттары сөздігінде жоқ, өзгертіңіз. diff --git a/htdocs/langs/km_KH/errors.lang b/htdocs/langs/km_KH/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/km_KH/errors.lang +++ b/htdocs/langs/km_KH/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/kn_IN/errors.lang b/htdocs/langs/kn_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/kn_IN/errors.lang +++ b/htdocs/langs/kn_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ko_KR/errors.lang b/htdocs/langs/ko_KR/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ko_KR/errors.lang +++ b/htdocs/langs/ko_KR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/lo_LA/errors.lang b/htdocs/langs/lo_LA/errors.lang index be5f507a576..8390ff24a66 100644 --- a/htdocs/langs/lo_LA/errors.lang +++ b/htdocs/langs/lo_LA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=ກ່ອນອື່ນmustົດທ ErrorFailedToFindEmailTemplate=ການຊອກຫາແມ່ແບບທີ່ມີລະຫັດຊື່ %s ລົ້ມເຫລວ ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=ບໍ່ໄດ້ ກຳ ນົດໄລຍະເວລາການບໍລິການ. ບໍ່ມີທາງທີ່ຈະຄິດໄລ່ລາຄາຊົ່ວໂມງ. ErrorActionCommPropertyUserowneridNotDefined=ເຈົ້າຂອງຜູ້ໃຊ້ແມ່ນຕ້ອງການ -ErrorActionCommBadType=ປະເພດເຫດການທີ່ເລືອກ (id: %n, ລະຫັດ: %s) ບໍ່ມີຢູ່ໃນວັດຈະນານຸກົມປະເພດເຫດການ +ErrorActionCommBadType=ປະເພດເຫດການທີ່ເລືອກ (id: %s, ລະຫັດ: %s) ບໍ່ມີຢູ່ໃນວັດຈະນານຸກົມປະເພດເຫດການ CheckVersionFail=ກວດສອບເວີຊັນບໍ່ ສຳ ເລັດ ErrorWrongFileName=ຊື່ຂອງໄຟລ cannot ບໍ່ສາມາດມີ __SOMETHING__ ໃນມັນໄດ້ ErrorNotInDictionaryPaymentConditions=ບໍ່ຢູ່ໃນວັດຈະນານຸກົມເງື່ອນໄຂການຈ່າຍເງິນ, ກະລຸນາແກ້ໄຂ. diff --git a/htdocs/langs/lt_LT/errors.lang b/htdocs/langs/lt_LT/errors.lang index 7155a7694df..cff79292d37 100644 --- a/htdocs/langs/lt_LT/errors.lang +++ b/htdocs/langs/lt_LT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/lv_LV/errors.lang b/htdocs/langs/lv_LV/errors.lang index e07086a7373..7e63665c0b6 100644 --- a/htdocs/langs/lv_LV/errors.lang +++ b/htdocs/langs/lv_LV/errors.lang @@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Vispirms jums ir jāiestata konta plān ErrorFailedToFindEmailTemplate=Neizdevās atrast veidni ar koda nosaukumu %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Ilgums pakalpojumā nav noteikts. Nav iespējams aprēķināt stundas cenu. ErrorActionCommPropertyUserowneridNotDefined=Nepieciešams lietotāja īpašnieks -ErrorActionCommBadType=Atlasītais notikuma veids (id: %n, kods: %s) nepastāv notikuma veida vārdnīcā +ErrorActionCommBadType=Atlasītais notikuma veids (id: %s, kods: %s) nepastāv notikuma veida vārdnīcā CheckVersionFail=Versijas pārbaude neizdevās ErrorWrongFileName=Faila nosaukumā nedrīkst būt __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Nav Maksājumu nosacījumu vārdnīcā, lūdzu, modificējiet. diff --git a/htdocs/langs/mk_MK/errors.lang b/htdocs/langs/mk_MK/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/mk_MK/errors.lang +++ b/htdocs/langs/mk_MK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/mn_MN/errors.lang b/htdocs/langs/mn_MN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/mn_MN/errors.lang +++ b/htdocs/langs/mn_MN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ms_MY/errors.lang b/htdocs/langs/ms_MY/errors.lang index 44ce0211742..ceef384ddb3 100644 --- a/htdocs/langs/ms_MY/errors.lang +++ b/htdocs/langs/ms_MY/errors.lang @@ -271,7 +271,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/my_MM/errors.lang b/htdocs/langs/my_MM/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/my_MM/errors.lang +++ b/htdocs/langs/my_MM/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/nb_NO/errors.lang b/htdocs/langs/nb_NO/errors.lang index e97723984b2..55e9d540fed 100644 --- a/htdocs/langs/nb_NO/errors.lang +++ b/htdocs/langs/nb_NO/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du må først konfigurere kontoplanen d ErrorFailedToFindEmailTemplate=Kunne ikke finne mal med kodenavn %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varighet ikke definert på tjenesten. Ingen måte å beregne timeprisen. ErrorActionCommPropertyUserowneridNotDefined=Brukerens eier kreves -ErrorActionCommBadType=Valgt hendelsestype (id: %n, kode: %s) finnes ikke i ordboken for hendelsestype +ErrorActionCommBadType=Valgt hendelsestype (id: %s, kode: %s) finnes ikke i ordboken for hendelsestype CheckVersionFail=Versjonskontroll mislyktes ErrorWrongFileName=Navnet på filen kan ikke inneholde __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Ikke i ordboken for betalingsvilkår, vennligst endre. diff --git a/htdocs/langs/ne_NP/errors.lang b/htdocs/langs/ne_NP/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ne_NP/errors.lang +++ b/htdocs/langs/ne_NP/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/nl_NL/errors.lang b/htdocs/langs/nl_NL/errors.lang index fe70a2010cb..ed4a55d1aab 100644 --- a/htdocs/langs/nl_NL/errors.lang +++ b/htdocs/langs/nl_NL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=U moet eerst uw rekeningschema instelle ErrorFailedToFindEmailTemplate=Kan sjabloon met codenaam %s . niet vinden ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=De lengte is niet gedefinieerd in de dienst. We kunnen de uurkosten niet berekenen. ErrorActionCommPropertyUserowneridNotDefined=Eigenaar van gebruiker is vereist -ErrorActionCommBadType=Het geselecteerde gebeurtenistype (id: %n, code: %s) bestaat niet in het woordenboek voor gebeurtenistypes +ErrorActionCommBadType=Het geselecteerde gebeurtenistype (id: %s, code: %s) bestaat niet in het woordenboek voor gebeurtenistypes CheckVersionFail=Versiecontrole mislukt ErrorWrongFileName=De naam van het bestand mag niet __SOMETHING__ bevatten ErrorNotInDictionaryPaymentConditions=Niet bekend in de gedefinieerde betaalregelingen, graag wijzigen diff --git a/htdocs/langs/pl_PL/errors.lang b/htdocs/langs/pl_PL/errors.lang index 2022a84943f..fb75cc0a943 100644 --- a/htdocs/langs/pl_PL/errors.lang +++ b/htdocs/langs/pl_PL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Najpierw musisz ustawić swój plan kon ErrorFailedToFindEmailTemplate=Nie udało się znaleźć szablonu o nazwie kodowej %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=Właściciel użytkownika jest wymagany -ErrorActionCommBadType=Wybrany typ zdarzenia (id: %n, kod: %s) nie istnieje w słowniku typów zdarzeń +ErrorActionCommBadType=Wybrany typ zdarzenia (id: %s, kod: %s) nie istnieje w słowniku typów zdarzeń CheckVersionFail=Sprawdzanie wersji nie powiodło się ErrorWrongFileName=Nazwa pliku nie może zawierać __COŚ__ ErrorNotInDictionaryPaymentConditions=Nie w Słowniku terminów płatności, zmień. diff --git a/htdocs/langs/pt_PT/errors.lang b/htdocs/langs/pt_PT/errors.lang index dc0eb4f58d5..2b0dda28541 100644 --- a/htdocs/langs/pt_PT/errors.lang +++ b/htdocs/langs/pt_PT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ro_RO/errors.lang b/htdocs/langs/ro_RO/errors.lang index 7b55c5259c6..8df5d2b5e43 100644 --- a/htdocs/langs/ro_RO/errors.lang +++ b/htdocs/langs/ro_RO/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Trebuie să setezi mai întâi planul d ErrorFailedToFindEmailTemplate=Nu s-a găsit șablonul cu numele de cod %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durata nu este definită pentru serviciu. Nicio modalitate de a calcula prețul pe oră. ErrorActionCommPropertyUserowneridNotDefined=Utilizatorul deţinător este obligatoriu -ErrorActionCommBadType=Tipul evenimentului selectat (id: %n, cod: %s) nu există în dicţionarul Tipuri evenimente +ErrorActionCommBadType=Tipul evenimentului selectat (id: %s, cod: %s) nu există în dicţionarul Tipuri evenimente CheckVersionFail=Verificarea versiunii a eşuat ErrorWrongFileName=Numele fișierului nu poate să conțină _SOMETHING_ în el ErrorNotInDictionaryPaymentConditions=Nu se află în dicționarul Condiții de plată, vă rugăm să modificați. diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index 088cae1a1b0..c40292244f2 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Вы должны сначала нас ErrorFailedToFindEmailTemplate=Не удалось найти шаблон с кодовым названием %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Срок службы не определен. Невозможно рассчитать почасовую оплату. ErrorActionCommPropertyUserowneridNotDefined=Требуется владелец пользователя -ErrorActionCommBadType=Выбранный тип события (id: %n, код: %s) не существует в словаре типов событий +ErrorActionCommBadType=Выбранный тип события (id: %s, код: %s) не существует в словаре типов событий CheckVersionFail=Ошибка проверки версии ErrorWrongFileName=Имя файла не может содержать __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Нет в Словаре условий оплаты, пожалуйста, измените. diff --git a/htdocs/langs/sk_SK/errors.lang b/htdocs/langs/sk_SK/errors.lang index cbb983f03f0..a3f364bae15 100644 --- a/htdocs/langs/sk_SK/errors.lang +++ b/htdocs/langs/sk_SK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sl_SI/errors.lang b/htdocs/langs/sl_SI/errors.lang index a27b6fceea6..7910fee7eaa 100644 --- a/htdocs/langs/sl_SI/errors.lang +++ b/htdocs/langs/sl_SI/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sq_AL/errors.lang b/htdocs/langs/sq_AL/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/sq_AL/errors.lang +++ b/htdocs/langs/sq_AL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sr_RS/errors.lang b/htdocs/langs/sr_RS/errors.lang index ce3cbc6b148..30b2026e6ca 100644 --- a/htdocs/langs/sr_RS/errors.lang +++ b/htdocs/langs/sr_RS/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sv_SE/errors.lang b/htdocs/langs/sv_SE/errors.lang index 6eac66b349a..e56c87c8212 100644 --- a/htdocs/langs/sv_SE/errors.lang +++ b/htdocs/langs/sv_SE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du måste först ställa in ditt kontop ErrorFailedToFindEmailTemplate=Det gick inte att hitta mall med kodnamn %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varaktighet definieras inte i tjänsten. Inget sätt att beräkna timpriset. ErrorActionCommPropertyUserowneridNotDefined=Användarens ägare krävs -ErrorActionCommBadType=Vald händelsetyp (id: %n, kod: %s) finns inte i ordlistan för händelsetyp +ErrorActionCommBadType=Vald händelsetyp (id: %s, kod: %s) finns inte i ordlistan för händelsetyp CheckVersionFail=Versionskontroll misslyckades ErrorWrongFileName=Filens namn kan inte innehålla __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Inte i ordningen för betalningsvillkor, ändra. diff --git a/htdocs/langs/sw_SW/errors.lang b/htdocs/langs/sw_SW/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/sw_SW/errors.lang +++ b/htdocs/langs/sw_SW/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ta_IN/errors.lang b/htdocs/langs/ta_IN/errors.lang index 04fa1d14975..d46aeff4ca1 100644 --- a/htdocs/langs/ta_IN/errors.lang +++ b/htdocs/langs/ta_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=முதலில் உங்கள ErrorFailedToFindEmailTemplate=%s என்ற குறியீட்டுப் பெயருடன் டெம்ப்ளேட்டைக் கண்டறிய முடியவில்லை ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=சேவையில் காலம் வரையறுக்கப்படவில்லை. மணிநேர விலையை கணக்கிட வழி இல்லை. ErrorActionCommPropertyUserowneridNotDefined=பயனரின் உரிமையாளர் தேவை -ErrorActionCommBadType=தேர்ந்தெடுக்கப்பட்ட நிகழ்வு வகை (ஐடி: %n, குறியீடு: %s) நிகழ்வு வகை அகராதியில் இல்லை +ErrorActionCommBadType=தேர்ந்தெடுக்கப்பட்ட நிகழ்வு வகை (ஐடி: %s, குறியீடு: %s) நிகழ்வு வகை அகராதியில் இல்லை CheckVersionFail=பதிப்பு சரிபார்ப்பு தோல்வி ErrorWrongFileName=கோப்பின் பெயரில் __சம்திங்__ இருக்கக்கூடாது ErrorNotInDictionaryPaymentConditions=கட்டண விதிமுறைகள் அகராதியில் இல்லை, தயவுசெய்து மாற்றவும். diff --git a/htdocs/langs/tg_TJ/errors.lang b/htdocs/langs/tg_TJ/errors.lang index b861ec4b276..ec74135edae 100644 --- a/htdocs/langs/tg_TJ/errors.lang +++ b/htdocs/langs/tg_TJ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Шумо аввал бояд ҷадва ErrorFailedToFindEmailTemplate=Шаблон бо номи рамзи %s ёфт нашуд ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Давомнокии хидмат муайян карда нашудааст. Ҳеҷ гуна ҳисоб кардани нархи соатбайъ. ErrorActionCommPropertyUserowneridNotDefined=Соҳиби корбар лозим аст -ErrorActionCommBadType=Навъи рӯйдоди интихобшуда (id: %n, рамз: %s) дар луғати навъи чорабиниҳо вуҷуд надорад +ErrorActionCommBadType=Навъи рӯйдоди интихобшуда (id: %s, рамз: %s) дар луғати навъи чорабиниҳо вуҷуд надорад CheckVersionFail=Санҷиши версия ноком шуд ErrorWrongFileName=Номи файл наметавонад дар он __SOMETHING__ дошта бошад ErrorNotInDictionaryPaymentConditions=Дар луғати шартҳои пардохт нест, лутфан тағир диҳед. diff --git a/htdocs/langs/th_TH/errors.lang b/htdocs/langs/th_TH/errors.lang index 43200416193..efeb030607d 100644 --- a/htdocs/langs/th_TH/errors.lang +++ b/htdocs/langs/th_TH/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/tr_TR/errors.lang b/htdocs/langs/tr_TR/errors.lang index 37622276db8..d3cd4ad4a71 100644 --- a/htdocs/langs/tr_TR/errors.lang +++ b/htdocs/langs/tr_TR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/uk_UA/errors.lang b/htdocs/langs/uk_UA/errors.lang index 1f310d658aa..1fd1e371191 100644 --- a/htdocs/langs/uk_UA/errors.lang +++ b/htdocs/langs/uk_UA/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Спочатку потрібно на ErrorFailedToFindEmailTemplate=Не вдалося знайти шаблон із кодовою назвою %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Тривалість обслуговування не визначена. Неможливо розрахувати погодинну ціну. ErrorActionCommPropertyUserowneridNotDefined=Потрібен власник користувача -ErrorActionCommBadType=Вибраний тип події (id: %n, код: %s) не існує в словнику типів події +ErrorActionCommBadType=Вибраний тип події (id: %s, код: %s) не існує в словнику типів події CheckVersionFail=Помилка перевірки версії ErrorWrongFileName=У назві файлу не може бути __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Немає в словнику умов оплати, будь ласка, змініть. diff --git a/htdocs/langs/ur_PK/errors.lang b/htdocs/langs/ur_PK/errors.lang index 905d70ab7fb..b6a2f5c9eb7 100644 --- a/htdocs/langs/ur_PK/errors.lang +++ b/htdocs/langs/ur_PK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=آپ کو پہلے اپنے اکاؤن ErrorFailedToFindEmailTemplate=کوڈ نام %s کے ساتھ ٹیمپلیٹ تلاش کرنے میں ناکام ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=سروس پر مدت کی وضاحت نہیں کی گئی ہے۔ فی گھنٹہ قیمت کا حساب لگانے کا کوئی طریقہ نہیں ہے۔ ErrorActionCommPropertyUserowneridNotDefined=صارف کا مالک درکار ہے۔ -ErrorActionCommBadType=ایونٹ کی قسم کی منتخب کردہ (id: %n، کوڈ: %s) ایونٹ کی قسم ڈکشنری میں موجود نہیں ہے۔ +ErrorActionCommBadType=ایونٹ کی قسم کی منتخب کردہ (id: %s، کوڈ: %s) ایونٹ کی قسم ڈکشنری میں موجود نہیں ہے۔ CheckVersionFail=ورژن کی جانچ ناکام ErrorWrongFileName=فائل کے نام میں __SOMETHING__ نہیں ہو سکتا ErrorNotInDictionaryPaymentConditions=ادائیگی کی شرائط ڈکشنری میں نہیں ہے، براہ کرم ترمیم کریں۔ diff --git a/htdocs/langs/uz_UZ/errors.lang b/htdocs/langs/uz_UZ/errors.lang index e992dabb6b3..54c6345ef66 100644 --- a/htdocs/langs/uz_UZ/errors.lang +++ b/htdocs/langs/uz_UZ/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Avval hisob qaydnomangizni o'rnatishing ErrorFailedToFindEmailTemplate=%s kodli shablonni topib bo'lmadi ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Xizmat muddati aniqlanmagan. Bir soatlik narxni hisoblashning iloji yo'q. ErrorActionCommPropertyUserowneridNotDefined=Foydalanuvchi egasi talab qilinadi -ErrorActionCommBadType=Tanlangan voqea turi (id: %n, kod: %s) Voqealar turi lug'atida mavjud emas +ErrorActionCommBadType=Tanlangan voqea turi (id: %s, kod: %s) Voqealar turi lug'atida mavjud emas CheckVersionFail=Versiyani tekshirib bo'lmadi ErrorWrongFileName=Fayl nomida __SOMETHING__ bo'lishi mumkin emas ErrorNotInDictionaryPaymentConditions=To'lov shartlari lug'atida yo'q, iltimos o'zgartiring. diff --git a/htdocs/langs/vi_VN/errors.lang b/htdocs/langs/vi_VN/errors.lang index 1b8c6ca61b9..8707c21f67a 100644 --- a/htdocs/langs/vi_VN/errors.lang +++ b/htdocs/langs/vi_VN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_CN/errors.lang b/htdocs/langs/zh_CN/errors.lang index 1783be09f3a..53188bca81d 100644 --- a/htdocs/langs/zh_CN/errors.lang +++ b/htdocs/langs/zh_CN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_HK/errors.lang b/htdocs/langs/zh_HK/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/zh_HK/errors.lang +++ b/htdocs/langs/zh_HK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_TW/errors.lang b/htdocs/langs/zh_TW/errors.lang index 5afdeaa2b52..a1e28e2d98a 100644 --- a/htdocs/langs/zh_TW/errors.lang +++ b/htdocs/langs/zh_TW/errors.lang @@ -270,7 +270,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=您必須先設定會計項目表 ErrorFailedToFindEmailTemplate=無法找到代號為 %s 的模板 ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=未在服務中定義時間範圍.無法計算時薪. ErrorActionCommPropertyUserowneridNotDefined=需要用戶的擁有者 -ErrorActionCommBadType=選擇的事件類型(id:%n,代碼:%s)在事件類型分類中不存在 +ErrorActionCommBadType=選擇的事件類型(id:%s,代碼:%s)在事件類型分類中不存在 CheckVersionFail=版本檢查失敗 ErrorWrongFileName=檔案名稱中不可以有__SOMETHING__ ErrorNotInDictionaryPaymentConditions=不在支付條款類別中,請修改。 diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index c9c332b311e..7bd521c2a7a 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -226,6 +226,10 @@ class LangTest extends PHPUnit\Framework\TestCase $result=strpos($filecontent, '%'); // A special % char we don't want. We want the common one. //print __METHOD__." Result for checking we don't have bad percent char = ".$result."\n"; $this->assertTrue($result === false, 'Found a bad percent char % instead of % into file '.$code.'/'.$file); + + $result=preg_match('/%n/m', $filecontent); // A sequence of char we don't want + //print __METHOD__." Result for checking we don't have bad percent char = ".$result."\n"; + $this->assertTrue($result == 0, 'Found a sequence %n into the translation file '.$code.'/'.$file.'. We probably want %s'); } } From 629689b13f19badde29d7fe12b9b69d7532e812a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 18:06:49 +0200 Subject: [PATCH 044/105] Fix bad trans %n instead of %s --- htdocs/langs/am_ET/errors.lang | 2 +- htdocs/langs/ar_DZ/errors.lang | 2 +- htdocs/langs/ar_JO/errors.lang | 2 +- htdocs/langs/ar_SA/errors.lang | 2 +- htdocs/langs/az_AZ/errors.lang | 2 +- htdocs/langs/bg_BG/errors.lang | 2 +- htdocs/langs/bn_BD/errors.lang | 2 +- htdocs/langs/bn_IN/errors.lang | 2 +- htdocs/langs/bs_BA/errors.lang | 2 +- htdocs/langs/ca_ES/errors.lang | 2 +- htdocs/langs/cs_CZ/errors.lang | 2 +- htdocs/langs/da_DK/errors.lang | 2 +- htdocs/langs/de_DE/errors.lang | 2 +- htdocs/langs/el_GR/errors.lang | 2 +- htdocs/langs/en_US/errors.lang | 2 +- htdocs/langs/es_ES/errors.lang | 2 +- htdocs/langs/et_EE/errors.lang | 2 +- htdocs/langs/eu_ES/errors.lang | 2 +- htdocs/langs/fa_IR/errors.lang | 2 +- htdocs/langs/fi_FI/errors.lang | 2 +- htdocs/langs/fr_FR/errors.lang | 2 +- htdocs/langs/gl_ES/errors.lang | 2 +- htdocs/langs/he_IL/errors.lang | 2 +- htdocs/langs/hi_IN/errors.lang | 2 +- htdocs/langs/hr_HR/errors.lang | 2 +- htdocs/langs/hu_HU/errors.lang | 2 +- htdocs/langs/id_ID/errors.lang | 2 +- htdocs/langs/is_IS/errors.lang | 2 +- htdocs/langs/it_IT/errors.lang | 2 +- htdocs/langs/ja_JP/errors.lang | 2 +- htdocs/langs/ka_GE/errors.lang | 2 +- htdocs/langs/kk_KZ/errors.lang | 2 +- htdocs/langs/km_KH/errors.lang | 2 +- htdocs/langs/kn_IN/errors.lang | 2 +- htdocs/langs/ko_KR/errors.lang | 2 +- htdocs/langs/lo_LA/errors.lang | 2 +- htdocs/langs/lt_LT/errors.lang | 2 +- htdocs/langs/lv_LV/errors.lang | 2 +- htdocs/langs/mk_MK/errors.lang | 2 +- htdocs/langs/mn_MN/errors.lang | 2 +- htdocs/langs/my_MM/errors.lang | 2 +- htdocs/langs/nb_NO/errors.lang | 2 +- htdocs/langs/ne_NP/errors.lang | 2 +- htdocs/langs/nl_NL/errors.lang | 2 +- htdocs/langs/pl_PL/errors.lang | 2 +- htdocs/langs/pt_PT/errors.lang | 2 +- htdocs/langs/ro_RO/errors.lang | 2 +- htdocs/langs/ru_RU/errors.lang | 2 +- htdocs/langs/sk_SK/errors.lang | 2 +- htdocs/langs/sl_SI/errors.lang | 2 +- htdocs/langs/sq_AL/errors.lang | 2 +- htdocs/langs/sr_RS/errors.lang | 2 +- htdocs/langs/sv_SE/errors.lang | 2 +- htdocs/langs/sw_SW/errors.lang | 2 +- htdocs/langs/ta_IN/errors.lang | 2 +- htdocs/langs/tg_TJ/errors.lang | 2 +- htdocs/langs/th_TH/errors.lang | 2 +- htdocs/langs/tr_TR/errors.lang | 2 +- htdocs/langs/uk_UA/errors.lang | 2 +- htdocs/langs/ur_PK/errors.lang | 2 +- htdocs/langs/uz_UZ/errors.lang | 2 +- htdocs/langs/vi_VN/errors.lang | 2 +- htdocs/langs/zh_CN/errors.lang | 2 +- htdocs/langs/zh_HK/errors.lang | 2 +- htdocs/langs/zh_TW/errors.lang | 2 +- 65 files changed, 65 insertions(+), 65 deletions(-) diff --git a/htdocs/langs/am_ET/errors.lang b/htdocs/langs/am_ET/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/am_ET/errors.lang +++ b/htdocs/langs/am_ET/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_DZ/errors.lang b/htdocs/langs/ar_DZ/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ar_DZ/errors.lang +++ b/htdocs/langs/ar_DZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_JO/errors.lang b/htdocs/langs/ar_JO/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ar_JO/errors.lang +++ b/htdocs/langs/ar_JO/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ar_SA/errors.lang b/htdocs/langs/ar_SA/errors.lang index 0b94eabbb83..436921eaaef 100644 --- a/htdocs/langs/ar_SA/errors.lang +++ b/htdocs/langs/ar_SA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/az_AZ/errors.lang b/htdocs/langs/az_AZ/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/az_AZ/errors.lang +++ b/htdocs/langs/az_AZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bg_BG/errors.lang b/htdocs/langs/bg_BG/errors.lang index ceb6c75ae21..f254274c96d 100644 --- a/htdocs/langs/bg_BG/errors.lang +++ b/htdocs/langs/bg_BG/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bn_BD/errors.lang b/htdocs/langs/bn_BD/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/bn_BD/errors.lang +++ b/htdocs/langs/bn_BD/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bn_IN/errors.lang b/htdocs/langs/bn_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/bn_IN/errors.lang +++ b/htdocs/langs/bn_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/bs_BA/errors.lang b/htdocs/langs/bs_BA/errors.lang index 864a09e3e63..25fa336f994 100644 --- a/htdocs/langs/bs_BA/errors.lang +++ b/htdocs/langs/bs_BA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index 9f038bdf256..402bb0c556d 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primer heu de configurar el vostre pla ErrorFailedToFindEmailTemplate=No s'ha pogut trobar la plantilla amb el nom de codi %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durada no definida al servei. No hi ha manera de calcular el preu per hora. ErrorActionCommPropertyUserowneridNotDefined=El propietari de l'usuari és obligatori -ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %n, codi: %s) no existeix al diccionari del tipus d'esdeveniment +ErrorActionCommBadType=El tipus d'esdeveniment seleccionat (identificador: %s, codi: %s) no existeix al diccionari del tipus d'esdeveniment CheckVersionFail=Error de comprovació de versió ErrorWrongFileName=El nom del fitxer no pot contenir __COSA__ ErrorNotInDictionaryPaymentConditions=No es troba al Diccionari de condicions de pagament, modifiqueu-lo. diff --git a/htdocs/langs/cs_CZ/errors.lang b/htdocs/langs/cs_CZ/errors.lang index e530b0dbba3..15fdd697542 100644 --- a/htdocs/langs/cs_CZ/errors.lang +++ b/htdocs/langs/cs_CZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/da_DK/errors.lang b/htdocs/langs/da_DK/errors.lang index f447526798e..41301d32cc1 100644 --- a/htdocs/langs/da_DK/errors.lang +++ b/htdocs/langs/da_DK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du skal først konfigurere din kontopla ErrorFailedToFindEmailTemplate=Kunne ikke finde skabelon med kodenavn %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varighed er ikke defineret i tjenesten. Ingen måde at beregne timeprisen på. ErrorActionCommPropertyUserowneridNotDefined=Brugerens ejer kræves -ErrorActionCommBadType=Den valgte hændelsestype (id: %n, kode: %s) findes ikke i begivenhedstypeordbogen +ErrorActionCommBadType=Den valgte hændelsestype (id: %s, kode: %s) findes ikke i begivenhedstypeordbogen CheckVersionFail=Versionskontrol mislykkedes ErrorWrongFileName=Filens navn kan ikke indeholde __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Ikke i ordbogen om betalingsbetingelser, bedes du ændre. diff --git a/htdocs/langs/de_DE/errors.lang b/htdocs/langs/de_DE/errors.lang index 5b7db2999ca..b75f263a231 100644 --- a/htdocs/langs/de_DE/errors.lang +++ b/htdocs/langs/de_DE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Sie müssen zuerst Ihren Kontenplan ein ErrorFailedToFindEmailTemplate=Vorlage mit Codename %s konnte nicht gefunden werden ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Die Dauer für den Service ist nicht definiert. Es besteht keine Möglichkeit, den Stundenpreis zu berechnen. ErrorActionCommPropertyUserowneridNotDefined=Der Besitzer des Benutzers ist erforderlich -ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %n, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden +ErrorActionCommBadType=Der ausgewählte Ereignistyp (ID: %s, Code: %s) ist im Wörterbuch für den Ereignistyp nicht vorhanden CheckVersionFail=Versionsprüfung fehlgeschlagen ErrorWrongFileName=Der Dateiname darf nicht __SOMETHING__ enthalten ErrorNotInDictionaryPaymentConditions=Nicht im Dictionary der Zahlungsbedingungen, bitte ändern. diff --git a/htdocs/langs/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index 967c1b4090b..1bc41dfcd8a 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 1a4250834b2..616a2441979 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -267,7 +267,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index cba521d8f83..649e488cb87 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primero debe configurar su plan de cuen ErrorFailedToFindEmailTemplate=No se pudo encontrar la plantilla con el nombre de código %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duración no definida en el servicio. No hay forma de calcular el precio por hora. ErrorActionCommPropertyUserowneridNotDefined=Se requiere el propietario del usuario -ErrorActionCommBadType=El tipo de evento seleccionado (id: %n, código: %s) no existe en el diccionario de tipo de evento +ErrorActionCommBadType=El tipo de evento seleccionado (id: %s, código: %s) no existe en el diccionario de tipo de evento CheckVersionFail=Error de verificación de versión ErrorWrongFileName=El nombre del archivo no puede contener __SOMETHING__ ErrorNotInDictionaryPaymentConditions=No está en el Diccionario de términos de pago, modifíquelo. diff --git a/htdocs/langs/et_EE/errors.lang b/htdocs/langs/et_EE/errors.lang index e6cb1458234..3e4e7b3638a 100644 --- a/htdocs/langs/et_EE/errors.lang +++ b/htdocs/langs/et_EE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/eu_ES/errors.lang b/htdocs/langs/eu_ES/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/eu_ES/errors.lang +++ b/htdocs/langs/eu_ES/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 1231bb9e621..4cd240fef47 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fi_FI/errors.lang b/htdocs/langs/fi_FI/errors.lang index bbbace60e76..9a5148d92c3 100644 --- a/htdocs/langs/fi_FI/errors.lang +++ b/htdocs/langs/fi_FI/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 80814e27ed2..45c3e0c9a7d 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Vous devez d’abord configurer votre p ErrorFailedToFindEmailTemplate=Aucun gabarit trouvé avec le code %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durée non définie sur le service. Pas moyen de calculer le prix horaire. ErrorActionCommPropertyUserowneridNotDefined=Le propriétaire de l'utilisateur est requis -ErrorActionCommBadType=Le type d'événement sélectionné (id: %n, code: %s) n'existe pas dans le dictionnaire des types d'événement +ErrorActionCommBadType=Le type d'événement sélectionné (id: %s, code: %s) n'existe pas dans le dictionnaire des types d'événement CheckVersionFail=Échec de la vérification de version ErrorWrongFileName=Le nom du fichier ne peut pas contenir __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Pas dans le dictionnaire des conditions de paiement, veuillez modifier. diff --git a/htdocs/langs/gl_ES/errors.lang b/htdocs/langs/gl_ES/errors.lang index f018fce58a5..8a40a3eb471 100644 --- a/htdocs/langs/gl_ES/errors.lang +++ b/htdocs/langs/gl_ES/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Primeiro debe configurar o seu plan de ErrorFailedToFindEmailTemplate=Fallo ao atopar o modelo co nome de código %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duración non definida no servizo. Non hai forma de calcular o prezo por hora. ErrorActionCommPropertyUserowneridNotDefined=É preciso o supervisor do usuario -ErrorActionCommBadType=O tipo de evento seleccionado (id: %n, código: %s) non existe no diccionario Tipo de Evento +ErrorActionCommBadType=O tipo de evento seleccionado (id: %s, código: %s) non existe no diccionario Tipo de Evento CheckVersionFail=Fallou a comprobación da versión ErrorWrongFileName=O nome do ficheiro non pode conte __SOMETHING__ nel ErrorNotInDictionaryPaymentConditions=Non está no Dicionario de Condicións de Pagamento. Modifíqueo. diff --git a/htdocs/langs/he_IL/errors.lang b/htdocs/langs/he_IL/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/he_IL/errors.lang +++ b/htdocs/langs/he_IL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hi_IN/errors.lang b/htdocs/langs/hi_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/hi_IN/errors.lang +++ b/htdocs/langs/hi_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hr_HR/errors.lang b/htdocs/langs/hr_HR/errors.lang index ec2a653f646..23c3ba0aa1f 100644 --- a/htdocs/langs/hr_HR/errors.lang +++ b/htdocs/langs/hr_HR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/hu_HU/errors.lang b/htdocs/langs/hu_HU/errors.lang index e097d2988db..d6473374f1b 100644 --- a/htdocs/langs/hu_HU/errors.lang +++ b/htdocs/langs/hu_HU/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=A felhasználó tulajdonosa kötelező -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index 2df9104a067..be204e5ca21 100644 --- a/htdocs/langs/id_ID/errors.lang +++ b/htdocs/langs/id_ID/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Anda harus terlebih dahulu mengatur bag ErrorFailedToFindEmailTemplate=Gagal menemukan template dengan nama kode %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durasi tidak ditentukan pada layanan. Tidak ada cara untuk menghitung harga per jam. ErrorActionCommPropertyUserowneridNotDefined=Pemilik pengguna diperlukan -ErrorActionCommBadType=Jenis peristiwa yang dipilih (id: %n, kode: %s) tidak ada di kamus Jenis Peristiwa +ErrorActionCommBadType=Jenis peristiwa yang dipilih (id: %s, kode: %s) tidak ada di kamus Jenis Peristiwa CheckVersionFail=Pemeriksaan versi gagal ErrorWrongFileName=Nama file tidak boleh memiliki __SOMETHING__ di dalamnya ErrorNotInDictionaryPaymentConditions=Tidak ada dalam Kamus Istilah Pembayaran, harap ubah. diff --git a/htdocs/langs/is_IS/errors.lang b/htdocs/langs/is_IS/errors.lang index a6d3ae56134..d8282e3e62a 100644 --- a/htdocs/langs/is_IS/errors.lang +++ b/htdocs/langs/is_IS/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/it_IT/errors.lang b/htdocs/langs/it_IT/errors.lang index f784773bb16..e7d8359baaf 100644 --- a/htdocs/langs/it_IT/errors.lang +++ b/htdocs/langs/it_IT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Devi prima impostare il tuo piano dei c ErrorFailedToFindEmailTemplate=Impossibile trovare il modello con nome in codice %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durata non definita in servizio. Non c'è modo di calcolare il prezzo orario. ErrorActionCommPropertyUserowneridNotDefined=Il proprietario dell'utente è obbligatorio -ErrorActionCommBadType=Il tipo di evento selezionato (id: %n, codice: %s) non esiste nel dizionario del tipo di evento +ErrorActionCommBadType=Il tipo di evento selezionato (id: %s, codice: %s) non esiste nel dizionario del tipo di evento CheckVersionFail=Controllo della versione fallito ErrorWrongFileName=Il nome del file non può contenere __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Non nel dizionario dei termini di pagamento, modificare. diff --git a/htdocs/langs/ja_JP/errors.lang b/htdocs/langs/ja_JP/errors.lang index 221d7673ead..278dd008ac8 100644 --- a/htdocs/langs/ja_JP/errors.lang +++ b/htdocs/langs/ja_JP/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=最初に勘定科目表を設定する ErrorFailedToFindEmailTemplate=コードネーム%sのテンプレートが見つかりませんでした ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=サービスで期間が定義されていない。時給計算する方法がない。 ErrorActionCommPropertyUserowneridNotDefined=ユーザの所有者が必要 -ErrorActionCommBadType=選択したイベント種別 (id: %n, code: %s) がイベント種別辞書に存在しない +ErrorActionCommBadType=選択したイベント種別 (id: %s, code: %s) がイベント種別辞書に存在しない CheckVersionFail=バージョンチェックに失敗する ErrorWrongFileName=ファイル名に__SOMETHING__を含めることはできない ErrorNotInDictionaryPaymentConditions=支払条件辞書にないので、変更すること。 diff --git a/htdocs/langs/ka_GE/errors.lang b/htdocs/langs/ka_GE/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ka_GE/errors.lang +++ b/htdocs/langs/ka_GE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/kk_KZ/errors.lang b/htdocs/langs/kk_KZ/errors.lang index e10bb476fff..6792201a546 100644 --- a/htdocs/langs/kk_KZ/errors.lang +++ b/htdocs/langs/kk_KZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Алдымен сіз өзіңізді ErrorFailedToFindEmailTemplate=%s коды бар үлгі табылмады ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Қызмет көрсету мерзімі анықталмаған. Сағаттық бағаны есептеуге болмайды. ErrorActionCommPropertyUserowneridNotDefined=Пайдаланушының иесі қажет -ErrorActionCommBadType=Таңдалған оқиға түрі (идентификатор: %n, код: %s) оқиға түрі сөздігінде жоқ +ErrorActionCommBadType=Таңдалған оқиға түрі (идентификатор: %s, код: %s) оқиға түрі сөздігінде жоқ CheckVersionFail=Нұсқаны тексеру сәтсіз аяқталды ErrorWrongFileName=Файл атауында __SOMETHING__ болмайды ErrorNotInDictionaryPaymentConditions=Төлем шарттары сөздігінде жоқ, өзгертіңіз. diff --git a/htdocs/langs/km_KH/errors.lang b/htdocs/langs/km_KH/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/km_KH/errors.lang +++ b/htdocs/langs/km_KH/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/kn_IN/errors.lang b/htdocs/langs/kn_IN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/kn_IN/errors.lang +++ b/htdocs/langs/kn_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ko_KR/errors.lang b/htdocs/langs/ko_KR/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ko_KR/errors.lang +++ b/htdocs/langs/ko_KR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/lo_LA/errors.lang b/htdocs/langs/lo_LA/errors.lang index be5f507a576..8390ff24a66 100644 --- a/htdocs/langs/lo_LA/errors.lang +++ b/htdocs/langs/lo_LA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=ກ່ອນອື່ນmustົດທ ErrorFailedToFindEmailTemplate=ການຊອກຫາແມ່ແບບທີ່ມີລະຫັດຊື່ %s ລົ້ມເຫລວ ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=ບໍ່ໄດ້ ກຳ ນົດໄລຍະເວລາການບໍລິການ. ບໍ່ມີທາງທີ່ຈະຄິດໄລ່ລາຄາຊົ່ວໂມງ. ErrorActionCommPropertyUserowneridNotDefined=ເຈົ້າຂອງຜູ້ໃຊ້ແມ່ນຕ້ອງການ -ErrorActionCommBadType=ປະເພດເຫດການທີ່ເລືອກ (id: %n, ລະຫັດ: %s) ບໍ່ມີຢູ່ໃນວັດຈະນານຸກົມປະເພດເຫດການ +ErrorActionCommBadType=ປະເພດເຫດການທີ່ເລືອກ (id: %s, ລະຫັດ: %s) ບໍ່ມີຢູ່ໃນວັດຈະນານຸກົມປະເພດເຫດການ CheckVersionFail=ກວດສອບເວີຊັນບໍ່ ສຳ ເລັດ ErrorWrongFileName=ຊື່ຂອງໄຟລ cannot ບໍ່ສາມາດມີ __SOMETHING__ ໃນມັນໄດ້ ErrorNotInDictionaryPaymentConditions=ບໍ່ຢູ່ໃນວັດຈະນານຸກົມເງື່ອນໄຂການຈ່າຍເງິນ, ກະລຸນາແກ້ໄຂ. diff --git a/htdocs/langs/lt_LT/errors.lang b/htdocs/langs/lt_LT/errors.lang index 7155a7694df..cff79292d37 100644 --- a/htdocs/langs/lt_LT/errors.lang +++ b/htdocs/langs/lt_LT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/lv_LV/errors.lang b/htdocs/langs/lv_LV/errors.lang index 58997394f1d..7f8d4a74478 100644 --- a/htdocs/langs/lv_LV/errors.lang +++ b/htdocs/langs/lv_LV/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Vispirms jums ir jāiestata konta plān ErrorFailedToFindEmailTemplate=Neizdevās atrast veidni ar koda nosaukumu %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Ilgums pakalpojumā nav noteikts. Nav iespējams aprēķināt stundas cenu. ErrorActionCommPropertyUserowneridNotDefined=Nepieciešams lietotāja īpašnieks -ErrorActionCommBadType=Atlasītais notikuma veids (id: %n, kods: %s) nepastāv notikuma veida vārdnīcā +ErrorActionCommBadType=Atlasītais notikuma veids (id: %s, kods: %s) nepastāv notikuma veida vārdnīcā CheckVersionFail=Versijas pārbaude neizdevās ErrorWrongFileName=Faila nosaukumā nedrīkst būt __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Nav Maksājumu nosacījumu vārdnīcā, lūdzu, modificējiet. diff --git a/htdocs/langs/mk_MK/errors.lang b/htdocs/langs/mk_MK/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/mk_MK/errors.lang +++ b/htdocs/langs/mk_MK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/mn_MN/errors.lang b/htdocs/langs/mn_MN/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/mn_MN/errors.lang +++ b/htdocs/langs/mn_MN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/my_MM/errors.lang b/htdocs/langs/my_MM/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/my_MM/errors.lang +++ b/htdocs/langs/my_MM/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/nb_NO/errors.lang b/htdocs/langs/nb_NO/errors.lang index c9842c73f67..226fc816022 100644 --- a/htdocs/langs/nb_NO/errors.lang +++ b/htdocs/langs/nb_NO/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du må først konfigurere kontoplanen d ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=Brukerens eier kreves -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Versjonskontroll mislyktes ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ne_NP/errors.lang b/htdocs/langs/ne_NP/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/ne_NP/errors.lang +++ b/htdocs/langs/ne_NP/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/nl_NL/errors.lang b/htdocs/langs/nl_NL/errors.lang index fe70a2010cb..ed4a55d1aab 100644 --- a/htdocs/langs/nl_NL/errors.lang +++ b/htdocs/langs/nl_NL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=U moet eerst uw rekeningschema instelle ErrorFailedToFindEmailTemplate=Kan sjabloon met codenaam %s . niet vinden ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=De lengte is niet gedefinieerd in de dienst. We kunnen de uurkosten niet berekenen. ErrorActionCommPropertyUserowneridNotDefined=Eigenaar van gebruiker is vereist -ErrorActionCommBadType=Het geselecteerde gebeurtenistype (id: %n, code: %s) bestaat niet in het woordenboek voor gebeurtenistypes +ErrorActionCommBadType=Het geselecteerde gebeurtenistype (id: %s, code: %s) bestaat niet in het woordenboek voor gebeurtenistypes CheckVersionFail=Versiecontrole mislukt ErrorWrongFileName=De naam van het bestand mag niet __SOMETHING__ bevatten ErrorNotInDictionaryPaymentConditions=Niet bekend in de gedefinieerde betaalregelingen, graag wijzigen diff --git a/htdocs/langs/pl_PL/errors.lang b/htdocs/langs/pl_PL/errors.lang index 2022a84943f..fb75cc0a943 100644 --- a/htdocs/langs/pl_PL/errors.lang +++ b/htdocs/langs/pl_PL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Najpierw musisz ustawić swój plan kon ErrorFailedToFindEmailTemplate=Nie udało się znaleźć szablonu o nazwie kodowej %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=Właściciel użytkownika jest wymagany -ErrorActionCommBadType=Wybrany typ zdarzenia (id: %n, kod: %s) nie istnieje w słowniku typów zdarzeń +ErrorActionCommBadType=Wybrany typ zdarzenia (id: %s, kod: %s) nie istnieje w słowniku typów zdarzeń CheckVersionFail=Sprawdzanie wersji nie powiodło się ErrorWrongFileName=Nazwa pliku nie może zawierać __COŚ__ ErrorNotInDictionaryPaymentConditions=Nie w Słowniku terminów płatności, zmień. diff --git a/htdocs/langs/pt_PT/errors.lang b/htdocs/langs/pt_PT/errors.lang index dc0eb4f58d5..2b0dda28541 100644 --- a/htdocs/langs/pt_PT/errors.lang +++ b/htdocs/langs/pt_PT/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ro_RO/errors.lang b/htdocs/langs/ro_RO/errors.lang index bb74b86bc27..b12fb63d6fd 100644 --- a/htdocs/langs/ro_RO/errors.lang +++ b/htdocs/langs/ro_RO/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Trebuie să setezi mai întâi planul d ErrorFailedToFindEmailTemplate=Nu s-a găsit șablonul cu numele de cod %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Durata nu este definită pentru serviciu. Nicio modalitate de a calcula prețul pe oră. ErrorActionCommPropertyUserowneridNotDefined=Utilizatorul deţinător este obligatoriu -ErrorActionCommBadType=Tipul evenimentului selectat (id: %n, cod: %s) nu există în dicţionarul Tipuri evenimente +ErrorActionCommBadType=Tipul evenimentului selectat (id: %s, cod: %s) nu există în dicţionarul Tipuri evenimente CheckVersionFail=Verificarea versiunii a eşuat ErrorWrongFileName=Numele fișierului nu poate să conțină _SOMETHING_ în el ErrorNotInDictionaryPaymentConditions=Nu se află în dicționarul Condiții de plată, vă rugăm să modificați. diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index a5ea90335e0..9f7b33efa88 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Вы должны сначала нас ErrorFailedToFindEmailTemplate=Не удалось найти шаблон с кодовым названием %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Срок службы не определен. Невозможно рассчитать почасовую оплату. ErrorActionCommPropertyUserowneridNotDefined=Требуется владелец пользователя -ErrorActionCommBadType=Выбранный тип события (id: %n, код: %s) не существует в словаре типов событий +ErrorActionCommBadType=Выбранный тип события (id: %s, код: %s) не существует в словаре типов событий CheckVersionFail=Ошибка проверки версии ErrorWrongFileName=Имя файла не может содержать __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Нет в Словаре условий оплаты, пожалуйста, измените. diff --git a/htdocs/langs/sk_SK/errors.lang b/htdocs/langs/sk_SK/errors.lang index cbb983f03f0..a3f364bae15 100644 --- a/htdocs/langs/sk_SK/errors.lang +++ b/htdocs/langs/sk_SK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sl_SI/errors.lang b/htdocs/langs/sl_SI/errors.lang index a27b6fceea6..7910fee7eaa 100644 --- a/htdocs/langs/sl_SI/errors.lang +++ b/htdocs/langs/sl_SI/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sq_AL/errors.lang b/htdocs/langs/sq_AL/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/sq_AL/errors.lang +++ b/htdocs/langs/sq_AL/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sr_RS/errors.lang b/htdocs/langs/sr_RS/errors.lang index ce3cbc6b148..30b2026e6ca 100644 --- a/htdocs/langs/sr_RS/errors.lang +++ b/htdocs/langs/sr_RS/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/sv_SE/errors.lang b/htdocs/langs/sv_SE/errors.lang index 6eac66b349a..e56c87c8212 100644 --- a/htdocs/langs/sv_SE/errors.lang +++ b/htdocs/langs/sv_SE/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Du måste först ställa in ditt kontop ErrorFailedToFindEmailTemplate=Det gick inte att hitta mall med kodnamn %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Varaktighet definieras inte i tjänsten. Inget sätt att beräkna timpriset. ErrorActionCommPropertyUserowneridNotDefined=Användarens ägare krävs -ErrorActionCommBadType=Vald händelsetyp (id: %n, kod: %s) finns inte i ordlistan för händelsetyp +ErrorActionCommBadType=Vald händelsetyp (id: %s, kod: %s) finns inte i ordlistan för händelsetyp CheckVersionFail=Versionskontroll misslyckades ErrorWrongFileName=Filens namn kan inte innehålla __SOMETHING__ ErrorNotInDictionaryPaymentConditions=Inte i ordningen för betalningsvillkor, ändra. diff --git a/htdocs/langs/sw_SW/errors.lang b/htdocs/langs/sw_SW/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/sw_SW/errors.lang +++ b/htdocs/langs/sw_SW/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ta_IN/errors.lang b/htdocs/langs/ta_IN/errors.lang index 04fa1d14975..d46aeff4ca1 100644 --- a/htdocs/langs/ta_IN/errors.lang +++ b/htdocs/langs/ta_IN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=முதலில் உங்கள ErrorFailedToFindEmailTemplate=%s என்ற குறியீட்டுப் பெயருடன் டெம்ப்ளேட்டைக் கண்டறிய முடியவில்லை ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=சேவையில் காலம் வரையறுக்கப்படவில்லை. மணிநேர விலையை கணக்கிட வழி இல்லை. ErrorActionCommPropertyUserowneridNotDefined=பயனரின் உரிமையாளர் தேவை -ErrorActionCommBadType=தேர்ந்தெடுக்கப்பட்ட நிகழ்வு வகை (ஐடி: %n, குறியீடு: %s) நிகழ்வு வகை அகராதியில் இல்லை +ErrorActionCommBadType=தேர்ந்தெடுக்கப்பட்ட நிகழ்வு வகை (ஐடி: %s, குறியீடு: %s) நிகழ்வு வகை அகராதியில் இல்லை CheckVersionFail=பதிப்பு சரிபார்ப்பு தோல்வி ErrorWrongFileName=கோப்பின் பெயரில் __சம்திங்__ இருக்கக்கூடாது ErrorNotInDictionaryPaymentConditions=கட்டண விதிமுறைகள் அகராதியில் இல்லை, தயவுசெய்து மாற்றவும். diff --git a/htdocs/langs/tg_TJ/errors.lang b/htdocs/langs/tg_TJ/errors.lang index b861ec4b276..ec74135edae 100644 --- a/htdocs/langs/tg_TJ/errors.lang +++ b/htdocs/langs/tg_TJ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Шумо аввал бояд ҷадва ErrorFailedToFindEmailTemplate=Шаблон бо номи рамзи %s ёфт нашуд ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Давомнокии хидмат муайян карда нашудааст. Ҳеҷ гуна ҳисоб кардани нархи соатбайъ. ErrorActionCommPropertyUserowneridNotDefined=Соҳиби корбар лозим аст -ErrorActionCommBadType=Навъи рӯйдоди интихобшуда (id: %n, рамз: %s) дар луғати навъи чорабиниҳо вуҷуд надорад +ErrorActionCommBadType=Навъи рӯйдоди интихобшуда (id: %s, рамз: %s) дар луғати навъи чорабиниҳо вуҷуд надорад CheckVersionFail=Санҷиши версия ноком шуд ErrorWrongFileName=Номи файл наметавонад дар он __SOMETHING__ дошта бошад ErrorNotInDictionaryPaymentConditions=Дар луғати шартҳои пардохт нест, лутфан тағир диҳед. diff --git a/htdocs/langs/th_TH/errors.lang b/htdocs/langs/th_TH/errors.lang index 43200416193..efeb030607d 100644 --- a/htdocs/langs/th_TH/errors.lang +++ b/htdocs/langs/th_TH/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/tr_TR/errors.lang b/htdocs/langs/tr_TR/errors.lang index 37622276db8..d3cd4ad4a71 100644 --- a/htdocs/langs/tr_TR/errors.lang +++ b/htdocs/langs/tr_TR/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/uk_UA/errors.lang b/htdocs/langs/uk_UA/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/uk_UA/errors.lang +++ b/htdocs/langs/uk_UA/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/ur_PK/errors.lang b/htdocs/langs/ur_PK/errors.lang index 905d70ab7fb..b6a2f5c9eb7 100644 --- a/htdocs/langs/ur_PK/errors.lang +++ b/htdocs/langs/ur_PK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=آپ کو پہلے اپنے اکاؤن ErrorFailedToFindEmailTemplate=کوڈ نام %s کے ساتھ ٹیمپلیٹ تلاش کرنے میں ناکام ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=سروس پر مدت کی وضاحت نہیں کی گئی ہے۔ فی گھنٹہ قیمت کا حساب لگانے کا کوئی طریقہ نہیں ہے۔ ErrorActionCommPropertyUserowneridNotDefined=صارف کا مالک درکار ہے۔ -ErrorActionCommBadType=ایونٹ کی قسم کی منتخب کردہ (id: %n، کوڈ: %s) ایونٹ کی قسم ڈکشنری میں موجود نہیں ہے۔ +ErrorActionCommBadType=ایونٹ کی قسم کی منتخب کردہ (id: %s، کوڈ: %s) ایونٹ کی قسم ڈکشنری میں موجود نہیں ہے۔ CheckVersionFail=ورژن کی جانچ ناکام ErrorWrongFileName=فائل کے نام میں __SOMETHING__ نہیں ہو سکتا ErrorNotInDictionaryPaymentConditions=ادائیگی کی شرائط ڈکشنری میں نہیں ہے، براہ کرم ترمیم کریں۔ diff --git a/htdocs/langs/uz_UZ/errors.lang b/htdocs/langs/uz_UZ/errors.lang index b337c73d0d6..486e0241698 100644 --- a/htdocs/langs/uz_UZ/errors.lang +++ b/htdocs/langs/uz_UZ/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=Avval hisob qaydnomangizni o'rnatishing ErrorFailedToFindEmailTemplate=%s kodli shablonni topib bo'lmadi ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Xizmat muddati aniqlanmagan. Bir soatlik narxni hisoblashning iloji yo'q. ErrorActionCommPropertyUserowneridNotDefined=Foydalanuvchi egasi talab qilinadi -ErrorActionCommBadType=Tanlangan voqea turi (id: %n, kod: %s) Voqealar turi lug'atida mavjud emas +ErrorActionCommBadType=Tanlangan voqea turi (id: %s, kod: %s) Voqealar turi lug'atida mavjud emas CheckVersionFail=Versiyani tekshirib bo'lmadi ErrorWrongFileName=Fayl nomida __SOMETHING__ bo'lishi mumkin emas ErrorNotInDictionaryPaymentConditions=To'lov shartlari lug'atida yo'q, iltimos o'zgartiring. diff --git a/htdocs/langs/vi_VN/errors.lang b/htdocs/langs/vi_VN/errors.lang index 1b8c6ca61b9..8707c21f67a 100644 --- a/htdocs/langs/vi_VN/errors.lang +++ b/htdocs/langs/vi_VN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_CN/errors.lang b/htdocs/langs/zh_CN/errors.lang index 1783be09f3a..53188bca81d 100644 --- a/htdocs/langs/zh_CN/errors.lang +++ b/htdocs/langs/zh_CN/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_HK/errors.lang b/htdocs/langs/zh_HK/errors.lang index e05f9dc7a2a..20f5b6f264a 100644 --- a/htdocs/langs/zh_HK/errors.lang +++ b/htdocs/langs/zh_HK/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of acco ErrorFailedToFindEmailTemplate=Failed to find template with code name %s ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=Duration not defined on service. No way to calculate the hourly price. ErrorActionCommPropertyUserowneridNotDefined=User's owner is required -ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +ErrorActionCommBadType=Selected event type (id: %s, code: %s) do not exist in Event Type dictionary CheckVersionFail=Version check fail ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it ErrorNotInDictionaryPaymentConditions=Not in Payment Terms Dictionary, please modify. diff --git a/htdocs/langs/zh_TW/errors.lang b/htdocs/langs/zh_TW/errors.lang index ef381e5ecb3..7c9a2507df2 100644 --- a/htdocs/langs/zh_TW/errors.lang +++ b/htdocs/langs/zh_TW/errors.lang @@ -269,7 +269,7 @@ ErrorYouMustFirstSetupYourChartOfAccount=您必須先設定會計項目表 ErrorFailedToFindEmailTemplate=無法找到代號為 %s 的模板 ErrorDurationForServiceNotDefinedCantCalculateHourlyPrice=未在服務中定義時間範圍.無法計算時薪. ErrorActionCommPropertyUserowneridNotDefined=需要用戶的擁有者 -ErrorActionCommBadType=選擇的事件類型(id:%n,代碼:%s)在事件類型分類中不存在 +ErrorActionCommBadType=選擇的事件類型(id:%s,代碼:%s)在事件類型分類中不存在 CheckVersionFail=版本檢查失敗 ErrorWrongFileName=檔案名稱中不可以有__SOMETHING__ ErrorNotInDictionaryPaymentConditions=不在支付條款類別中,請修改。 From 8dcceeb127a061957be783bfc196c08b01257c64 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 29 Jul 2022 18:12:17 +0200 Subject: [PATCH 045/105] FIX setup intent stripe Klarna not supported --- htdocs/stripe/class/stripe.class.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 00d3c4a0d94..5ec149ba07f 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -643,9 +643,6 @@ class Stripe extends CommonObject if (!empty($conf->global->STRIPE_BANCONTACT)) { $paymentmethodtypes[] = "bancontact"; } - if (!empty($conf->global->STRIPE_KLARNA)) { - $paymentmethodtypes[] = "klarna"; - } if (!empty($conf->global->STRIPE_IDEAL)) { $paymentmethodtypes[] = "ideal"; } From edb61faf25c98b1e6b355f2e2e530988ac75b082 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 18:16:29 +0200 Subject: [PATCH 046/105] Fix lang --- test/phpunit/LangTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 7bd521c2a7a..e0eaded97de 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -230,6 +230,10 @@ class LangTest extends PHPUnit\Framework\TestCase $result=preg_match('/%n/m', $filecontent); // A sequence of char we don't want //print __METHOD__." Result for checking we don't have bad percent char = ".$result."\n"; $this->assertTrue($result == 0, 'Found a sequence %n into the translation file '.$code.'/'.$file.'. We probably want %s'); + + $result=preg_match('/<<<<assertTrue($result == 0, 'Found a sequence <<<<< into the translation file '.$code.'/'.$file.'. Probably a bad merge of code were done.'); } } From af4d8ef53e75833b9c3f06551c53d9ad94c4be60 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 30 Jul 2022 15:32:18 +0200 Subject: [PATCH 047/105] FIX validation paymentok.php if advance rights --- htdocs/public/payment/paymentok.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index c9b8f13c877..e04f00d7459 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -364,13 +364,14 @@ if ($ispaymentok) { } if (empty($user->rights->facture)) { $user->rights->facture = new stdClass(); + $user->rights->facture->invoice_advance = new stdClass(); } if (empty($user->rights->adherent)) { $user->rights->adherent = new stdClass(); - $user->rights->adherent->cotisation = new stdClass(); } $user->rights->societe->creer = 1; $user->rights->facture->creer = 1; + $user->rights->facture->invoice_advance->validate = 1; $user->rights->adherent->cotisation->creer = 1; if (array_key_exists('MEM', $tmptag) && $tmptag['MEM'] > 0) { From 454fb6b0f5f709cec4b77b5005a16a627a891029 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sun, 31 Jul 2022 13:10:38 +0200 Subject: [PATCH 048/105] new: Add IMAP port setting on email collector module --- htdocs/emailcollector/class/emailcollector.class.php | 5 +++-- htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 1 + .../mysql/tables/llx_emailcollector_emailcollector.sql | 1 + htdocs/langs/en_US/admin.lang | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 9a60624e9d2..11d2dcfeb46 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -115,7 +115,8 @@ class EmailCollector extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector', 'csslist'=>'tdoverflowmax150'), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1, 'csslist'=>'small'), 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com', 'csslist'=>'tdoverflow125'), - 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'), + 'port' => array('type'=>'varchar(10)', 'label'=>'EMailHostPort', 'visible'=>1, 'enabled'=>1, 'position'=>91, 'notnull'=>1, 'searchall'=>0, 'comment'=>"IMAP server port", 'help'=>'Example: 993', 'csslist'=>'tdoverflow125', 'default'=>'993'), + 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)', 'default'=>'UTF-8'), 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), @@ -746,7 +747,7 @@ class EmailCollector extends CommonObject $flags .= '/authuser='.$partofauth[0].'/user='.$partofauth[1]; } - $connectstringserver = '{'.$this->host.':993'.$flags.'}'; + $connectstringserver = '{'.$this->host.':'.$this->port.$flags.'}'; return $connectstringserver; } diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index 24b4e20a7b7..8394ae97478 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -64,3 +64,4 @@ ALTER TABLE llx_ticket ADD COLUMN ip varchar(250); ALTER TABLE llx_societe ADD last_main_doc VARCHAR(255) NULL AFTER model_pdf; +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN port varchar(10) DEFAULT '993'; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index b62a9b6ba7f..3580f1659b1 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -22,6 +22,7 @@ CREATE TABLE llx_emailcollector_emailcollector( label varchar(255), description text, host varchar(255), + port varchar(10) DEFAULT '993', hostcharset varchar(16) DEFAULT 'UTF-8', login varchar(128), password varchar(128), diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c1f01ae85d9..7148e19fb48 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2064,6 +2064,7 @@ EmailCollectors=Email collectors EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector EMailHost=Host of email IMAP server +EMailHostPort=Port of email IMAP server MailboxSourceDirectory=Mailbox source directory MailboxTargetDirectory=Mailbox target directory EmailcollectorOperations=Operations to do by collector From 4c4dd53385bc8259b7bfdd33421f62f16e294b0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 31 Jul 2022 22:46:53 +0200 Subject: [PATCH 049/105] Fix filter on company --- htdocs/compta/facture/list.php | 11 ++++++----- htdocs/fourn/facture/list.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f5d1f519698..b7d20f3f0f8 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -363,11 +363,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_datelimit_start = ''; $search_datelimit_end = ''; $search_fac_rec_source_title = ''; - $option = ''; - $filter = ''; $toselect = array(); $search_array_options = array(); $search_categ_cus = 0; + $option = ''; + $socid = 0; } if (empty($reshook)) { @@ -919,7 +919,7 @@ if ($resql) { llxHeader('', $langs->trans('CustomersInvoices'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); - if ($socid) { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); if (empty($search_company)) { @@ -1151,8 +1151,9 @@ if ($resql) { print ''; print ''; print ''; + print ''; - print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($langs->trans('BillsCustomers').' '.($socid > 0 ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "SendBillRef"; $modelmail = "facture_send"; @@ -1320,7 +1321,7 @@ if ($resql) { } // Thirdparty if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ' 0 ? " disabled" : "").'>'; } // Alias if (!empty($arrayfields['s.name_alias']['checked'])) { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 70a7334196a..df5cd0d090d 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1002,7 +1002,7 @@ if ($resql) { } // Thirpdarty if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ' 0 ? " disabled" : "").'>'; } // Town if (!empty($arrayfields['s.town']['checked'])) { From bf2d3160dbfa4a2610069baf78ecaf66d13ec7c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Aug 2022 04:22:45 +0200 Subject: [PATCH 050/105] Fix trans --- htdocs/recruitment/recruitmentjobposition_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index ef9a882bd8e..54f244efc5b 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -216,7 +216,7 @@ $now = dol_now(); //$help_url="EN:Module_RecruitmentJobPosition|FR:Module_RecruitmentJobPosition_FR|ES:Módulo_RecruitmentJobPosition"; $help_url = ''; -$title = $langs->trans('ListOfPositionsToBeFilled'); +$title = $langs->trans('PositionsToBeFilled'); $morejs = array(); $morecss = array(); From 3a2cfe1fab5ab4ca16829793e9a3bd4c1ae476fb Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 1 Aug 2022 10:42:30 +0200 Subject: [PATCH 051/105] NEW : add employment anniversary in birthday box --- htdocs/core/boxes/box_birthdays.php | 31 ++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php index 9462c810393..6aec6f4064a 100644 --- a/htdocs/core/boxes/box_birthdays.php +++ b/htdocs/core/boxes/box_birthdays.php @@ -85,13 +85,19 @@ class box_birthdays extends ModeleBoxes if ($user->rights->user->user->lire) { $tmparray = dol_getdate(dol_now(), true); - $sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth, u.email, u.statut as status"; + $sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth as datea, 'birth' as typea, u.email, u.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.entity IN (".getEntity('user').")"; $sql .= " AND u.statut = 1"; $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0); - $sql .= " ORDER BY DAY(u.birth) ASC"; - $sql .= $this->db->plimit($max, 0); + $sql .= ' UNION '; + $sql .= "SELECT u.rowid, u.firstname, u.lastname, u.dateemployment as datea, 'employment' as typea, u.email, u.statut as status"; + $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE u.entity IN (".getEntity('user').")"; + $sql .= " AND u.statut = 1"; + $sql .= dolSqlDateFilter('u.dateemployment', 0, $tmparray['mon'], 0); + + $sql .= " ORDER BY DAY(datea) ASC"; dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); $result = $this->db->query($sql); @@ -108,9 +114,13 @@ class box_birthdays extends ModeleBoxes $userstatic->email = $objp->email; $userstatic->statut = $objp->status; - $dateb = $this->db->jdate($objp->birth); + $dateb = $this->db->jdate($objp->datea); $age = date('Y', dol_now()) - date('Y', $dateb); + $picb = ''; + $pice = ''; + $typea = ($objp->typea == 'birth') ? $picb : $pice; + $this->info_box_contents[$line][] = array( 'td' => '', 'text' => $userstatic->getNomUrl(1), @@ -119,7 +129,18 @@ class box_birthdays extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'class="center nowraponall"', - 'text' => dol_print_date($dateb, "day", 'tzserver').' - '.$age.' '.$langs->trans('DurationYears') + 'text' => dol_print_date($dateb, "day", 'tzserver') + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="right nowraponall"', + 'text' => $age.' '.$langs->trans('DurationYears') + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'class="center nowraponall"', + 'text' => $typea, + 'asis' => 1 ); /*$this->info_box_contents[$line][] = array( From 07f9541efd0eed00ae5c447970ec97300dc6129e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jul 2022 20:12:35 +0200 Subject: [PATCH 052/105] Fix missing migration --- htdocs/core/lib/ftp.lib.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/htdocs/core/lib/ftp.lib.php b/htdocs/core/lib/ftp.lib.php index 42f5806fba5..928a7e4a934 100644 --- a/htdocs/core/lib/ftp.lib.php +++ b/htdocs/core/lib/ftp.lib.php @@ -218,6 +218,35 @@ function dol_ftp_get($connect_id, $file, $newsection) } } +/** + * Upload a FTP file + * + * @param resource $connect_id Connection handler + * @param string $file File + * @param string $newsection $newsection + * @return result + */ +function dol_ftp_put($connect_id, $file, $newsection) +{ + + global $conf; + + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + $newsection = ssh2_sftp_realpath($connect_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + + // Remote file + $filename = $file; + $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; + $newremotefileiso = utf8_decode($remotefile); + + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + return fopen('ssh2.sftp://'.intval($connect_id).$newremotefileiso, 'r'); + } else { + return ftp_put($connect_id, $localfile, $newremotefileiso, FTP_BINARY); + } +} + /** * Remove FTP directory * From 1ef855e74270611d13ce731147c0fe48187c4302 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 1 Aug 2022 19:20:39 +0200 Subject: [PATCH 053/105] Fix display variable substitutions --- htdocs/core/lib/functions.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c3cd8922955..afbc71be0d1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -14,7 +14,7 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2022 Frédéric France - * Copyright (C) 2019 Thibault Foucart + * Copyright (C) 2019-2022 Thibault Foucart * Copyright (C) 2020 Open-Dsi * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2022 Anthony Berton @@ -7388,6 +7388,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__CONTRACT_LOWEST_EXPIRATION_DATE__'] = 'Lowest data for planned expiration of service'; $substitutionarray['__CONTRACT_LOWEST_EXPIRATION_DATETIME__'] = 'Lowest date and hour for planned expiration of service'; } + if (!empty($conf->propal->enabled) && (!is_object($object) || $object->element == 'propal')) { + $substitutionarray['__ONLINE_SIGN_URL__'] = 'ToOfferALinkForOnlineSignature'; + } $substitutionarray['__ONLINE_PAYMENT_URL__'] = 'UrlToPayOnlineIfApplicable'; $substitutionarray['__ONLINE_PAYMENT_TEXT_AND_URL__'] = 'TextAndUrlToPayOnlineIfApplicable'; $substitutionarray['__SECUREKEYPAYMENT__'] = 'Security key (if key is not unique per record)'; From dcac229700a32823ab3f3e78019101cea4632fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 2 Aug 2022 11:01:09 +0200 Subject: [PATCH 054/105] Update CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 94fb05d5346..7acd7ac3db0 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2019-2022 Frédéric France * * 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 @@ -547,10 +547,18 @@ class CMailFile } if (!empty($this->addr_cc)) { - $this->message->setCc($this->getArrayAddress($this->addr_cc)); + try { + $this->message->setCc($this->getArrayAddress($this->addr_cc)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } } if (!empty($this->addr_bcc)) { - $this->message->setBcc($this->getArrayAddress($this->addr_bcc)); + try { + $this->message->setBcc($this->getArrayAddress($this->addr_bcc)); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + } } //if (! empty($this->errors_to)) $this->message->setErrorsTo($this->getArrayAddress($this->errors_to)); if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) { From 9d036e24e1df06809be1b50a7eb213d2a799ece9 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 2 Aug 2022 11:53:33 +0200 Subject: [PATCH 055/105] fix hasRights warnings --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index f206d47bd24..4c044f329b2 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -778,7 +778,7 @@ class User extends CommonObject return $this->rights->$rightsPath->$permlevel1->lire; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->creer)) { - return $this->rights->$rightsPath->$permlevel1->create; + return $this->rights->$rightsPath->$permlevel1->creer; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->create)) { return $this->rights->$rightsPath->$permlevel1->create; @@ -797,7 +797,7 @@ class User extends CommonObject return $this->rights->$rightsPath->lire; } if ($permlevel1 == 'write' && !empty($this->rights->$rightsPath->creer)) { - return $this->rights->$rightsPath->create; + return $this->rights->$rightsPath->creer; } if ($permlevel1 == 'write' && !empty($this->rights->$rightsPath->create)) { return $this->rights->$rightsPath->create; From a42e0a8892a294e221eaae65c61f41c09aaf1478 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 11:57:53 +0200 Subject: [PATCH 056/105] add translation --- htdocs/langs/en_US/errors.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 5326a0f11d1..01d5357b7c5 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -289,6 +289,7 @@ ErrorInvoiceLoadThirdPartyKey=Third-party key "%s" no set for invoice "%s" ErrorDeleteLineNotAllowedByObjectStatus=Delete line is not allowed by current object status ErrorAjaxRequestFailed=Request failed ErrorThirpdartyOrMemberidIsMandatory=Third party or Member of partnership is mandatory +ErrorFailedToWriteInTempDirectory=Failed to write in temp directory # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. From 238768a5d0c43cdedf7e24db766dbe1027e4644f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:08:44 +0200 Subject: [PATCH 057/105] add translation --- .../core/modules/asset/doc/doc_generic_asset_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index 247362b41dd..5faf853d7d7 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -284,8 +284,8 @@ class doc_generic_asset_odt extends ModelePDFAsset dol_mkdir($conf->asset->dir_temp); if (!is_writable($conf->asset->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->asset->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->asset->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From bdeb48ba8d4bb0ac283024d6a9ee39249b841cae Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:12:39 +0200 Subject: [PATCH 058/105] add translation --- htdocs/core/modules/barcode/doc/phpbarcode.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 443e3f436f8..4add94ffafb 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -183,16 +183,16 @@ class modPhpbarcode extends ModeleBarCode */ public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { - global $conf, $filebarcode; + global $conf, $filebarcode, $langs; dol_mkdir($conf->barcode->dir_temp); if (!is_writable($conf->barcode->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } - $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; $filebarcode = $file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode From 09079c4fbdb44234351f9eb4263abdce8cacaacd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:14:32 +0200 Subject: [PATCH 059/105] add translation --- htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index ed32667a67e..9536251c36a 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -155,16 +155,16 @@ class modTcpdfbarcode extends ModeleBarCode */ public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) { - global $conf, $_GET; + global $conf, $langs, $_GET; dol_mkdir($conf->barcode->dir_temp); if (!is_writable($conf->barcode->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->barcode->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->barcode->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } - $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; + $file = $conf->barcode->dir_temp . '/barcode_' . $code . '_' . $encoding . '.png'; $tcpdfEncoding = $this->getTcpdfEncodingType($encoding); if (empty($tcpdfEncoding)) { From 581dec6ecbdcefaa29449a5279b7b557f3094a7f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:16:32 +0200 Subject: [PATCH 060/105] add translation --- .../modules/bom/doc/doc_generic_bom_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 43bf3ecd2cb..514a6c162fd 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -274,7 +274,7 @@ class doc_generic_bom_odt extends ModelePDFBom $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -283,11 +283,11 @@ class doc_generic_bom_odt extends ModelePDFBom if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -295,8 +295,8 @@ class doc_generic_bom_odt extends ModelePDFBom dol_mkdir($conf->bom->dir_temp); if (!is_writable($conf->bom->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->bom->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->bom->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 96465e42b26f92a428f592693d37dd7669425901 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:18:18 +0200 Subject: [PATCH 061/105] add translation --- .../commande/doc/doc_generic_order_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 86e43a9c021..b9ff88c4fe6 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -280,7 +280,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -289,11 +289,11 @@ class doc_generic_order_odt extends ModelePDFCommandes if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -301,8 +301,8 @@ class doc_generic_order_odt extends ModelePDFCommandes dol_mkdir($conf->commande->dir_temp); if (!is_writable($conf->commande->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->commande->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->commande->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 277602a6582361e27d319cd49808cad92e16cc0f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:19:28 +0200 Subject: [PATCH 062/105] add translation --- .../doc/doc_generic_contract_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index 9050e1accf5..df584348e5e 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -266,7 +266,7 @@ class doc_generic_contract_odt extends ModelePDFContract $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -275,11 +275,11 @@ class doc_generic_contract_odt extends ModelePDFContract if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -287,8 +287,8 @@ class doc_generic_contract_odt extends ModelePDFContract dol_mkdir($conf->contrat->dir_temp); if (!is_writable($conf->contrat->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->contrat->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->contrat->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 63fd9d4951fb9b35783aa30194c7593e52527b7c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:20:38 +0200 Subject: [PATCH 063/105] add translation --- .../doc/doc_generic_shipment_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index f2035c89575..8d6e980bdc5 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -278,7 +278,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +287,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -299,8 +299,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition dol_mkdir($conf->expedition->dir_temp); if (!is_writable($conf->expedition->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->expedition->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 4834fffc13aa980f60559919c4c0d0ef927fa5fd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:21:31 +0200 Subject: [PATCH 064/105] add translation --- .../facture/doc/doc_generic_invoice_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index fc73460bd1b..f255fa52474 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -278,7 +278,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +287,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; //print "newdir=".$dir; //print "newfile=".$newfile; @@ -300,8 +300,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures dol_mkdir($conf->facture->dir_temp); if (!is_writable($conf->facture->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->facture->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->facture->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 26ec19122ead33b8cf7439a953ef948ce37a7b98 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:22:24 +0200 Subject: [PATCH 065/105] add translation --- .../member/doc/doc_generic_member_odt.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index c2ccff58ed7..0a196b49ae3 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -268,7 +268,7 @@ class doc_generic_member_odt extends ModelePDFMember $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -277,11 +277,11 @@ class doc_generic_member_odt extends ModelePDFMember if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -289,8 +289,8 @@ class doc_generic_member_odt extends ModelePDFMember dol_mkdir($conf->adherent->dir_temp); if (!is_writable($conf->adherent->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->adherent->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->adherent->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From f4394e28c61efa7154dcdd8ce99295a16618f240 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:23:14 +0200 Subject: [PATCH 066/105] add translation --- .../modules/mrp/doc/doc_generic_mo_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 7463ed995d0..1c08dd7228d 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -267,7 +267,7 @@ class doc_generic_mo_odt extends ModelePDFMo $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -276,11 +276,11 @@ class doc_generic_mo_odt extends ModelePDFMo if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -288,8 +288,8 @@ class doc_generic_mo_odt extends ModelePDFMo dol_mkdir($conf->mrp->dir_temp); if (!is_writable($conf->mrp->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->mrp->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mrp->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 835c068ed521d6af5007184d29b08407b06e892e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:24:39 +0200 Subject: [PATCH 067/105] add translation --- .../product/doc/doc_generic_product_odt.modules.php | 12 ++++++------ .../project/doc/doc_generic_project_odt.modules.php | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 5d228da7d8c..c4167847986 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -278,7 +278,7 @@ class doc_generic_product_odt extends ModelePDFProduct $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -287,11 +287,11 @@ class doc_generic_product_odt extends ModelePDFProduct if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -299,8 +299,8 @@ class doc_generic_product_odt extends ModelePDFProduct dol_mkdir($conf->product->dir_temp); if (!is_writable($conf->product->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->product->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 8bd8d030a37..d00eee45219 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -556,7 +556,7 @@ class doc_generic_project_odt extends ModelePDFProjects $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -565,11 +565,11 @@ class doc_generic_project_odt extends ModelePDFProjects if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -577,8 +577,8 @@ class doc_generic_project_odt extends ModelePDFProjects dol_mkdir($conf->project->dir_temp); if (!is_writable($conf->project->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->project->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 71470dd7c963221e5516dfde12d8538dabe9ff74 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:25:23 +0200 Subject: [PATCH 068/105] add translation --- .../project/task/doc/doc_generic_task_odt.modules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index e26318b749c..410d3ae5b29 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -517,9 +517,9 @@ class doc_generic_task_odt extends ModelePDFTask $newfiletmp = preg_replace('/\.(ods|odt)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; - $file = $dir.'/'.$newfiletmp.'.odt'; + $file = $dir . '/' . $newfiletmp . '.odt'; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -527,8 +527,8 @@ class doc_generic_task_odt extends ModelePDFTask dol_mkdir($conf->project->dir_temp); if (!is_writable($conf->project->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->project->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->project->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From c2cc2463f8c994466b8cd610deda705179e81b70 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:26:38 +0200 Subject: [PATCH 069/105] add translation --- .../propale/doc/doc_generic_proposal_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7f2e0733e9d..8314d62dada 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -311,7 +311,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -320,11 +320,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -332,8 +332,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales dol_mkdir($conf->propal->multidir_temp[$object->entity]); if (!is_writable($conf->propal->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->propal->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->propal->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 16c55583297bf05ecb1ea1d3a7122d460861915a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:27:25 +0200 Subject: [PATCH 070/105] add translation --- .../doc/doc_generic_reception_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 1976dea773f..18afd4fd054 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -271,7 +271,7 @@ class doc_generic_reception_odt extends ModelePdfReception $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -280,11 +280,11 @@ class doc_generic_reception_odt extends ModelePdfReception if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -292,8 +292,8 @@ class doc_generic_reception_odt extends ModelePdfReception dol_mkdir($conf->reception->dir_temp); if (!is_writable($conf->reception->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->reception->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 2a054fc124e360fefd22341fb3bbbb929f227be9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:28:48 +0200 Subject: [PATCH 071/105] add translation --- .../modules/societe/doc/doc_generic_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index a19c90215b0..4a63e9c91f6 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -256,7 +256,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) { - $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp; + $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)) . '-' . $newfiletmp; $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) } if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { @@ -264,11 +264,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; $object->builddoc_filename = $filename; // For triggers //print "newfileformat=".$newfileformat; //print "newdir=".$dir; @@ -279,8 +279,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc dol_mkdir($conf->societe->multidir_temp[$object->entity]); if (!is_writable($conf->societe->multidir_temp[$object->entity])) { - $this->error = "Failed to write in temp directory ".$conf->societe->multidir_temp[$object->entity]; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->societe->multidir_temp[$object->entity]); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From dc778a5a90e4c4764ddea923d35883b1bf45b74d Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:29:42 +0200 Subject: [PATCH 072/105] add translation --- .../stock/doc/doc_generic_stock_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index c54e5f4f02a..c5a6ae75389 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -279,7 +279,7 @@ class doc_generic_stock_odt extends ModelePDFStock $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -288,11 +288,11 @@ class doc_generic_stock_odt extends ModelePDFStock if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -300,8 +300,8 @@ class doc_generic_stock_odt extends ModelePDFStock dol_mkdir($conf->product->dir_temp); if (!is_writable($conf->product->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->product->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->product->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 813c4e87f2e4952050ccb759b01c55cbc15769ee Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:30:41 +0200 Subject: [PATCH 073/105] add translation --- .../doc/doc_generic_supplier_order_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index a9a8f612578..4e577795ceb 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -262,7 +262,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -271,11 +271,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -283,8 +283,8 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders dol_mkdir($conf->fournisseur->commande->dir_temp); if (!is_writable($conf->fournisseur->commande->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->fournisseur->commande->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->fournisseur->commande->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From e2df602229c444b888641623050f9702b4413019 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:31:43 +0200 Subject: [PATCH 074/105] add translation --- .../doc_generic_supplier_proposal_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 82475f7a016..b8148a35c5d 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -297,7 +297,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -306,11 +306,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -318,8 +318,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal dol_mkdir($conf->supplier_proposal->dir_temp); if (!is_writable($conf->supplier_proposal->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->supplier_proposal->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->supplier_proposal->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 589887a7b852f25959a1191979ed895bbf40f45b Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:32:41 +0200 Subject: [PATCH 075/105] add translation --- .../ticket/doc/doc_generic_ticket_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index cf358cae606..706977f72e6 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -266,7 +266,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -275,11 +275,11 @@ class doc_generic_ticket_odt extends ModelePDFTicket if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -287,8 +287,8 @@ class doc_generic_ticket_odt extends ModelePDFTicket dol_mkdir($conf->ticket->dir_temp); if (!is_writable($conf->ticket->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->ticket->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->ticket->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From f7d3090d2d6ea5bfa59f649078b9373ed746e7a7 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:33:24 +0200 Subject: [PATCH 076/105] add translation --- .../user/doc/doc_generic_user_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 0c9f5263e09..505d68f0441 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -297,7 +297,7 @@ class doc_generic_user_odt extends ModelePDFUser $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -306,11 +306,11 @@ class doc_generic_user_odt extends ModelePDFUser if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -318,8 +318,8 @@ class doc_generic_user_odt extends ModelePDFUser dol_mkdir($conf->user->dir_temp); if (!is_writable($conf->user->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->user->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From aba9c262ba119732740e42c0a9df73f87b3a39d9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:34:17 +0200 Subject: [PATCH 077/105] add translation --- .../doc/doc_generic_usergroup_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 188cff00216..d56d8f8d4d1 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -281,7 +281,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -290,11 +290,11 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -302,8 +302,8 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup dol_mkdir($conf->user->dir_temp); if (!is_writable($conf->user->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->user->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->user->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From 576a1fd5a1f331c063b76bbc741205d7c2957571 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 2 Aug 2022 12:35:27 +0200 Subject: [PATCH 078/105] add translation --- .../doc/doc_generic_myobject_odt.modules.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 4338c2b7d6a..3011c932171 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -282,7 +282,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); - $newfiletmp = $objectref.'_'.$newfiletmp; + $newfiletmp = $objectref . '_' . $newfiletmp; //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); @@ -291,11 +291,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject if ($format == '1') { $format = '%Y%m%d%H%M%S'; } - $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; + $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; } else { - $filename = $newfiletmp.'.'.$newfileformat; + $filename = $newfiletmp . '.' . $newfileformat; } - $file = $dir.'/'.$filename; + $file = $dir . '/' . $filename; //print "newdir=".$dir; //print "newfile=".$newfile; //print "file=".$file; @@ -303,8 +303,8 @@ class doc_generic_myobject_odt extends ModelePDFMyObject dol_mkdir($conf->mymodule->dir_temp); if (!is_writable($conf->mymodule->dir_temp)) { - $this->error = "Failed to write in temp directory ".$conf->mymodule->dir_temp; - dol_syslog('Error in write_file: '.$this->error, LOG_ERR); + $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mymodule->dir_temp); + dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); return -1; } From a5a870a327ffb4079d7864febe4b48e2f8b15a6a Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 2 Aug 2022 15:03:28 +0200 Subject: [PATCH 079/105] Fix : php 8.1 warnings ticket --- htdocs/core/class/html.formticket.class.php | 12 ++++++----- htdocs/core/lib/ticket.lib.php | 2 +- .../knowledgerecord_agenda.php | 3 ++- .../knowledgerecord_card.php | 2 +- .../knowledgerecord_document.php | 2 +- .../knowledgerecord_list.php | 1 + htdocs/ticket/card.php | 21 ++++++++++--------- htdocs/ticket/stats/index.php | 2 +- 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index e13aaba4685..62965413a5d 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -119,7 +119,7 @@ class FormTicket $this->action = 'add'; - $this->withcompany = $conf->societe->enabled ? 1 : 0; + $this->withcompany = isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; //$this->withreadid=0; @@ -169,7 +169,7 @@ class FormTicket print dol_get_fiche_head(null, 'card', '', 0, ''); } - print '
'; + print 'param["returnurl"] : "").'">'; print ''; print ''; foreach ($this->param as $key => $value) { @@ -341,10 +341,12 @@ class FormTicket print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title; print ''; } else { - if ($this->withreadid > 0) { + if (isset($this->withreadid) && $this->withreadid > 0) { $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.''; + } else { + $subject = GETPOST('subject', 'alpha'); } - print ''; + print ''; print ''; } } @@ -643,7 +645,7 @@ class FormTicket print '
'; - print $form->buttonsSaveCancel((($this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : "")); + print $form->buttonsSaveCancel(((isset($this->withreadid) && $this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : "")); /* print '
'; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index e1544e763df..ef2f6bcf286 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -84,7 +84,7 @@ function ticket_prepare_head($object) $head[$h][2] = 'tabTicket'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && $conf->societe->enabled) { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && isModEnabled("societe")) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; $head[$h][1] = $langs->trans('ContactsAddresses'); diff --git a/htdocs/knowledgemanagement/knowledgerecord_agenda.php b/htdocs/knowledgemanagement/knowledgerecord_agenda.php index 37c6b9a6e3c..cbf8ccf0895 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_agenda.php +++ b/htdocs/knowledgemanagement/knowledgerecord_agenda.php @@ -41,6 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +$socid = GETPOST('socid', 'int'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); @@ -80,7 +81,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->knowledgemanagement->multidir_output[$object->entity]."/".$object->id; + $upload_dir = (!empty($conf->knowledgemanagement->multidir_output[$object->entity]) ? $conf->knowledgemanagement->multidir_output[$object->entity] : $conf->knowledgemanagement->dir_output)."/".$object->id; } // Security check - Protection if external user diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index baddd9e29a5..66b7b0ca160 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -44,7 +44,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new KnowledgeRecord($db); diff --git a/htdocs/knowledgemanagement/knowledgerecord_document.php b/htdocs/knowledgemanagement/knowledgerecord_document.php index ec88c33d882..ce185c9b8cf 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_document.php +++ b/htdocs/knowledgemanagement/knowledgerecord_document.php @@ -49,7 +49,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index b903ab83acc..3f68c444fd2 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -51,6 +51,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$mode = GETPOST('mode', 'aZ09'); $id = GETPOST('id', 'int'); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e7fc3abba34..9638e763dba 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -56,6 +56,7 @@ $projectid = GETPOST('projectid', 'int'); $cancel = GETPOST('cancel', 'alpha'); $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('$backtopage', 'alpha'); +$contactid = GETPOST('contactid', 'int'); $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); @@ -1038,7 +1039,7 @@ if ($action == 'create' || $action == 'presend') { print ''; print '
'; print $langs->trans("AssignedTo"); - if ($object->fk_status < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { + if (isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { print ''.img_edit($langs->trans('Modify'), '').''; } print '
'; @@ -1066,7 +1067,7 @@ if ($action == 'create' || $action == 'presend') { print ''; - if ($action != 'progression' && $object->fk_status < $object::STATUS_CLOSED && !$user->socid) { + if ($action != 'progression' && isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && !$user->socid) { print ''; } print '
'; print $langs->trans('Progression').''; print ''.img_edit($langs->trans('Modify')).'
'; @@ -1189,7 +1190,7 @@ if ($action == 'create' || $action == 'presend') { print ''; } else { // Button to edit Properties - if ($object->fk_status < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) { print ' '.img_edit($langs->trans('Modify')).''; } } @@ -1248,7 +1249,7 @@ if ($action == 'create' || $action == 'presend') { // Display navbar with links to change ticket status print ''; - if (!$user->socid && $user->rights->ticket->write && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { + if (!$user->socid && $user->rights->ticket->write && isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { $actionobject->viewStatusActions($object); } @@ -1384,16 +1385,16 @@ if ($action == 'create' || $action == 'presend') { if (empty($reshook)) { // Show link to add a message (if read and not closed) - if ($object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") { + if (isset($object->fk_status) && $object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") { print dolGetButtonAction('', $langs->trans('TicketAddMessage'), 'default', $_SERVER["PHP_SELF"].'?action=presend_addmessage&mode=init&token='.newToken().'&track_id='.$object->track_id, ''); } // Link to create an intervention // socid is needed otherwise fichinter ask it and forgot origin after form submit :\ - if (!$object->fk_soc && $user->rights->ficheinter->creer) { + if (!$object->fk_soc && $user->hasRight("ficheinter", "creer")) { print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } - if ($object->fk_soc > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) { + if ($object->fk_soc > 0 && isset($object->fk_status) && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) { print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='. $object->fk_soc.'&origin=ticket_ticket&originid='. $object->id, ''); } @@ -1404,17 +1405,17 @@ if ($action == 'create' || $action == 'presend') { */ // Close ticket if statut is read - if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { print dolGetButtonAction('', $langs->trans('CloseTicket'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&track_id='.$object->track_id, ''); } // Abadon ticket if statut is read - if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { print dolGetButtonAction('', $langs->trans('AbandonTicket'), 'default', $_SERVER["PHP_SELF"].'?action=abandon&token='.newToken().'&track_id='.$object->track_id, ''); } // Re-open ticket - if (!$user->socid && ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED) && !$user->socid) { + if (!$user->socid && (isset($object->fk_status) && ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED)) && !$user->socid) { print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&track_id='.$object->track_id, ''); } diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php index 37273ee4d1d..463526ba711 100644 --- a/htdocs/ticket/stats/index.php +++ b/htdocs/ticket/stats/index.php @@ -284,7 +284,7 @@ foreach ($data as $val) { print ''; print ' 0 ? '&userid='.$userid : '').'">'.$year.''; print ''.$val['nb'].''; - print ''.round($val['nb_diff']).''; + print ''.round(isset($val['nb_diff']) ? $val['nb_diff'] : 0).''; //print ''.price(price2num($val['total'], 'MT'), 1).''; //print ''.round($val['total_diff']).''; //print ''.price(price2num($val['avg'], 'MT'), 1).''; From 9e963ef0ef34c50482f2c13d90f001e12ac68a91 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 2 Aug 2022 18:33:06 +0200 Subject: [PATCH 080/105] fix reappro was very long to display --- htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 1 + .../mysql/tables/llx_commande_fournisseur_dispatch.key.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index 78f71563a45..5d43db87b26 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -66,3 +66,4 @@ ALTER TABLE llx_societe ADD last_main_doc VARCHAR(255) NULL AFTER model_pdf; ALTER TABLE llx_bank ADD COLUMN position integer DEFAULT 0; +ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product); diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql index 9049cf57065..62d62a2ec38 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql @@ -19,3 +19,4 @@ ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande); ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_reception (fk_reception); ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid); +ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product); From c94b7ddd366ab79fb7a3c661110d64988541cc5c Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 2 Aug 2022 15:03:28 +0200 Subject: [PATCH 081/105] Fix : php 8.1 warnings ticket --- htdocs/core/class/html.formticket.class.php | 12 ++++++----- htdocs/core/lib/ticket.lib.php | 2 +- .../knowledgerecord_agenda.php | 3 ++- .../knowledgerecord_card.php | 2 +- .../knowledgerecord_document.php | 2 +- .../knowledgerecord_list.php | 1 + htdocs/ticket/card.php | 21 ++++++++++--------- htdocs/ticket/stats/index.php | 2 +- 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index e13aaba4685..62965413a5d 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -119,7 +119,7 @@ class FormTicket $this->action = 'add'; - $this->withcompany = $conf->societe->enabled ? 1 : 0; + $this->withcompany = isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; //$this->withreadid=0; @@ -169,7 +169,7 @@ class FormTicket print dol_get_fiche_head(null, 'card', '', 0, ''); } - print ''; + print 'param["returnurl"] : "").'">'; print ''; print ''; foreach ($this->param as $key => $value) { @@ -341,10 +341,12 @@ class FormTicket print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title; print ''; } else { - if ($this->withreadid > 0) { + if (isset($this->withreadid) && $this->withreadid > 0) { $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.''; + } else { + $subject = GETPOST('subject', 'alpha'); } - print ''; + print ''; print ''; } } @@ -643,7 +645,7 @@ class FormTicket print '
'; - print $form->buttonsSaveCancel((($this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : "")); + print $form->buttonsSaveCancel(((isset($this->withreadid) && $this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : "")); /* print '
'; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index e1544e763df..ef2f6bcf286 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -84,7 +84,7 @@ function ticket_prepare_head($object) $head[$h][2] = 'tabTicket'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && $conf->societe->enabled) { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && isModEnabled("societe")) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; $head[$h][1] = $langs->trans('ContactsAddresses'); diff --git a/htdocs/knowledgemanagement/knowledgerecord_agenda.php b/htdocs/knowledgemanagement/knowledgerecord_agenda.php index 37c6b9a6e3c..cbf8ccf0895 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_agenda.php +++ b/htdocs/knowledgemanagement/knowledgerecord_agenda.php @@ -41,6 +41,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +$socid = GETPOST('socid', 'int'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); @@ -80,7 +81,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals if ($id > 0 || !empty($ref)) { - $upload_dir = $conf->knowledgemanagement->multidir_output[$object->entity]."/".$object->id; + $upload_dir = (!empty($conf->knowledgemanagement->multidir_output[$object->entity]) ? $conf->knowledgemanagement->multidir_output[$object->entity] : $conf->knowledgemanagement->dir_output)."/".$object->id; } // Security check - Protection if external user diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index baddd9e29a5..66b7b0ca160 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -44,7 +44,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // Initialize technical objects $object = new KnowledgeRecord($db); diff --git a/htdocs/knowledgemanagement/knowledgerecord_document.php b/htdocs/knowledgemanagement/knowledgerecord_document.php index ec88c33d882..ce185c9b8cf 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_document.php +++ b/htdocs/knowledgemanagement/knowledgerecord_document.php @@ -49,7 +49,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index b903ab83acc..3f68c444fd2 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -51,6 +51,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$mode = GETPOST('mode', 'aZ09'); $id = GETPOST('id', 'int'); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e7fc3abba34..9638e763dba 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -56,6 +56,7 @@ $projectid = GETPOST('projectid', 'int'); $cancel = GETPOST('cancel', 'alpha'); $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('$backtopage', 'alpha'); +$contactid = GETPOST('contactid', 'int'); $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); @@ -1038,7 +1039,7 @@ if ($action == 'create' || $action == 'presend') { print ''; print '
'; print $langs->trans("AssignedTo"); - if ($object->fk_status < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { + if (isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { print ''.img_edit($langs->trans('Modify'), '').''; } print '
'; @@ -1066,7 +1067,7 @@ if ($action == 'create' || $action == 'presend') { print ''; - if ($action != 'progression' && $object->fk_status < $object::STATUS_CLOSED && !$user->socid) { + if ($action != 'progression' && isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && !$user->socid) { print ''; } print '
'; print $langs->trans('Progression').''; print ''.img_edit($langs->trans('Modify')).'
'; @@ -1189,7 +1190,7 @@ if ($action == 'create' || $action == 'presend') { print ''; } else { // Button to edit Properties - if ($object->fk_status < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) { print ' '.img_edit($langs->trans('Modify')).''; } } @@ -1248,7 +1249,7 @@ if ($action == 'create' || $action == 'presend') { // Display navbar with links to change ticket status print ''; - if (!$user->socid && $user->rights->ticket->write && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { + if (!$user->socid && $user->rights->ticket->write && isset($object->fk_status) && $object->fk_status < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { $actionobject->viewStatusActions($object); } @@ -1384,16 +1385,16 @@ if ($action == 'create' || $action == 'presend') { if (empty($reshook)) { // Show link to add a message (if read and not closed) - if ($object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") { + if (isset($object->fk_status) && $object->fk_status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") { print dolGetButtonAction('', $langs->trans('TicketAddMessage'), 'default', $_SERVER["PHP_SELF"].'?action=presend_addmessage&mode=init&token='.newToken().'&track_id='.$object->track_id, ''); } // Link to create an intervention // socid is needed otherwise fichinter ask it and forgot origin after form submit :\ - if (!$object->fk_soc && $user->rights->ficheinter->creer) { + if (!$object->fk_soc && $user->hasRight("ficheinter", "creer")) { print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false); } - if ($object->fk_soc > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) { + if ($object->fk_soc > 0 && isset($object->fk_status) && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) { print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='. $object->fk_soc.'&origin=ticket_ticket&originid='. $object->id, ''); } @@ -1404,17 +1405,17 @@ if ($action == 'create' || $action == 'presend') { */ // Close ticket if statut is read - if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { print dolGetButtonAction('', $langs->trans('CloseTicket'), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&track_id='.$object->track_id, ''); } // Abadon ticket if statut is read - if ($object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { + if (isset($object->fk_status) && $object->fk_status > 0 && $object->fk_status < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { print dolGetButtonAction('', $langs->trans('AbandonTicket'), 'default', $_SERVER["PHP_SELF"].'?action=abandon&token='.newToken().'&track_id='.$object->track_id, ''); } // Re-open ticket - if (!$user->socid && ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED) && !$user->socid) { + if (!$user->socid && (isset($object->fk_status) && ($object->fk_status == Ticket::STATUS_CLOSED || $object->fk_status == Ticket::STATUS_CANCELED)) && !$user->socid) { print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&track_id='.$object->track_id, ''); } diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php index 37273ee4d1d..463526ba711 100644 --- a/htdocs/ticket/stats/index.php +++ b/htdocs/ticket/stats/index.php @@ -284,7 +284,7 @@ foreach ($data as $val) { print ''; print ' 0 ? '&userid='.$userid : '').'">'.$year.''; print ''.$val['nb'].''; - print ''.round($val['nb_diff']).''; + print ''.round(isset($val['nb_diff']) ? $val['nb_diff'] : 0).''; //print ''.price(price2num($val['total'], 'MT'), 1).''; //print ''.round($val['total_diff']).''; //print ''.price(price2num($val['avg'], 'MT'), 1).''; From a32b31bf4f108eb5cce3a401959d6dfdc7603c21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 18:57:20 +0200 Subject: [PATCH 082/105] Fix bad var $liste_limit --- htdocs/eventorganization/conferenceorbooth_document.php | 2 +- htdocs/hrm/evaluation_document.php | 2 +- htdocs/hrm/job_document.php | 2 +- htdocs/hrm/position_document.php | 2 +- htdocs/hrm/skill_document.php | 2 +- htdocs/partnership/partnership_document.php | 2 +- htdocs/product/stock/stocktransfer/stocktransfer_document.php | 2 +- htdocs/recruitment/recruitmentcandidature_document.php | 2 +- htdocs/recruitment/recruitmentjobposition_document.php | 2 +- htdocs/workstation/workstation_document.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 739e6f81036..4a5b368df02 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -58,7 +58,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/hrm/evaluation_document.php b/htdocs/hrm/evaluation_document.php index 215756eff8b..cf93c75edbf 100644 --- a/htdocs/hrm/evaluation_document.php +++ b/htdocs/hrm/evaluation_document.php @@ -54,7 +54,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/hrm/job_document.php b/htdocs/hrm/job_document.php index 83745962052..0e4d34e0412 100644 --- a/htdocs/hrm/job_document.php +++ b/htdocs/hrm/job_document.php @@ -52,7 +52,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/hrm/position_document.php b/htdocs/hrm/position_document.php index eb4ac0e68ce..c51f2204441 100644 --- a/htdocs/hrm/position_document.php +++ b/htdocs/hrm/position_document.php @@ -53,7 +53,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/hrm/skill_document.php b/htdocs/hrm/skill_document.php index f305ecd1e2e..c0fe492be06 100644 --- a/htdocs/hrm/skill_document.php +++ b/htdocs/hrm/skill_document.php @@ -53,7 +53,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/partnership/partnership_document.php b/htdocs/partnership/partnership_document.php index 3e7f78e5118..f9ea6559979 100644 --- a/htdocs/partnership/partnership_document.php +++ b/htdocs/partnership/partnership_document.php @@ -49,7 +49,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_document.php b/htdocs/product/stock/stocktransfer/stocktransfer_document.php index e4675378d20..e259cc93365 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_document.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_document.php @@ -60,7 +60,7 @@ $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) $sortorder = "ASC"; diff --git a/htdocs/recruitment/recruitmentcandidature_document.php b/htdocs/recruitment/recruitmentcandidature_document.php index 38715f412f2..b52197fdb4a 100644 --- a/htdocs/recruitment/recruitmentcandidature_document.php +++ b/htdocs/recruitment/recruitmentcandidature_document.php @@ -48,7 +48,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/recruitment/recruitmentjobposition_document.php b/htdocs/recruitment/recruitmentjobposition_document.php index 43f90ca1fdd..50a9e7d2b4c 100644 --- a/htdocs/recruitment/recruitmentjobposition_document.php +++ b/htdocs/recruitment/recruitmentjobposition_document.php @@ -48,7 +48,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { diff --git a/htdocs/workstation/workstation_document.php b/htdocs/workstation/workstation_document.php index 50331b4b231..92cf4dfde15 100644 --- a/htdocs/workstation/workstation_document.php +++ b/htdocs/workstation/workstation_document.php @@ -48,7 +48,7 @@ $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("pa if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 -$offset = $liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortorder) { From 1165b32c70d09eeebe6bd9c1a398b3c5f24273c0 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 2 Aug 2022 19:07:39 +0200 Subject: [PATCH 083/105] Fix type with multicompany --- htdocs/adherents/type.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index ddc9a1470c0..f3d5f96a78a 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2019 Thibault Foucart + * Copyright (C) 2019-2022 Thibault Foucart * Copyright (C) 2020 Josep Lluís Amador * Copyright (C) 2021 Waël Almoman * @@ -141,6 +141,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } else { $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'"; + $sql .= " WHERE entity IN (".getEntity('member_type').")"; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); From da53e5ee5c2b9aff36144475bb4882956944d51d Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 2 Aug 2022 11:53:33 +0200 Subject: [PATCH 084/105] fix hasRights warnings --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b8c19ea28f1..fa38df82147 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -778,7 +778,7 @@ class User extends CommonObject return $this->rights->$rightsPath->$permlevel1->lire; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->creer)) { - return $this->rights->$rightsPath->$permlevel1->create; + return $this->rights->$rightsPath->$permlevel1->creer; } if ($permlevel2 == 'write' && !empty($this->rights->$rightsPath->$permlevel1->create)) { return $this->rights->$rightsPath->$permlevel1->create; @@ -797,7 +797,7 @@ class User extends CommonObject return $this->rights->$rightsPath->lire; } if ($permlevel1 == 'write' && !empty($this->rights->$rightsPath->creer)) { - return $this->rights->$rightsPath->create; + return $this->rights->$rightsPath->creer; } if ($permlevel1 == 'write' && !empty($this->rights->$rightsPath->create)) { return $this->rights->$rightsPath->create; From 7d29a5df79ba030604df6874ff9f97701cdaa86e Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 2 Aug 2022 19:07:39 +0200 Subject: [PATCH 085/105] Fix type with multicompany --- htdocs/adherents/type.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index bcd6c99afbf..f336530ff4e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2019 Thibault Foucart + * Copyright (C) 2019-2022 Thibault Foucart * Copyright (C) 2020 Josep Lluís Amador * Copyright (C) 2021 Waël Almoman * @@ -140,6 +140,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } else { $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'"; + $sql .= " WHERE entity IN (".getEntity('member_type').")"; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); From b77675db7cc3994c87eec25f627f1d35cf36cca8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 20:22:10 +0200 Subject: [PATCH 086/105] Prepare support of In-Reply-To --- htdocs/core/class/html.formmail.class.php | 16 +++++++++++----- htdocs/core/tpl/card_presend.tpl.php | 3 ++- .../recruitment/recruitmentcandidature_card.php | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 4c77566eeed..c23545a34c9 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -85,7 +85,7 @@ class FormMail extends Form public $toid; /** - * @var string replyto name + * @var string Reply-to name */ public $replytoname; @@ -95,20 +95,25 @@ class FormMail extends Form public $replytomail; /** - * @var string to name + * @var string To name */ public $toname; /** - * @var string to email + * @var string To email */ public $tomail; /** - * @var string trackid + * @var string Track id */ public $trackid; + /** + * @var string If you know a MSGID of an email and want to send the email in reply to it. Will be added into header as In-Reply-To: <...> + */ + public $inreplyto; + public $withsubstit; // Show substitution array public $withfrom; @@ -449,6 +454,7 @@ class FormMail extends Form $out .= ''; $out .= ''; $out .= ''; + $out .= ''; } if (!empty($this->withfrom)) { if (!empty($this->withfromreadonly)) { @@ -458,7 +464,7 @@ class FormMail extends Form } foreach ($this->param as $key => $value) { if (is_array($value)) { - $out .= "\n"; + $out .= "\n"; } else { $out .= ''."\n"; } diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 9e0a38bee39..0376a5e85c9 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -147,7 +147,8 @@ if ($action == 'presend') { $formmail->fromtype = 'special'; } - $formmail->trackid = $trackid; + $formmail->trackid = empty($trackid) ? '' : $trackid; + $formmail->inreplyto = empty($inreplyto) ? '' : $inreplyto; $formmail->withfrom = 1; // Fill list of recipient with email inside <>. diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index c1a4ca94045..3d11afc5900 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -652,6 +652,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $defaulttopic = 'InformationMessage'; $diroutput = $conf->recruitment->dir_output; $trackid = 'recruitmentcandidature'.$object->id; + $inreplyto = $object->email_msgid; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } From 3f5b3020b0aec8b174b75151ca1637438c8a14e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 20:37:42 +0200 Subject: [PATCH 087/105] Add email_date for job applications and tickets --- .../class/emailcollector.class.php | 12 +++++++----- htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 3 +++ ...itment_recruitmentcandidature-recruitment.sql | 1 + .../install/mysql/tables/llx_ticket-ticket.sql | 3 ++- .../class/recruitmentcandidature.class.php | 2 ++ htdocs/ticket/class/ticket.class.php | 16 ++++++++++++++-- 6 files changed, 29 insertions(+), 8 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 11d2dcfeb46..646c89226fe 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1855,8 +1855,8 @@ class EmailCollector extends CommonObject $actioncomm->label = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from; $actioncomm->note_private = $descriptionfull; $actioncomm->fk_project = $projectstatic->id; - $actioncomm->datep = $date; - $actioncomm->datef = $date; + $actioncomm->datep = $date; // date of email + $actioncomm->datef = $date; // date of email $actioncomm->percentage = -1; // Not applicable $actioncomm->socid = $thirdpartystatic->id; $actioncomm->contact_id = $contactstatic->id; @@ -2103,7 +2103,7 @@ class EmailCollector extends CommonObject $percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent'); $projecttocreate->title = $subject; - $projecttocreate->date_start = $date; + $projecttocreate->date_start = $date; // date of email $projecttocreate->date_end = ''; $projecttocreate->opp_status = $id_opp_status; $projecttocreate->opp_percent = $percent_opp_status; @@ -2211,12 +2211,13 @@ class EmailCollector extends CommonObject $tickettocreate->severity_code = (!empty($conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE) ? $conf->global->MAIN_EMAILCOLLECTOR_TICKET_SEVERITY_CODE : dol_getIdFromCode($this->db, 1, 'c_ticket_severity', 'use_default', 'code', 1)); $tickettocreate->origin_email = $from; $tickettocreate->fk_user_create = $user->id; - $tickettocreate->datec = $date; + $tickettocreate->datec = dol_now(); $tickettocreate->fk_project = $projectstatic->id; $tickettocreate->notify_tiers_at_create = 0; $tickettocreate->note_private = $descriptionfull; $tickettocreate->entity = $conf->entity; $tickettocreate->email_msgid = $msgid; + $tickettocreate->email_date = $date; //$tickettocreate->fk_contact = $contactstatic->id; $savesocid = $tickettocreate->socid; @@ -2311,12 +2312,13 @@ class EmailCollector extends CommonObject $candidaturetocreate->email = $from; //$candidaturetocreate->lastname = $langs->trans("Anonymous").' - '.$from; $candidaturetocreate->fk_user_creat = $user->id; - $candidaturetocreate->date_creation = $date; + $candidaturetocreate->date_creation = dol_now(); $candidaturetocreate->fk_project = $projectstatic->id; $candidaturetocreate->description = $description; $candidaturetocreate->note_private = $descriptionfull; $candidaturetocreate->entity = $conf->entity; $candidaturetocreate->email_msgid = $msgid; + $candidaturetocreate->email_date = $date; // date of email $candidaturetocreate->status = $candidaturetocreate::STATUS_DRAFT; //$candidaturetocreate->fk_contact = $contactstatic->id; diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index f8ae461bdfe..4ab1b1e1fa3 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -70,3 +70,6 @@ ALTER TABLE llx_bank ADD COLUMN position integer DEFAULT 0; ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_product (fk_product); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD email_date datetime after email_msgid; +ALTER TABLE llx_ticket ADD email_date datetime after email_msgid; + diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql index 5749acd93d8..8d5dd3bd14f 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql @@ -38,6 +38,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( remuneration_requested integer, remuneration_proposed integer, email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index + email_date datetime, fk_recruitment_origin INTEGER NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ticket-ticket.sql b/htdocs/install/mysql/tables/llx_ticket-ticket.sql index 1f60cb3e6f8..278d62894bc 100644 --- a/htdocs/install/mysql/tables/llx_ticket-ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket-ticket.sql @@ -34,12 +34,13 @@ CREATE TABLE llx_ticket type_code varchar(32), category_code varchar(32), severity_code varchar(32), - datec datetime, + datec datetime, -- date of creation of record date_read datetime, date_last_msg_sent datetime, date_close datetime, notify_tiers_at_create tinyint, email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID + email_date datetime, -- if ticket is created by email collector, we store here Date of message ip varchar(250), tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index b0a8e9e52a0..185fdcabb19 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -124,6 +124,7 @@ class RecruitmentCandidature extends CommonObject 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), + 'email_date' => array('type'=>'datetime', 'label'=>'EmailDate', 'visible'=>-2, 'enabled'=>1, 'position'=>541), //'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1), 'remuneration_requested' => array('type'=>'integer', 'label'=>'RequestedRemuneration', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,), 'remuneration_proposed' => array('type'=>'integer', 'label'=>'ProposedRemuneration', 'enabled'=>'1', 'position'=>81, 'notnull'=>0, 'visible'=>-1,), @@ -149,6 +150,7 @@ class RecruitmentCandidature extends CommonObject public $phone; public $date_birth; public $email_msgid; + public $email_date; public $remuneration_requested; public $remuneration_proposed; public $fk_recruitment_origin; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 7f9715d0580..5b49a5d095e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -203,16 +203,23 @@ class Ticket extends CommonObject public $notify_tiers_at_create; /** - * @var string msgid + * @var string Email MSGID */ public $email_msgid; + /** + * @var string Email Date + */ + public $email_date; + + public $lines; + /** * @var string Regex pour les images */ - public $regeximgext = '\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff'; + public $regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into images.lib.php /** * Status @@ -277,6 +284,7 @@ class Ticket extends CommonObject 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), + 'email_date' => array('type'=>'datetime', 'label'=>'EmailDate', 'visible'=>-2, 'enabled'=>1, 'position'=>541), 'progress' => array('type'=>'integer', 'label'=>'Progression', 'visible'=>-1, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'css'=>'right', 'help'=>"", 'isameasure'=>2, 'csslist'=>'width50'), 'resolution' => array('type'=>'integer', 'label'=>'Resolution', 'visible'=>-1, 'enabled'=>'$conf->global->TICKET_ENABLE_RESOLUTION', 'position'=>550, 'notnull'=>1), 'fk_statut' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>600, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array(0 => 'Unread', 1 => 'Read', 3 => 'Answered', 4 => 'Assigned', 5 => 'InProgress', 6 => 'Waiting', 8 => 'SolvedClosed', 9 => 'Deleted')), @@ -437,6 +445,7 @@ class Ticket extends CommonObject $sql .= "fk_user_create,"; $sql .= "fk_user_assign,"; $sql .= "email_msgid,"; + $sql .= "email_date,"; $sql .= "subject,"; $sql .= "message,"; $sql .= "fk_statut,"; @@ -460,6 +469,7 @@ class Ticket extends CommonObject $sql .= " ".($this->fk_user_create > 0 ? $this->fk_user_create : ($user->id > 0 ? $user->id : 'NULL')).","; $sql .= " ".($this->fk_user_assign > 0 ? $this->fk_user_assign : 'NULL').","; $sql .= " ".(empty($this->email_msgid) ? 'NULL' : "'".$this->db->escape($this->email_msgid)."'").","; + $sql .= " ".(empty($this->email_date) ? 'NULL' : "'".$this->db->idate($this->email_date)."'").","; $sql .= " ".(!isset($this->subject) ? 'NULL' : "'".$this->db->escape($this->subject)."'").","; $sql .= " ".(!isset($this->message) ? 'NULL' : "'".$this->db->escape($this->message)."'").","; $sql .= " ".(!isset($this->fk_statut) ? '0' : "'".$this->db->escape($this->fk_statut)."'").","; @@ -570,6 +580,7 @@ class Ticket extends CommonObject $sql .= " t.fk_user_create,"; $sql .= " t.fk_user_assign,"; $sql .= " t.email_msgid,"; + $sql .= " t.email_date,"; $sql .= " t.subject,"; $sql .= " t.message,"; $sql .= " t.fk_statut as status,"; @@ -620,6 +631,7 @@ class Ticket extends CommonObject $this->fk_user_create = $obj->fk_user_create; $this->fk_user_assign = $obj->fk_user_assign; $this->email_msgid = $obj->email_msgid; + $this->email_date = $this->db->jdate($obj->email_date); $this->subject = $obj->subject; $this->message = $obj->message; From eda2b0dd71b097bec99d3533cc0fcbb79d5a950e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 21:12:09 +0200 Subject: [PATCH 088/105] Debug v16. Fix non escaping for commobject field text --- htdocs/core/class/commonobject.class.php | 4 ++-- .../recruitment/class/recruitmentcandidature.class.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index ed370dfab97..3c24b3c484f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7765,12 +7765,12 @@ abstract class CommonObject } else { $value = ''; } - } elseif (preg_match('/^(text|html)/', $type)) { - $value = dol_htmlentitiesbr($value); } elseif ($type == 'password') { $value = preg_replace('/./i', '*', $value); } elseif ($type == 'array') { $value = implode('
', $value); + } else { // text|html|varchar + $value = dol_htmlentitiesbr($value); } //print $type.'-'.$size.'-'.$value; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 185fdcabb19..c42d6d10ff1 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -114,12 +114,10 @@ class RecruitmentCandidature extends CommonObject 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth125 tdoverflowmax200'), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), - 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>1,), - 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), - 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,), - 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,), + 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), + 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), 'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax200'), 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), @@ -128,7 +126,9 @@ class RecruitmentCandidature extends CommonObject //'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1), 'remuneration_requested' => array('type'=>'integer', 'label'=>'RequestedRemuneration', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,), 'remuneration_proposed' => array('type'=>'integer', 'label'=>'ProposedRemuneration', 'enabled'=>'1', 'position'=>81, 'notnull'=>0, 'visible'=>-1,), - 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>500, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'), + 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>1, 'csslist'=>'nowraponall'), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'default'=>0, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Received', '3'=>'ContractProposed', '5'=>'ContractSigned', '8'=>'Refused', '9'=>'Canceled')), From 37932c3fdc22e13c14ea497be09286897316edab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 21:12:09 +0200 Subject: [PATCH 089/105] Debug v16. Fix non escaping for commobject field text --- htdocs/core/class/commonobject.class.php | 4 ++-- .../recruitment/class/recruitmentcandidature.class.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cc623aae344..567c51f08c9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7643,12 +7643,12 @@ abstract class CommonObject } else { $value = ''; } - } elseif (preg_match('/^(text|html)/', $type)) { - $value = dol_htmlentitiesbr($value); } elseif ($type == 'password') { $value = preg_replace('/./i', '*', $value); } elseif ($type == 'array') { $value = implode('
', $value); + } else { // text|html|varchar + $value = dol_htmlentitiesbr($value); } //print $type.'-'.$size.'-'.$value; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index b0a8e9e52a0..4a4197228b1 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -114,12 +114,10 @@ class RecruitmentCandidature extends CommonObject 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth125 tdoverflowmax200'), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), - 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>1,), - 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), - 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,), - 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,), + 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), + 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'), 'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax200'), 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), @@ -127,7 +125,9 @@ class RecruitmentCandidature extends CommonObject //'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1), 'remuneration_requested' => array('type'=>'integer', 'label'=>'RequestedRemuneration', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,), 'remuneration_proposed' => array('type'=>'integer', 'label'=>'ProposedRemuneration', 'enabled'=>'1', 'position'=>81, 'notnull'=>0, 'visible'=>-1,), - 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>500, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'), + 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>1, 'csslist'=>'nowraponall'), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'default'=>0, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Received', '3'=>'ContractProposed', '5'=>'ContractSigned', '8'=>'Refused', '9'=>'Canceled')), From 706706d9ed2f00faf1ad11dce6ec08f597ddbfba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 21:15:11 +0200 Subject: [PATCH 090/105] Fix php 8 --- htdocs/emailcollector/class/emailcollector.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 646c89226fe..ecd32d2cefc 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -194,6 +194,7 @@ class EmailCollector extends CommonObject public $host; + public $port; public $hostcharset; public $login; public $password; From 3fc0478293371876d9db4c95dbdaa811fa90d529 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 22:39:18 +0200 Subject: [PATCH 091/105] Debug v16 --- htdocs/langs/en_US/main.lang | 4 +- .../recruitmentcandidature_card.php | 17 +++++++++ htdocs/ticket/card.php | 38 +++++++++++++------ htdocs/ticket/class/ticket.class.php | 10 ++--- htdocs/ticket/contact.php | 11 ++++-- htdocs/ticket/document.php | 13 ++++--- htdocs/ticket/list.php | 4 +- htdocs/ticket/messaging.php | 11 ++++-- 8 files changed, 75 insertions(+), 33 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 4e6e274b25b..2c532f339c3 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1185,4 +1185,6 @@ CommercialAffected=Sales representative affected YourMessage=Your message YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible. UrlToCheck=Url to check -Automation=Automation \ No newline at end of file +Automation=Automation +CreatedByEmailCollector=Created by Email collector +CreatedByPublicPortal=Created from Public portal diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 3d11afc5900..721ed4c4a2a 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -477,6 +477,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } }*/ + // Author + if (!empty($object->email_msgid)) { + $morehtmlref .= $langs->trans("CreatedBy").' : '; + + if ($object->fk_user_creat > 0) { + $fuser = new User($db); + $fuser->fetch($object->fk_user_creat); + $morehtmlref .= $fuser->getNomUrl(-1); + } + if (!empty($object->email_msgid)) { + $morehtmlref .= ' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } + } /* elseif (!empty($object->origin_email)) { + $morehtmlref .= $langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; + } */ $morehtmlref .= '
'; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 9638e763dba..cb7e71f8356 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -925,15 +925,17 @@ if ($action == 'create' || $action == 'presend') { if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); - $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty @@ -1019,6 +1021,23 @@ if ($action == 'create' || $action == 'presend') { print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).''; print ''; + // Origin + /* + if ($object->email_msgid) { + $texttoshow = $langs->trans("CreatedByEmailCollector"); + } elseif ($object->origin_email) { + $texttoshow = $langs->trans("FromPublicEmail"); + } + if ($texttoshow) { + print ''; + print $langs->trans("Origin"); + print ''; + print ''; + print $texttoshow; + print ''; + } + */ + // Read date print ''.$langs->trans("TicketReadOn").''; if (!empty($object->date_read)) { @@ -1118,6 +1137,7 @@ if ($action == 'create' || $action == 'presend') { // Fin colonne gauche et début colonne droite print '
'; + print ''; print ''; print ''; @@ -1127,13 +1147,10 @@ if ($action == 'create' || $action == 'presend') { // Categories if (isModEnabled('categorie')) { - print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - - print ''; - + print '
'; print ''; print '
'; - print ''; } elseif ($key == 'fk_user_assign' || $key == 'fk_user_create') { print ''; } elseif ($key == 'fk_statut') { $arrayofstatus = array(); @@ -1005,7 +1005,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } elseif ($key == 'subject') { $s = $obj->subject; print ''; - print $s; + print dol_escape_htmltag($s); print ''; } elseif ($key == 'type_code') { $s = $langs->getLabelFromKey($db, 'TicketTypeShort'.$object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code); diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 4b887691f01..df829a010ec 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -157,14 +157,17 @@ $morehtmlref .= $object->subject; if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); -} -if (!empty($object->origin_email)) { +} elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; +} elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty From e17c00b4d82b3232bbb95273ed000e8892fa234f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 22:39:18 +0200 Subject: [PATCH 092/105] Debug v16 --- htdocs/langs/en_US/main.lang | 4 +- .../recruitmentcandidature_card.php | 17 +++++++++ htdocs/ticket/card.php | 38 +++++++++++++------ htdocs/ticket/class/ticket.class.php | 10 ++--- htdocs/ticket/contact.php | 11 ++++-- htdocs/ticket/document.php | 13 ++++--- htdocs/ticket/list.php | 4 +- htdocs/ticket/messaging.php | 11 ++++-- 8 files changed, 75 insertions(+), 33 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 649dd3fa31f..c44bea6a078 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1184,4 +1184,6 @@ CommercialAffected=Sales representative affected YourMessage=Your message YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible. UrlToCheck=Url to check -Automation=Automation \ No newline at end of file +Automation=Automation +CreatedByEmailCollector=Created by Email collector +CreatedByPublicPortal=Created from Public portal diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 0da5badd7bc..0d2cc848aaa 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -477,6 +477,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } }*/ + // Author + if (!empty($object->email_msgid)) { + $morehtmlref .= $langs->trans("CreatedBy").' : '; + + if ($object->fk_user_creat > 0) { + $fuser = new User($db); + $fuser->fetch($object->fk_user_creat); + $morehtmlref .= $fuser->getNomUrl(-1); + } + if (!empty($object->email_msgid)) { + $morehtmlref .= ' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } + } /* elseif (!empty($object->origin_email)) { + $morehtmlref .= $langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; + } */ $morehtmlref .= ''; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 9638e763dba..cb7e71f8356 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -925,15 +925,17 @@ if ($action == 'create' || $action == 'presend') { if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); - $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty @@ -1019,6 +1021,23 @@ if ($action == 'create' || $action == 'presend') { print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).''; print '
'; + // Origin + /* + if ($object->email_msgid) { + $texttoshow = $langs->trans("CreatedByEmailCollector"); + } elseif ($object->origin_email) { + $texttoshow = $langs->trans("FromPublicEmail"); + } + if ($texttoshow) { + print ''; + print ''; + } + */ + // Read date print '
'; + print ''; @@ -1170,11 +1187,8 @@ if ($action == 'create' || $action == 'presend') { } print '
'; print $langs->trans("Categories"); if ($action != 'categories' && !$user->socid) { print ''.img_edit($langs->trans('Modify')).'
'; - - print ''; } - // View Original message $actionobject->viewTicketOriginalMessage($user, $action, $object); diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5b49a5d095e..82c2142d786 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -266,20 +266,20 @@ class Ticket extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'', 'showoncombobox'=>1), 'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"), - 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax125 maxwidth150onsmartphone'), - 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'), + 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'csslist'=>'tdoverflowmax100 maxwidth150onsmartphone'), + 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'csslist'=>'tdoverflowmax150'), 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200 tdoverflowmax200', 'autofocusoncreate'=>1), - 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth125 tdoverflowmax50'), + 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'csslist'=>'maxwidth125 tdoverflowmax50'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketCategory', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100 tdoverflowmax200'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"), //'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), // what is this ? - 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), + 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1, 'csslist'=>'nowraponall'), 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), 'date_last_msg_sent' => array('type'=>'datetime', 'label'=>'TicketLastMessageDate', 'visible'=>0, 'enabled'=>1, 'position'=>502, 'notnull'=>-1), - 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax125'), + 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'csslist'=>'tdoverflowmax100 maxwidth150onsmartphone'), 'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 5b1b73799f2..d32ab88eb1c 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -196,14 +196,17 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) { if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php index bf2b1c51fc4..234c5e92918 100644 --- a/htdocs/ticket/document.php +++ b/htdocs/ticket/document.php @@ -129,16 +129,19 @@ if ($object->id) { $morehtmlref .= $object->subject; // Author if ($object->fk_user_create > 0) { - $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index f09388fa0ac..693a40fbb5f 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -824,7 +824,7 @@ foreach ($object->fields as $key => $val) { print '
'; - print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth125')); + print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth100')); print '
'; + print $langs->trans("Origin"); + print ''; + print $texttoshow; + print '
'.$langs->trans("TicketReadOn").''; if (!empty($object->date_read)) { @@ -1118,6 +1137,7 @@ if ($action == 'create' || $action == 'presend') { // Fin colonne gauche et début colonne droite print '
'; + print ''; print ''; print ''; @@ -1127,13 +1147,10 @@ if ($action == 'create' || $action == 'presend') { // Categories if (isModEnabled('categorie')) { - print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - - print ''; - + print '
'; print ''; print '
'; - print ''; } elseif ($key == 'fk_user_assign' || $key == 'fk_user_create') { print ''; } elseif ($key == 'fk_statut') { $arrayofstatus = array(); @@ -1005,7 +1005,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } elseif ($key == 'subject') { $s = $obj->subject; print ''; - print $s; + print dol_escape_htmltag($s); print ''; } elseif ($key == 'type_code') { $s = $langs->getLabelFromKey($db, 'TicketTypeShort'.$object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code); diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 4b887691f01..df829a010ec 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -157,14 +157,17 @@ $morehtmlref .= $object->subject; if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); -} -if (!empty($object->origin_email)) { +} elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; +} elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty From ffecf42808e1da3d9220b81d740e552e99bfd3a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 23:09:04 +0200 Subject: [PATCH 093/105] Autofill name of new bank account with thirdparty name --- htdocs/societe/paymentmodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 0f41ce6a56b..9e4c0e91137 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1722,10 +1722,10 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print '
'; + print ''; @@ -1170,11 +1187,8 @@ if ($action == 'create' || $action == 'presend') { } print '
'; print $langs->trans("Categories"); if ($action != 'categories' && !$user->socid) { print ''.img_edit($langs->trans('Modify')).'
'; - - print ''; } - // View Original message $actionobject->viewTicketOriginalMessage($user, $action, $object); diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 7f9715d0580..70c2eb05ea9 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -259,20 +259,20 @@ class Ticket extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'', 'showoncombobox'=>1), 'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"), - 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax125 maxwidth150onsmartphone'), - 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'), + 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'csslist'=>'tdoverflowmax100 maxwidth150onsmartphone'), + 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'csslist'=>'tdoverflowmax150'), 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200 tdoverflowmax200', 'autofocusoncreate'=>1), - 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth125 tdoverflowmax50'), + 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'csslist'=>'maxwidth125 tdoverflowmax50'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketCategory', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100 tdoverflowmax200'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"), //'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), // what is this ? - 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), + 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1, 'csslist'=>'nowraponall'), 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), 'date_last_msg_sent' => array('type'=>'datetime', 'label'=>'TicketLastMessageDate', 'visible'=>0, 'enabled'=>1, 'position'=>502, 'notnull'=>-1), - 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax125'), + 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'csslist'=>'tdoverflowmax100 maxwidth150onsmartphone'), 'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 5b1b73799f2..d32ab88eb1c 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -196,14 +196,17 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) { if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php index bf2b1c51fc4..234c5e92918 100644 --- a/htdocs/ticket/document.php +++ b/htdocs/ticket/document.php @@ -129,16 +129,19 @@ if ($object->id) { $morehtmlref .= $object->subject; // Author if ($object->fk_user_create > 0) { - $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $langs->load("users"); $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } - if (!empty($object->origin_email)) { + } elseif (!empty($object->email_msgid)) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; - $morehtmlref .= $object->origin_email.' ('.$langs->trans("TicketEmailOriginIssuer").')'; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $langs->trans("EmailMsgID").': '.$object->email_msgid).')'; + } elseif (!empty($object->origin_email)) { + $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' ('.$langs->trans("CreatedByPublicPortal").')'; } // Thirdparty diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index f09388fa0ac..693a40fbb5f 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -824,7 +824,7 @@ foreach ($object->fields as $key => $val) { print '
'; - print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth125')); + print $form->select_dolusers((empty($search[$key]) ? '' : $search[$key]), 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth100')); print '
'; print ''; - print ''; + print ''; print ''; - print ''; + print ''; // Show fields of bank account foreach ($companybankaccount->getFieldsToShow(1) as $val) { @@ -1818,7 +1818,7 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print dol_get_fiche_end(); - dol_set_focus('#label'); + dol_set_focus('#bank'); print $form->buttonsSaveCancel("Add"); } From 124c96bcea3fb17b2760d18f924b8cb2d1f73019 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2022 23:23:18 +0200 Subject: [PATCH 094/105] Fix error management --- htdocs/societe/class/companybankaccount.class.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 717398c92d4..4ddbd1c613f 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -127,7 +127,7 @@ class CompanyBankAccount extends Account // End call triggers if (!$error) { - return 1; + return $this->id; } else { return 0; } @@ -136,7 +136,7 @@ class CompanyBankAccount extends Account } } } else { - print $this->db->error(); + $this->error = $this->db->lasterror(); return 0; } } @@ -150,7 +150,7 @@ class CompanyBankAccount extends Account */ public function update(User $user = null, $notrigger = 0) { - global $conf; + global $conf, $langs; $error = 0; @@ -207,7 +207,11 @@ class CompanyBankAccount extends Account return 1; } } else { - $this->error = $this->db->lasterror(); + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $this->error = $langs->trans('ErrorDuplicateField'); + } else { + $this->error = $this->db->lasterror(); + } return -1; } } From c7652af3bc9dc0ee6017607f2bb45b792bc20d13 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 3 Aug 2022 14:24:27 +0200 Subject: [PATCH 095/105] New : Add DoS security on GETPOST with img --- htdocs/admin/security_other.php | 15 +++++++++++++-- htdocs/core/lib/functions.lib.php | 5 +++++ htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 1 + htdocs/langs/en_US/admin.lang | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 79190725c16..090e2254541 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -61,14 +61,17 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { dol_print_error($db); } } elseif ($action == 'updateform') { - $res1 = 1; $res2 = 1; + $res1 = 1; $res2 = 1; $res3 = 1; if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) { $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); } if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) { $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); } - if ($res1 && $res2) { + if (GETPOSTISSET('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT')) { + $res3 = dolibarr_set_const($db, "MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", GETPOST("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 'alphanohtml'), 'int', 0, '', $conf->entity); + } + if ($res1 && $res2 && $res3) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } } @@ -174,6 +177,14 @@ print ''; print ''; +print ''; +print ''; +print ''; +print ''; + /* if (empty($conf->global->MAIN_APPLICATION_TITLE)) { $conf->global->MAIN_APPLICATION_TITLE = ""; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 90288645003..cf4b19d3aa6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -954,6 +954,11 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options // Restore entity ' into ' (restricthtml is for html content so we can use html entity) $out = preg_replace('/'/i', "'", $out); + + preg_match_all('/( (getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") ? getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") : 1000)) { + $out = ''; + } } while ($oldstringtoclean != $out); break; case 'custom': diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index 4ab1b1e1fa3..597681c4ad5 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -73,3 +73,4 @@ ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur ALTER TABLE llx_recruitment_recruitmentcandidature ADD email_date datetime after email_msgid; ALTER TABLE llx_ticket ADD email_date datetime after email_msgid; +INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT', 1, 1000, 'int', 0); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 7148e19fb48..6ca93dc7788 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2287,4 +2287,6 @@ DoesNotWorkWithAllThemes=Will not work with all themes NoName=No name ShowAdvancedOptions= Show advanced options HideAdvancedoptions= Hide advanced options +Images=Images +MaxNumberOfImagesInGetPost=Max number of images allowed in GETPOST check CIDLookupURL=The module brings an URL that can be used by an external tool to get the name of a thirdparty or contact from its phone number. URL to use is: From 09e47a5a8a23aa96ce26a61894d221494a5f25d9 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 3 Aug 2022 14:27:58 +0200 Subject: [PATCH 096/105] Add DoS security on sanitizeVal() with img --- htdocs/core/lib/functions.lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cf4b19d3aa6..5f9e1b7f4cc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -923,6 +923,10 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options // Remove the trick added to solve pb with text without parent tag $out = preg_replace('/^
/', '', $out); $out = preg_replace('/<\/div>$/', '', $out); + preg_match_all('/( (getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") ? getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") : 1000)) { + $out = ''; + } } catch (Exception $e) { //print $e->getMessage(); return 'InvalidHTMLString'; From 02c09704513f847e084d3f169b71d4e339ee6ccb Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 3 Aug 2022 14:35:41 +0200 Subject: [PATCH 097/105] remove error --- htdocs/core/lib/functions.lib.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5f9e1b7f4cc..cf4b19d3aa6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -923,10 +923,6 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options // Remove the trick added to solve pb with text without parent tag $out = preg_replace('/^
/', '', $out); $out = preg_replace('/<\/div>$/', '', $out); - preg_match_all('/( (getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") ? getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") : 1000)) { - $out = ''; - } } catch (Exception $e) { //print $e->getMessage(); return 'InvalidHTMLString'; From e0b196f3c2a0748e85afbfaff32650c4515c7dbb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2022 14:57:47 +0200 Subject: [PATCH 098/105] Fix migration --- htdocs/install/mysql/migration/15.0.0-16.0.0.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index c94b1cfcdaa..6d9aebf934f 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -141,13 +141,13 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL; ALTER TABLE llx_element_contact DROP FOREIGN KEY fk_element_contact_fk_c_type_contact; ALTER TABLE llx_societe_contacts DROP FOREIGN KEY fk_societe_contacts_fk_c_type_contact; ---VMYSQL4.3 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY(rowid); ---VMYSQL4.3 ALTER TABLE llx_c_type_contact CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- VMYSQL4.3 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY(rowid); +-- VMYSQL4.3 ALTER TABLE llx_c_type_contact CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; ---VPGSQL8.2 CREATE SEQUENCE llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid; ---VPGSQL8.2 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY (rowid); ---VPGSQL8.2 ALTER TABLE llx_c_type_contact ALTER COLUMN rowid SET DEFAULT nextval('llx_c_type_contact_rowid_seq'); ---VPGSQL8.2 SELECT setval('llx_c_type_contact_rowid_seq', MAX(rowid)) FROM llx_c_type_contact; +-- VPGSQL8.2 CREATE SEQUENCE llx_c_type_contact_rowid_seq OWNED BY llx_c_type_contact.rowid; +-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ADD PRIMARY KEY (rowid); +-- VPGSQL8.2 ALTER TABLE llx_c_type_contact ALTER COLUMN rowid SET DEFAULT nextval('llx_c_type_contact_rowid_seq'); +-- VPGSQL8.2 SELECT setval('llx_c_type_contact_rowid_seq', MAX(rowid)) FROM llx_c_type_contact; insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); insert into llx_c_type_contact(element, source, code, libelle, active ) values ('conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); From 985d9b3624a8e0b4b9b97bda0558b08a1b88eaa2 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 3 Aug 2022 15:59:53 +0200 Subject: [PATCH 099/105] Function --- htdocs/core/lib/ftp.lib.php | 11 +++++---- htdocs/ftp/index.php | 43 +++++++++++++++++++++++++++++++++++ htdocs/langs/en_US/other.lang | 4 +++- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/ftp.lib.php b/htdocs/core/lib/ftp.lib.php index 928a7e4a934..3d680de08a0 100644 --- a/htdocs/core/lib/ftp.lib.php +++ b/htdocs/core/lib/ftp.lib.php @@ -222,11 +222,12 @@ function dol_ftp_get($connect_id, $file, $newsection) * Upload a FTP file * * @param resource $connect_id Connection handler - * @param string $file File - * @param string $newsection $newsection + * @param string $file File name + * @param string $localfile The path to the local file + * @param string $newsection $newsection * @return result */ -function dol_ftp_put($connect_id, $file, $newsection) +function dol_ftp_put($connect_id, $file, $localfile, $newsection) { global $conf; @@ -241,9 +242,9 @@ function dol_ftp_put($connect_id, $file, $newsection) $newremotefileiso = utf8_decode($remotefile); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { - return fopen('ssh2.sftp://'.intval($connect_id).$newremotefileiso, 'r'); + return ssh2_scp_send($connect_id, $localfile, $newremotefileiso, 0644); } else { - return ftp_put($connect_id, $localfile, $newremotefileiso, FTP_BINARY); + return ftp_put($connect_id, $newremotefileiso, $localfile, FTP_BINARY); } } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index cf647929ac8..ccbc7d6a0df 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -131,6 +131,39 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) { } } +if ($action == 'uploadfile') { + // set up a connection or die + if (!$conn_id) { + $newsectioniso = utf8_decode($section); + $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive); + $conn_id = $resultarray['conn_id']; + $ok = $resultarray['ok']; + $mesg = $resultarray['mesg']; + } + if ($conn_id && $ok && !$mesg) { + // var_dump($_FILES['userfile']['name']); + $nbfile = count($_FILES['userfile']['name']); + $i = 0; + for (; $i < $nbfile; $i++) { + var_dump($i); + $newsection = $newsectioniso; + $fileupload = $_FILES['userfile']['name'][$i]; + $fileuploadpath = $_FILES['userfile']['tmp_name'][$i]; + $result = dol_ftp_put($conn_id, $fileupload, $fileuploadpath, $newsection); + + if ($result) { + setEventMessages($langs->trans("FileWasUpload", $fileupload), null, 'mesgs'); + } else { + dol_syslog("ftp/index.php ftp_delete", LOG_ERR); + setEventMessages($langs->trans("FTPFailedToUploadFile", $fileupload), null, 'errors'); + } + } + $action = ''; + } else { + dol_print_error('', $mesg); + } +} + // Action ajout d'un rep if ($action == 'add' && $user->rights->ftp->setup) { $ecmdir->ref = GETPOST("ref"); @@ -589,6 +622,16 @@ if (!function_exists('ftp_connect')) { print '
'; print ""; + + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + print ''; + print ''; + print ''; } else { $foundsetup = false; $MAXFTP = 20; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 0918bf54ac7..daa52aac9fe 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -325,4 +325,6 @@ FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and FTPPassiveMode=Passive mode ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... FailedToGetFile=Failed to get files %s -ErrorFTPNodisconnect=Error to disconnect FTP/SFTP server \ No newline at end of file +ErrorFTPNodisconnect=Error to disconnect FTP/SFTP server +FileWasUpload=File %s was upload +FTPFailedToUploadFile=Failed to upload file %s. From 259fe11634dccff7b90466cb0422affc0939cb9e Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 3 Aug 2022 16:18:43 +0200 Subject: [PATCH 100/105] Add title --- htdocs/ftp/index.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index ccbc7d6a0df..4df7e1512a6 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -622,16 +622,18 @@ if (!function_exists('ftp_connect')) { print ''; print ""; - - print '
'; - print ''; - print ''; - print ''; - print ''; - print '
'; - print ''; - print ''; - print ''; + if ($user->hasRight('ftp', 'write')) { + print load_fiche_titre($langs->trans("AttachANewFile"), null, null); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } } else { $foundsetup = false; $MAXFTP = 20; From 99141928a3cbf0e95ca15e6099584fa71eac923d Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 3 Aug 2022 17:00:39 +0200 Subject: [PATCH 101/105] better fix --- 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 cf4b19d3aa6..90698c95f80 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -955,8 +955,8 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options // Restore entity ' into ' (restricthtml is for html content so we can use html entity) $out = preg_replace('/'/i', "'", $out); - preg_match_all('/( (getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") ? getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT") : 1000)) { + preg_match_all('/( getDolGlobalInt("MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT", 1000)) { $out = ''; } } while ($oldstringtoclean != $out); From e21c48b7bd37ef81697fbb127201a5d864e61f01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2022 17:04:36 +0200 Subject: [PATCH 102/105] Trans --- htdocs/core/modules/modAdherent.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 215e7dd3c64..ec0546e9af1 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -250,7 +250,7 @@ class modAdherent extends DolibarrModules $r++; $this->rights[$r][0] = 78; - $this->rights[$r][1] = 'Read subscriptions'; + $this->rights[$r][1] = 'Read membership fees'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'cotisation'; @@ -258,7 +258,7 @@ class modAdherent extends DolibarrModules $r++; $this->rights[$r][0] = 79; - $this->rights[$r][1] = 'Create/modify/remove subscriptions'; + $this->rights[$r][1] = 'Create/modify/remove membership fees'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'cotisation'; From 62f7b6791df25ed2655909aadd355cbdb75d3da8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2022 18:18:17 +0200 Subject: [PATCH 103/105] CSS --- htdocs/admin/tools/dolibarr_export.php | 10 ++++++---- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 1a68b17c3e0..9d91bb9ef50 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -168,9 +168,10 @@ print ''; print ''; -print '
'.$langs->trans("LabelRIB").'
'.$langs->trans("Bank").'
'.$langs->trans("MaxNumberOfImagesInGetPost").''; +print ''; +print ' '.strtolower($langs->trans("Images")); +print '
'; print $langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.'
'; print '
'; +print '
'; print ''; + print ''; print ''; print ''; + print ''; -print ''; print ''; -print '
'; @@ -196,10 +197,11 @@ print ''; print '
'; +print ''; print '
'; -print ' '.$langs->trans("ShowAdvancedOptions").''; +print ' '.$langs->trans("ShowAdvancedOptions").'...'; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 3886651e8d5..078d485a5c9 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -543,6 +543,7 @@ fieldset { border: 1px solid #AAAAAA !important; padding-inline-start: 2em; padding-inline-end: 2em; + min-inline-size: auto; } .legendforfieldsetstep { padding-bottom: 10px; } input#onlinepaymenturl, input#directdownloadlink { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6e423228df1..ca485fb0d5f 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -725,6 +725,7 @@ fieldset { border: 1px solid #AAAAAA !important; padding-inline-start: 2em; padding-inline-end: 2em; + min-inline-size: auto; } .legendforfieldsetstep { padding-bottom: 10px; } input#onlinepaymenturl, input#directdownloadlink { From 064c95baef12a3ac5b4b353b503c84d2b467b738 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2022 18:18:17 +0200 Subject: [PATCH 104/105] CSS --- htdocs/admin/tools/dolibarr_export.php | 12 +++++++----- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 1a68b17c3e0..588cc5ed866 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -168,9 +168,10 @@ print '
'; print $langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.'
'; print '
'; +print '
'; print ''; + print ''; print ''; print ''; + print ''; -print '
'; @@ -196,10 +197,11 @@ print ''; print '
'; -print '
'; -print ' '.$langs->trans("ShowAdvancedOptions").''; +print '
'; + +print ''; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 3886651e8d5..078d485a5c9 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -543,6 +543,7 @@ fieldset { border: 1px solid #AAAAAA !important; padding-inline-start: 2em; padding-inline-end: 2em; + min-inline-size: auto; } .legendforfieldsetstep { padding-bottom: 10px; } input#onlinepaymenturl, input#directdownloadlink { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6e423228df1..ca485fb0d5f 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -725,6 +725,7 @@ fieldset { border: 1px solid #AAAAAA !important; padding-inline-start: 2em; padding-inline-end: 2em; + min-inline-size: auto; } .legendforfieldsetstep { padding-bottom: 10px; } input#onlinepaymenturl, input#directdownloadlink { From a509ec2c227cae48c8277e2455767107f87eb02e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2022 18:31:55 +0200 Subject: [PATCH 105/105] Removed bad fields --- htdocs/install/mysql/migration/16.0.0-17.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index 597681c4ad5..e72fc1b8dcd 100644 --- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -47,6 +47,9 @@ ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0; ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32) NOT NULL; +ALTER TABLE llx_user DROP COLUMN idpers1; +ALTER TABLE llx_user DROP COLUMN idpers2; +ALTER TABLE llx_user DROP COLUMN idpers3; -- v17