diff --git a/ChangeLog b/ChangeLog index bc38c9e6847..fcf5af4aef6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,7 +27,9 @@ Following changes may create regressions for some external modules, but were nec 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 QR-Code on PDFs 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); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index fa5d6deae97..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)); @@ -2375,9 +2373,15 @@ 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) + $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/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 ''.$langs->trans("MaxNumberOfImagesInGetPost").''; +print ''; +print ''; +print ' '.strtolower($langs->trans("Images")); +print ''; +print ''; + /* if (empty($conf->global->MAIN_APPLICATION_TITLE)) { $conf->global->MAIN_APPLICATION_TITLE = ""; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index a23f3127ca8..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($conf->global->MAIN_DEFAULT_WAREHOUSE, '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"; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index fae91d3ecb4..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 ''; -print ''; +print ''; +print ''; + print ''; } // Alias if (!empty($arrayfields['s.name_alias']['checked'])) { 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) : '')); } 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( diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index de2a44070fc..e4a868e885a 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 @@ -548,10 +548,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) { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index aa85c0aa5c2..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; @@ -8451,8 +8451,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 @@ -8806,7 +8806,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; @@ -9065,6 +9065,8 @@ abstract class CommonObject return 'NULL'; } elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) { return price2num("$value"); + } elseif (preg_match('/int$/i', $fieldsentry['type'])) { + return (int) $value; } elseif ($fieldsentry['type'] == 'boolean') { if ($value) { return 'true'; 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/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 2dd729df91d..3ff36b356da 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -1093,6 +1093,7 @@ class FormSetupItem $out.= $this->langs->trans("NorProspectNorCustomer"); } } elseif ($this->type == 'product') { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); $resprod = $product->fetch($this->fieldValue); if ($resprod > 0) { 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/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/core/lib/ftp.lib.php b/htdocs/core/lib/ftp.lib.php index 42f5806fba5..3d680de08a0 100644 --- a/htdocs/core/lib/ftp.lib.php +++ b/htdocs/core/lib/ftp.lib.php @@ -218,6 +218,36 @@ function dol_ftp_get($connect_id, $file, $newsection) } } +/** + * Upload a FTP file + * + * @param resource $connect_id Connection handler + * @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, $localfile, $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 ssh2_scp_send($connect_id, $localfile, $newremotefileiso, 0644); + } else { + return ftp_put($connect_id, $newremotefileiso, $localfile, FTP_BINARY); + } +} + /** * Remove FTP directory * diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c3cd8922955..90698c95f80 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 @@ -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", 1000)) { + $out = ''; + } } while ($oldstringtoclean != $out); break; case 'custom': @@ -7388,6 +7393,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)'; @@ -10423,7 +10431,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/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index d983f0298ce..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] = $langs->trans("Terminal")." ".$i; + $head[$h][1] = getDolGlobalString('TAKEPOS_TERMINAL_NAME_'.$i, $langs->trans("TerminalName", $i)); $head[$h][2] = 'terminal'.$i; $h++; } 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/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/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; } 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 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)) { 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; } 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; } 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; } 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; } 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; } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 46ac4ffde37..a67fb620964 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -115,6 +115,32 @@ class pdf_sponge extends ModelePDFFactures */ public $marge_basse; + + /** + * @var int heightforinfotot + */ + public $heightforinfotot; + + /** + * @var int heightforfreetext + */ + public $heightforfreetext; + + /** + * @var int heightforfooter + */ + public $heightforfooter; + + /** + * @var int tab_top + */ + public $tab_top; + + /** + * @var int tab_top_newpage + */ + public $tab_top_newpage; + /** * Issuer * @var Societe Object that emits @@ -345,9 +371,9 @@ class pdf_sponge extends ModelePDFFactures $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $pdf->SetAutoPageBreak(1, 0); - $heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part - $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page - $heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) + $this->heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part + $this->heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page + $this->heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); @@ -429,9 +455,9 @@ class pdf_sponge extends ModelePDFFactures // $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher - // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) + $this->tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) + $this->tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // You can add more thing under header here, if you increase $extra_under_address_shift too. $extra_under_address_shift = 0; @@ -452,7 +478,7 @@ class pdf_sponge extends ModelePDFFactures 'module_width' => 1, // width of a single module in points 'module_height' => 1 // height of a single module in points ); - $pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $tab_top - 5, 25, 25, $styleQr, 'N'); + $pdf->write2DBarcode($qrcodestring, 'QRCODE,M', $this->marge_gauche, $this->tab_top - 5, 25, 25, $styleQr, 'N'); $extra_under_address_shift += 25; } @@ -469,32 +495,32 @@ class pdf_sponge extends ModelePDFFactures $extra_under_address_shift += $hookmanager->resArray['extra_under_header_shift']; } - $tab_top += $extra_under_address_shift; - $tab_top_newpage += 0; + $this->tab_top += $extra_under_address_shift; + $this->tab_top_newpage += 0; // Define heigth of table for lines (for first page) - $tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext; + $tab_height = $this->page_hauteur - $this->tab_top - $this->heightforfooter - $this->heightforfreetext; - $nexY = $tab_top - 1; + $nexY = $this->tab_top - 1; // Incoterm $height_incoterms = 0; if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { - $tab_top -= 2; + $this->tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1); $nexY = max($pdf->GetY(), $nexY); - $height_incoterms = $nexY - $tab_top; + $height_incoterms = $nexY - $this->tab_top; // Rect takes a length in 3rd parameter $pdf->SetDrawColor(192, 192, 192); - $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1); - $tab_top = $nexY + 6; + $this->tab_top = $nexY + 6; $height_incoterms += 4; } } @@ -521,7 +547,7 @@ class pdf_sponge extends ModelePDFFactures $pagenb = $pdf->getPage(); if ($notetoshow) { - $tab_top -= 2; + $this->tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; $pageposbeforenote = $pagenb; @@ -534,7 +560,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->startTransaction(); $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); // Description $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -553,29 +579,29 @@ class pdf_sponge extends ModelePDFFactures $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } // $this->_pagefoot($pdf,$object,$outputlangs,1); - $pdf->setTopMargin($tab_top_newpage); + $pdf->setTopMargin($this->tab_top_newpage); // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); } // back to start $pdf->setPage($pageposbeforenote); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $this->tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; $pdf->setPage($pageposafternote); - $pdf->setTopMargin($tab_top_newpage); + $pdf->setTopMargin($this->tab_top_newpage); // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); - //$posyafter = $tab_top_newpage; + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext); + //$posyafter = $this->tab_top_newpage; } @@ -588,11 +614,11 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetDrawColor(128, 128, 128); // Draw note frame if ($i > $pageposbeforenote) { - $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + $height_note = $this->page_hauteur - ($this->tab_top_newpage + $this->heightforfooter); + $pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1); } else { - $height_note = $this->page_hauteur - ($tab_top + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + $height_note = $this->page_hauteur - ($this->tab_top + $this->heightforfooter); + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1); } // Add footer @@ -610,17 +636,17 @@ class pdf_sponge extends ModelePDFFactures if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } - $height_note = $posyafter - $tab_top_newpage; - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + $height_note = $posyafter - $this->tab_top_newpage; + $pdf->Rect($this->marge_gauche, $this->tab_top_newpage - 1, $tab_width, $height_note + 1); } else { // No pagebreak $pdf->commitTransaction(); $posyafter = $pdf->GetY(); - $height_note = $posyafter - $tab_top; - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + $height_note = $posyafter - $this->tab_top; + $pdf->Rect($this->marge_gauche, $this->tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + 20))) { // not enough space, need to add page $pdf->AddPage('', '', true); $pagenb++; @@ -633,12 +659,12 @@ class pdf_sponge extends ModelePDFFactures $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); } - $posyafter = $tab_top_newpage; + $posyafter = $this->tab_top_newpage; } } $tab_height = $tab_height - $height_note; - $tab_top = $posyafter + 6; + $this->tab_top = $posyafter + 6; } else { $height_note = 0; } @@ -648,10 +674,10 @@ class pdf_sponge extends ModelePDFFactures // Table simulation to know the height of the title line (this set this->tableTitleHeight) $pdf->startTransaction(); - $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); + $this->pdfTabTitles($pdf, $this->tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); - $nexY = $tab_top + $this->tabTitleHeight; + $nexY = $this->tab_top + $this->tabTitleHeight; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -667,8 +693,8 @@ class pdf_sponge extends ModelePDFFactures $imglinesize = pdf_getSizeForImage($realpatharray[$i]); } - $pdf->setTopMargin($tab_top_newpage); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. + $pdf->setTopMargin($this->tab_top_newpage); + $pdf->setPageOrientation('', 1, $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore = $pdf->getPage(); $showpricebeforepagebreak = 1; @@ -677,14 +703,14 @@ class pdf_sponge extends ModelePDFFactures if ($this->getColumnStatus('photo')) { // We start with Photo of product line - if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); if (!empty($tplidx)) { $pdf->useTemplate($tplidx); } $pdf->setPage($pageposbefore + 1); - $curY = $tab_top_newpage; + $curY = $this->tab_top_newpage; // Allows data in the first page if description is long enough to break in multiples pages if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { @@ -711,14 +737,14 @@ class pdf_sponge extends ModelePDFFactures if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $this->heightforfooter); // The only function to edit the bottom margin of current page to set it. $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text + //var_dump($posyafter); var_dump(($this->page_hauteur - ($this->heightforfooter+$this->heightforfreetext+$this->heightforinfotot))); exit; + if ($posyafter > ($this->page_hauteur - ($this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot))) { // There is no space left for total+free text if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (!empty($tplidx)) { @@ -752,7 +778,7 @@ class pdf_sponge extends ModelePDFFactures // We suppose that a too long description or photo were moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { $pdf->setPage($pageposafter); - $curY = $tab_top_newpage; + $curY = $this->tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font @@ -923,9 +949,9 @@ class pdf_sponge extends ModelePDFFactures while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); } $this->_pagefoot($pdf, $object, $outputlangs, 1); $pagenb++; @@ -941,9 +967,9 @@ class pdf_sponge extends ModelePDFFactures if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { if ($pagenb == $pageposafter) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); } $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page @@ -960,11 +986,11 @@ class pdf_sponge extends ModelePDFFactures // Show square if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + $this->_tableau($pdf, $this->tab_top, $this->page_hauteur - $this->tab_top - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1; } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + $this->_tableau($pdf, $this->tab_top_newpage, $this->page_hauteur - $this->tab_top_newpage - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $this->heightforinfotot - $this->heightforfreetext - $this->heightforfooter + 1; } // Display infos area @@ -1432,10 +1458,15 @@ class pdf_sponge extends ModelePDFFactures $posy = $pdf->GetY(); foreach ($TPreviousIncoice as &$fac) { - if ($posy > $this->page_hauteur - 4) { + if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) { $this->_pagefoot($pdf, $object, $outputlangs, 1); $pdf->addPage(); - $pdf->setY($this->marge_haute); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); + $pdf->setY($this->tab_top_newpage); + } else { + $pdf->setY($this->marge_haute); + } $posy = $pdf->GetY(); } @@ -1495,9 +1526,15 @@ class pdf_sponge extends ModelePDFFactures $posy += $tab2_hl; - if ($posy > $this->page_hauteur - 4) { + if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) { $pdf->addPage(); - $pdf->setY($this->marge_haute); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis); + $pdf->setY($this->tab_top_newpage); + } else { + $pdf->setY($this->marge_haute); + } + $posy = $pdf->GetY(); } 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; } 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'; diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php index 93318bb952e..a7a6c048a4d 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 @@ -257,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. @@ -367,7 +368,9 @@ class modEventOrganization extends DolibarrModules } } - return $this->_init($sql, $options); + $init = $this->_init($sql, $options); + + return $init; } /** 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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; } 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/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 9a60624e9d2..ecd32d2cefc 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'), @@ -193,6 +194,7 @@ class EmailCollector extends CommonObject public $host; + public $port; public $hostcharset; public $login; public $password; @@ -746,7 +748,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; } @@ -1854,8 +1856,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; @@ -2102,7 +2104,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; @@ -2210,12 +2212,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; @@ -2310,12 +2313,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/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/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/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/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 '
'; + print ''; } 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/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 4df04f30f70..ce3ad5b708e 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1012,7 +1012,7 @@ if ($resql) { } // Thirpdarty if (!empty($arrayfields['s.nom']['checked'])) { - print ''; + print ''; } // Alias if (!empty($arrayfields['s.name_alias']['checked'])) { diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index cf647929ac8..4df7e1512a6 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,18 @@ if (!function_exists('ftp_connect')) { 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; 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/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..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 @@ -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/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql index 78f71563a45..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 @@ -64,5 +67,13 @@ 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'; + 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; + +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/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, 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); 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/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/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/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..76a687af8da 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Kun tilgængelig, hvis du bruger HTTPS-sikre WarningModuleXDisabledSoYouMayMissEventHere=Modul %s er ikke aktiveret. Så du går måske glip af en masse begivenheder her. WarningPaypalPaymentNotCompatibleWithStrict=Værdien 'Strict' gør, at onlinebetalingsfunktionerne ikke fungerer korrekt. Brug 'Lax' i stedet. -<<<<<<< HOVED -======= -<<<<<<< HOVED -<<<<<<< HOVED ->>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Værdien er ikke gyldig RequireAtLeastXString = Kræver mindst %s karakter (er) @@ -347,12 +342,3 @@ BadSetupOfField = Fejl ved dårlig opsætning af feltet BadSetupOfFieldClassNotFoundForValidation = Fejl ved dårlig opsætning af feltet: Klassen blev ikke fundet til validering BadSetupOfFieldFileNotFound = Fejl ved dårlig opsætning af feltet: Filen blev ikke fundet til inkludering BadSetupOfFieldFetchNotCallable = Fejl dårlig opsætning af felt: Hentning kan ikke kaldes på klassen -<<<<<<< HOVED -======= -======= -======= ->>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git ->>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git ->>>>>>> gren '15.0' af git@github.com:Dolibarr/dolibarr.git 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/admin.lang b/htdocs/langs/en_US/admin.lang index d629bbc0fbf..b44bb7add1d 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 @@ -2292,4 +2293,7 @@ MAIN_MAIL_SMTPS_OAUTH_SERVICE=OAUTH2 authentication service DontForgetCreateTokenOauthMod=A token with the right permissions must have been created upstream with the OAUTH module MAIN_MAIL_SMTPS_AUTH_TYPE=Authentification method UsePassword=Use a password -UseOauth=Use a OAUTH token \ No newline at end of file +UseOauth=Use a OAUTH token +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: diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 07b91316771..9cde66460d3 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -59,7 +59,7 @@ BillsCoinsPad=Coins and banknotes Pad DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr TakeposNeedsCategories=TakePOS needs at least one product categorie to work TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work -OrderNotes=Can add some notes to each ordered items +OrderNotes=Can add some notes to each ordered items CashDeskBankAccountFor=Default account to use for payments in NoPaimementModesDefined=No paiment mode defined in TakePOS configuration TicketVatGrouped=Group VAT by rate in tickets|receipts @@ -118,7 +118,7 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines of images to show +NumberOfLinesToShow=Number of lines of images to show DefineTablePlan=Define tables plan GiftReceiptButton=Add a "Gift receipt" button GiftReceipt=Gift receipt @@ -138,8 +138,10 @@ TakeposBarcodeRuleToInsertProduct=Barcode rule to insert product TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.
If empty (default value), application will use the full barcode scanned to find the product.

If defined, syntax must be:
ref:NB+qu:NB+qd:NB+other:NB
where NB is the number of characters to use to extract data from the scanned barcode with:
  • ref : product reference
  • qu : quantity to set when inserting item (units)
  • qd : quantity to set when inserting item (decimals)
  • other : others characters
AlreadyPrinted=Already printed HideCategories=Hide categories -HideStockOnLine=Hide stock on line -ShowOnlyProductInStock=Show the products in stock +HideStockOnLine=Hide stock on line +ShowOnlyProductInStock=Show the products in stock ShowCategoryDescription=Show category description ShowProductReference=Show reference of products -UsePriceHT=Use price excl. taxes and not price incl. taxes \ No newline at end of file +UsePriceHT=Use price excl. taxes and not price incl. taxes +TerminalName=Terminal %s +TerminalNameDesc=Terminal name diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 5326a0f11d1..a280228a46d 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. @@ -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. diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 858e0937788..b4179b04be6 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -60,6 +60,8 @@ ConferenceOrBoothTab = Conference Or Booth AmountPaid = Amount paid DateOfRegistration = Date of registration ConferenceOrBoothAttendee = Conference Or Booth Attendee +ApplicantOrVisitor=Applicant or visitor +Speaker=Speaker # # Template Mail @@ -139,6 +141,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/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/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. diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 1c8597c2b51..6f8a4fa537a 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Disponible solo si usa una conexión segura WarningModuleXDisabledSoYouMayMissEventHere=El módulo %s no se ha habilitado. Así que puede perderse muchos eventos aquí. WarningPaypalPaymentNotCompatibleWithStrict=El valor 'Estricto' hace que las funciones de pago en línea no funcionen correctamente. Utilice 'Lax' en su lugar. -<<<<<<< HEAD -======= -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Valor no válido RequireAtLeastXString = Requiere al menos %s carácter(es) @@ -347,12 +342,3 @@ BadSetupOfField = Error de configuración incorrecta del campo BadSetupOfFieldClassNotFoundForValidation = Error de configuración incorrecta del campo: clase no encontrada para validación BadSetupOfFieldFileNotFound = Error de configuración incorrecta del campo: no se encontró el archivo para su inclusión BadSetupOfFieldFetchNotCallable = Error de configuración incorrecta del campo: la recuperación no se puede llamar en la clase -<<<<<<< HEAD -======= -======= -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git 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..491d37ee6b9 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Dispoñible só se usa conexión segura HTTP WarningModuleXDisabledSoYouMayMissEventHere=Non foi activado o módulo %s . Pode que perda moitos eventos aquí WarningPaypalPaymentNotCompatibleWithStrict=O valor "Estricto" fai que as funcións de pago en liña non funcionen correctamente. Use "Laxo" no seu lugar. -<<<<<<< CABECEIRA -======= -<<<<<<< CABECEIRA -<<<<<<< CABECEIRA ->>>>>>> rama '15.0' de git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Valor non válido RequireAtLeastXString = Require polo menos %s caracter(es) @@ -347,12 +342,3 @@ BadSetupOfField = Erro de configuración do campo BadSetupOfFieldClassNotFoundForValidation = Erro de configuración do campo: Non se atopou a clase para validación BadSetupOfFieldFileNotFound = Erro de configuración do campo: Non se atopou o ficheiro para a súa inclusión  BadSetupOfFieldFetchNotCallable = Erro de configuración do campo: A recuperación non se pode chamar na clase -<<<<<<< CABECEIRA -======= -======= -======= ->>>>>>> rama '15.0' de git@github.com:Dolibarr/dolibarr.git ->>>>>>> rama '15.0' de git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> rama '15.0' de git@github.com:Dolibarr/dolibarr.git ->>>>>>> rama '15.0' de git@github.com:Dolibarr/dolibarr.git 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..95b4a560500 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Csak HTTPS biztonságos kapcsolat használat WarningModuleXDisabledSoYouMayMissEventHere=A %s modul nincs engedélyezve. Így sok eseményről lemaradhat itt. WarningPaypalPaymentNotCompatibleWithStrict=A 'Strict' érték miatt az online fizetési funkciók nem működnek megfelelően. Használja helyette a „Lax” szót. -<<<<<<< FEJ -======= -<<<<<<< FEJ -<<<<<<< FEJ ->>>>>>> git@github.com:Dolibarr/dolibarr.git '15.0' ága # Validate RequireValidValue = Az érték nem érvényes RequireAtLeastXString = Legalább %s karakter szükséges @@ -347,12 +342,3 @@ BadSetupOfField = Hiba a mező rossz beállításában BadSetupOfFieldClassNotFoundForValidation = Hiba a mező rossz beállításában: Az osztály nem található az ellenőrzéshez BadSetupOfFieldFileNotFound = Hiba a mező rossz beállításában: A fájl nem található a felvételhez BadSetupOfFieldFetchNotCallable = Hiba a mező rossz beállításában: A lekérés nem hívható az osztályban -<<<<<<< FEJ -======= -======= -======= ->>>>>>> git@github.com:Dolibarr/dolibarr.git '15.0' ága ->>>>>>> git@github.com:Dolibarr/dolibarr.git '15.0' ága -======= ->>>>>>> git@github.com:Dolibarr/dolibarr.git '15.0' ága ->>>>>>> git@github.com:Dolibarr/dolibarr.git '15.0' ága diff --git a/htdocs/langs/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index bbe8da704b3..04d81d673ae 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Hanya tersedia jika menggunakan koneksi aman WarningModuleXDisabledSoYouMayMissEventHere=Modul %s belum diaktifkan. Jadi Anda mungkin melewatkan banyak acara di sini. WarningPaypalPaymentNotCompatibleWithStrict=Nilai 'Strict' membuat fitur pembayaran online tidak berfungsi dengan baik. Gunakan 'Lax' sebagai gantinya. -<<<<<<< KEPALA -======= -<<<<<<< KEPALA -<<<<<<< KEPALA ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Nilai tidak valid RequireAtLeastXString = Memerlukan setidaknya %s karakter @@ -347,12 +342,3 @@ BadSetupOfField = Salah pengaturan bidang yang buruk BadSetupOfFieldClassNotFoundForValidation = Salah pengaturan bidang yang buruk: Kelas tidak ditemukan untuk validasi BadSetupOfFieldFileNotFound = Salah pengaturan bidang yang buruk: File tidak ditemukan untuk dimasukkan BadSetupOfFieldFetchNotCallable = Salah pengaturan bidang yang buruk: Ambil tidak dapat dipanggil di kelas -<<<<<<< KEPALA -======= -======= -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git 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..4586f206d4a 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=支払条件辞書にないので、変更すること。 @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=HTTPSで保護された接続を使用して WarningModuleXDisabledSoYouMayMissEventHere=モジュール%sが有効になっていない。そのため、ここでは多くのイベントを見逃す可能性がある。 WarningPaypalPaymentNotCompatibleWithStrict=値「Strict」では、現在はオンライン支払機能が正常動作せず。代わりに「Lax」を使用すること。 -<<<<<<< HEAD -======= -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> git@github.com:Dolibarr/dolibarr.gitのブランチ「15.0」 # Validate RequireValidValue = 値が無効. RequireAtLeastXString = 少なくとも%s文字(s)が必要 @@ -347,12 +342,3 @@ BadSetupOfField = フィールドの設定エラー BadSetupOfFieldClassNotFoundForValidation = フィールドの設定エラー:検証用のクラスが見つからない BadSetupOfFieldFileNotFound = フィールドの設定が正しくない:含めるファイルが見つからない BadSetupOfFieldFetchNotCallable = フィールドの設定不正エラー:クラスでフェッチを呼び出せない -<<<<<<< HEAD -======= -======= -======= ->>>>>>> git@github.com:Dolibarr/dolibarr.gitのブランチ「15.0」 ->>>>>>> git@github.com:Dolibarr/dolibarr.gitのブランチ「15.0」 -======= ->>>>>>> git@github.com:Dolibarr/dolibarr.gitのブランチ「15.0」 ->>>>>>> git@github.com:Dolibarr/dolibarr.gitのブランチ「15.0」 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..fa0021b4854 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Bare tilgjengelig hvis du bruker HTTPS-sikre WarningModuleXDisabledSoYouMayMissEventHere=Modul %s er ikke aktivert, så du kan gå glipp av mange hendelser her. WarningPaypalPaymentNotCompatibleWithStrict=Verdien 'Strict' gjør at betalingsfunksjonene på nettet ikke fungerer som de skal. Bruk 'Lax' i stedet. -<<<<<<< HEAD -======= -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Verdien er ikke gyldig RequireAtLeastXString = Krever minst %s tegn @@ -347,12 +342,3 @@ BadSetupOfField = Feil oppsett av felt BadSetupOfFieldClassNotFoundForValidation = Feil oppsett av felt: Klasse ikke funnet for validering BadSetupOfFieldFileNotFound = Feil oppsett av felt: Filen ble ikke funnet for inkludering BadSetupOfFieldFetchNotCallable = Feil oppsett av felt: Henting kan ikke kalles på klasse -<<<<<<< HEAD -======= -======= -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git 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..04e1c37abef 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Disponibil numai dacă se utilizează conexi WarningModuleXDisabledSoYouMayMissEventHere=Modulul %s nu a fost activat. Este posibil să pierdeți o mulțime de evenimente aici.  WarningPaypalPaymentNotCompatibleWithStrict=Valoarea 'Strictă' face ca funcțiile de plată online să nu funcționeze corect. Folosiți în schimb 'Lax'. -<<<<<<< HEAD -======= -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> ramura '15.0' de la git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Valoare invalidă RequireAtLeastXString = Necesită cel puţin %s caracter(e) @@ -347,12 +342,3 @@ BadSetupOfField = Eroare setare invalidă a câmpului BadSetupOfFieldClassNotFoundForValidation = Eroare setare valoare câmp : Clasa nu a fost găsită pentru validare BadSetupOfFieldFileNotFound = Eroare setare valoare câmp : Fișierul nu a fost găsit pentru includere BadSetupOfFieldFetchNotCallable = Eroare setare valoare câmp : Operaţia fetch nu este apelabilă din clasă -<<<<<<< HEAD -======= -======= -======= ->>>>>>> ramura '15.0' de la git@github.com:Dolibarr/dolibarr.git ->>>>>>> ramura '15.0' de la git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> ramura '15.0' de la git@github.com:Dolibarr/dolibarr.git ->>>>>>> ramura '15.0' de la git@github.com:Dolibarr/dolibarr.git diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index 088cae1a1b0..b03e531455b 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=Нет в Словаре условий оплаты, пожалуйста, измените. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Доступно только при исп WarningModuleXDisabledSoYouMayMissEventHere=Модуль %s не включен. Так что вы можете пропустить здесь много мероприятий. WarningPaypalPaymentNotCompatibleWithStrict=Значение «Строгий» приводит к некорректной работе функций онлайн-платежей. Вместо этого используйте «Лакс». -<<<<<<< ГОЛОВА -======= -<<<<<<< ГОЛОВА -<<<<<<< ГОЛОВА ->>>>>>> ветка '15.0' git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = Значение недействительно RequireAtLeastXString = Требуется не менее %s символа(ов) @@ -347,12 +342,3 @@ BadSetupOfField = Ошибка неправильная настройка по BadSetupOfFieldClassNotFoundForValidation = Ошибка неправильной настройки поля: класс не найден для проверки BadSetupOfFieldFileNotFound = Ошибка неправильной настройки поля: файл не найден для включения BadSetupOfFieldFetchNotCallable = Ошибка неправильной настройки поля: Получение не вызывается для класса -<<<<<<< ГОЛОВА -======= -======= -======= ->>>>>>> ветка '15.0' git@github.com:Dolibarr/dolibarr.git ->>>>>>> ветка '15.0' git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> ветка '15.0' git@github.com:Dolibarr/dolibarr.git ->>>>>>> ветка '15.0' git@github.com:Dolibarr/dolibarr.git 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..aebf69b33d4 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. @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=Faqat HTTPS xavfsiz ulanishidan foydalanish WarningModuleXDisabledSoYouMayMissEventHere=%s moduli yoqilmagan. Shunday qilib, siz bu erda ko'plab tadbirlarni o'tkazib yuborishingiz mumkin. WarningPaypalPaymentNotCompatibleWithStrict="Qat'iy" qiymati onlayn to'lov xususiyatlarining noto'g'ri ishlashiga olib keladi. Buning o'rniga "Lax" dan foydalaning. -<<<<<<< BOSH -======= -<<<<<<< BOSH -<<<<<<< BOSH ->>>>>>> git@github.com ning '15.0' filiali:Dolibarr/dolibarr.git # Validate RequireValidValue = Qiymat yaroqsiz RequireAtLeastXString = Kamida %s belgi kerak @@ -347,12 +342,3 @@ BadSetupOfField = Maydonni noto'g'ri sozlashda xato BadSetupOfFieldClassNotFoundForValidation = Maydonni noto'g'ri o'rnatish xatosi: Tasdiqlash uchun sinf topilmadi BadSetupOfFieldFileNotFound = Maydonni noto'g'ri o'rnatishda xato: Faylni kiritish uchun topilmadi BadSetupOfFieldFetchNotCallable = Maydonni noto'g'ri o'rnatish xatosi: Sinfda qo'ng'iroq qilib bo'lmaydi -<<<<<<< BOSH -======= -======= -======= ->>>>>>> git@github.com ning '15.0' filiali:Dolibarr/dolibarr.git ->>>>>>> git@github.com ning '15.0' filiali:Dolibarr/dolibarr.git -======= ->>>>>>> git@github.com ning '15.0' filiali:Dolibarr/dolibarr.git ->>>>>>> git@github.com ning '15.0' filiali:Dolibarr/dolibarr.git 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..ec8fbdbf698 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=不在支付條款類別中,請修改。 @@ -322,11 +322,6 @@ WarningAvailableOnlyForHTTPSServers=僅在使用 HTTPS 安全連線時可用。 WarningModuleXDisabledSoYouMayMissEventHere=模組 %s 尚未啟用。所以你可能會在這裡錯過很多事件。 WarningPaypalPaymentNotCompatibleWithStrict=數值 'Strict' 使得線上支付功能無法正常工作。改用“Lax”。 -<<<<<<< HEAD -======= -<<<<<<< HEAD -<<<<<<< HEAD ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git # Validate RequireValidValue = 數值無效 RequireAtLeastXString = 至少需要%s個字元 @@ -347,12 +342,3 @@ BadSetupOfField = 欄位設定錯誤 BadSetupOfFieldClassNotFoundForValidation = 欄位設定錯誤:沒有發現可驗證的Class BadSetupOfFieldFileNotFound = 欄位設定錯誤:未找到要包含的檔案 BadSetupOfFieldFetchNotCallable = 欄位設定錯誤:無法在Class上調用獲取 -<<<<<<< HEAD -======= -======= -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git -======= ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git ->>>>>>> branch '15.0' of git@github.com:Dolibarr/dolibarr.git 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/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 664eb44d5f6..f3538d65cfa 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -118,7 +118,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/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; } 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/projet/card.php b/htdocs/projet/card.php index 081057f5f06..95c3a533d1f 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -564,7 +564,7 @@ if ($action == 'create' && $user->rights->projet->creer) { print ''; print ''; } // Type of event -print ''."\n"; -print ''; +print ''."\n"; +print ''; // Label print ''."\n"; print ''."\n"; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 22589c941d2..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)) { @@ -463,8 +463,7 @@ print '
'; print '
'; print '
'; - -dol_htmloutput_errors($errmsg); +dol_htmloutput_errors($errmsg, $errors); // Print form print '
'."\n"; @@ -547,8 +546,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''; } // Type of event -print '
'."\n"; -print ''; +print ''."\n"; +print ''; // Label print ''."\n"; print ''."\n"; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index b0a8e9e52a0..c42d6d10ff1 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -114,20 +114,21 @@ 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,), '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,), - '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')), @@ -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/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index c1a4ca94045..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 .= ''; @@ -652,6 +669,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'; } diff --git a/htdocs/recruitment/recruitmentcandidature_document.php b/htdocs/recruitment/recruitmentcandidature_document.php index 25cdb80aa3e..cd3da93b9e0 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 3845a53a4e3..49a36a736d1 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/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(); 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; } } 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 '
'; @@ -195,27 +196,31 @@ print ''; print ''; print ''; +print '
'; + +print ''; print ''; print ' 0 ? " disabled" : "").'>
'.$langs->trans("NoRecordFound").'
'.$langs->trans("NoRecordFound").'
0 ? " disabled" : "").'>
'; 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 ''; } @@ -735,7 +739,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/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) { diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 992e7ab403d..bb5097cb11a 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -369,13 +369,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) { 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 '
'.$langs->trans("EventType").'*'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'
'.$langs->trans("Format").'*'.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).'
'.$langs->trans("LabelOfBooth").'*
'.$langs->trans("EventType").'*'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'
'.$langs->trans("Format").'*'.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).'
'.$langs->trans("LabelOfconference").'*
'; 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"); } 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; } 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"; } diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index 64ce74b6022..0bfe4ebd080 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -70,6 +70,8 @@ $terminaltouse = $terminal; if (GETPOST('action', 'alpha') == 'set') { $db->begin(); + $res = dolibarr_set_const($db, "TAKEPOS_TERMINAL_NAME_".$terminaltouse, (!empty(GETPOST('terminalname'.$terminaltouse, 'restricthtml')) ? GETPOST('terminalname'.$terminaltouse, 'restricthtml') : $langs->trans("TerminalName", $terminaltouse)), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY".$terminaltouse, (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); @@ -148,6 +150,11 @@ print ''; print ''; print "\n"; +print ''; +print ''; + print ''; 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 '
'.$langs->trans("LabelRIB").'
'.$langs->trans("Bank").'
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("TerminalNameDesc").''; +print 'trans("TerminalName", $terminal)).'" >'; +print '
'.$langs->trans("CashDeskThirdPartyForSell").''; print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminaltouse}, 'socid', '(s.client IN (1, 3) AND s.status = 1)', 1, 0, 0, array(), 0); diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index ee6a6c85d80..e9717e7c992 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -955,14 +955,9 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { - trans("Terminal"); ?> + trans("TerminalName", $_SESSION["takeposterminal"])); ?> - - '.dol_print_date(dol_now(), "day").''; ?> @@ -1019,11 +1014,11 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {

trans("TerminalSelect"); ?>

diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e3f4a106c67..3657ca7f4b6 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -562,13 +562,20 @@ 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)) { 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 { diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e7fc3abba34..cb7e71f8356 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'); @@ -924,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 @@ -1018,6 +1021,23 @@ if ($action == 'create' || $action == 'presend') { print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).''; print '
'; + print $langs->trans("Origin"); + print ''; + print $texttoshow; + print '
'.$langs->trans("TicketReadOn").''; if (!empty($object->date_read)) { @@ -1038,7 +1058,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 +1086,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')).'
'; @@ -1117,6 +1137,7 @@ if ($action == 'create' || $action == 'presend') { // Fin colonne gauche et début colonne droite print '
'; + print ''; print ''; print ''; @@ -1126,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 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 ''; print ''; - print ''; + print ''; //print ''; //print ''; //print ''; 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 ''; - 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 '
'; 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 ''; 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 ''; print ''; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (!empty($conf->categorie->enabled) && !empty($user->hasRight("categorie", "read"))) { print ''; print ''; - $editenabled = (($action == 'edit') && !empty($user->rights->user->user->creer)); + $editenabled = (($action == 'edit') && !empty($user->hasRight("user", "user", "write"))); // Note print ''; @@ -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 '
'; 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) { diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index c9c332b311e..e0eaded97de 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -226,6 +226,14 @@ 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'); + + $result=preg_match('/<<<<assertTrue($result == 0, 'Found a sequence <<<<< into the translation file '.$code.'/'.$file.'. Probably a bad merge of code were done.'); } }
'; + print ''; @@ -1169,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); @@ -1189,7 +1204,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 +1263,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 +1399,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 +1419,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/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5fae77938e8..82c2142d786 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 @@ -259,24 +266,25 @@ 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'=>"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 ? - '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,), '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; 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 '
0 ? '&userid='.$userid : '').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''.round(isset($val['nb_diff']) ? $val['nb_diff'] : 0).''.price(price2num($val['total'], 'MT'), 1).''.round($val['total_diff']).''.price(price2num($val['avg'], 'MT'), 1).'
'.$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 '
'.$langs->trans("Categories").''; print $form->showCategories($object->id, Categorie::TYPE_USER, 1); @@ -1804,7 +1804,7 @@ if ($action == 'create' || $action == 'adduserldap') { print '
'.$langs->trans("ApiKey").''; if (!empty($object->api_key)) { @@ -2369,7 +2369,7 @@ if ($action == 'create' || $action == 'adduserldap') { print "
'.$langs->trans("ApiKey").''; print ''; @@ -2566,7 +2566,7 @@ if ($action == 'create' || $action == 'adduserldap') { print '
'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).''; 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/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; 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 '
'.$langs->trans("Note").'