diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index bb6007ef1c1..0b52afc021e 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -58,7 +58,7 @@ llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-system_filecheck'); print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup'); -print ''.$langs->trans("FileCheckDesc").'

'; +print '
'.$langs->trans("FileCheckDesc").'


'; // Version print '
'; @@ -133,11 +133,11 @@ print '
'; print ''."\n"; if (dol_is_file($xmlfile)) { print ' = '; - print ''; + print ''; print '
'; } else { print ' '; print '
'; } @@ -147,7 +147,7 @@ print '
'; print ''."\n"; if ($enableremotecheck) { print ' = '; - print '
'; + print '
'; } else { print ' '.$langs->trans("RemoteSignature").' = '.dol_escape_htmltag($xmlremote); if (!GETPOST('xmlremote')) { diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index dc3e8045494..0d6da0e7dbf 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -86,8 +86,9 @@ class Setup extends DolibarrApi $sql = "SELECT t.rowid as id, t.elementtype, t.code, t.contexts, t.label, t.description, t.rang"; $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as t"; + $sql .= " WHERE 1=1"; if (!empty($elementtype)) { - $sql .= " WHERE t.elementtype = '".$this->db->escape($elementtype)."'"; + $sql .= " AND t.elementtype = '".$this->db->escape($elementtype)."'"; } // Add sql filters if ($sqlfilters) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index de4dc3af9ad..4bc524d75c9 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1852,33 +1852,34 @@ class Propal extends CommonObject // Update request $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; - $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; - $sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").","; - $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; - $sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").","; - $sql .= " datep=".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').","; + $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET"; + $sql .= " ref = ".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; + $sql .= " ref_client = ".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").","; + $sql .= " ref_ext = ".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; + $sql .= " fk_soc = ".(!empty($this->socid) ? (int) $this->socid : "null").","; + $sql .= " datep = ".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').","; if (!empty($this->fin_validite)) { - $sql .= " fin_validite=".(strval($this->fin_validite) != '' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; + $sql .= " fin_validite = ".(strval($this->fin_validite) != '' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; } - $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; - $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; - $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; - $sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").","; - $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; - $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; - $sql .= " fk_statut=".(isset($this->status) ? $this->status : "null").","; - $sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").","; - $sql .= " fk_user_valid=".(isset($this->user_validation_id) ? $this->user_validation_id : "null").","; - $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; - $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; - $sql .= " deposit_percent=".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null").","; - $sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; - $sql .= " fk_input_reason=".(isset($this->demand_reason_id) ? $this->demand_reason_id : "null").","; - $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; - $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; - $sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; - $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); - $sql .= " WHERE rowid=".((int) $this->id); + $sql .= " date_valid = ".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; + $sql .= " total_tva = ".(isset($this->total_tva) ? (float) $this->total_tva : "null").","; + $sql .= " localtax1 = ".(isset($this->total_localtax1) ? (float) $this->total_localtax1 : "null").","; + $sql .= " localtax2 = ".(isset($this->total_localtax2) ? (float) $this->total_localtax2 : "null").","; + $sql .= " total_ht = ".(isset($this->total_ht) ? (float) $this->total_ht : "null").","; + $sql .= " total_ttc = ".(isset($this->total_ttc) ? (float) $this->total_ttc : "null").","; + $sql .= " fk_statut = ".(isset($this->status) ? (int) $this->status : "null").","; + $sql .= " fk_user_author = ".(!empty($this->user_author_id) ? (int) $this->user_author_id : "null").","; + $sql .= " fk_user_valid = ".(!empty($this->user_validation_id) ? (int) $this->user_validation_id : "null").","; + $sql .= " fk_projet = ".(!empty($this->fk_project) ? (int) $this->fk_project : "null").","; + $sql .= " fk_cond_reglement = ".(!empty($this->cond_reglement_id) ? (int) $this->cond_reglement_id : "null").","; + $sql .= " deposit_percent = ".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null").","; + $sql .= " fk_mode_reglement = ".(!empty($this->mode_reglement_id) ? (int) $this->mode_reglement_id : "null").","; + $sql .= " fk_input_reason = ".(!empty($this->demand_reason_id) ? (int) $this->demand_reason_id : "null").","; + $sql .= " note_private = ".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; + $sql .= " note_public = ".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; + $sql .= " model_pdf = ".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; + $sql .= " import_key = ".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); + $sql .= " WHERE rowid = ".((int) $this->id); $this->db->begin(); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a0dfaf1ef32..95647b6a9dc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6920,7 +6920,7 @@ class Form $TCurrency = array(); $sql = "SELECT code FROM " . $this->db->prefix() . "multicurrency"; - $sql .= " WHERE entity IN ('" . getEntity('mutlicurrency') . "')"; + $sql .= " WHERE entity IN ('" . getEntity('multicurrency') . "')"; if ($filter) { $sql .= " AND " . $filter; } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 6df2a2d69ea..79a6b011f48 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -244,7 +244,7 @@ function run_sql($sqlfile, $silent = 1, $entity = 0, $usesavepoint = 1, $handler // Add line buf to buffer if not a comment if ($nocommentremoval || !preg_match('/^\s*--/', $buf)) { if (empty($nocommentremoval)) { - $buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer + $buf = preg_replace('/([,;ERLT0\)])\s+--.*$/i', '\1', $buf); //remove comment on lines that does not start with --, before adding it to the buffer } if ($buffer) { $buffer .= ' '; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 9d476fa8912..8bfbadd53f3 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -547,8 +547,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $parameters = array( 'facid' => $facid, - // 'ref' => $ref, - // 'objcanvas' => $objcanvas, + 'ref' => $obj->ref ); $reshook = $hookmanager->executeHooks('paymentsupplierinvoices', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; @@ -603,8 +602,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } $moreHtmlRight = ''; - if ($action=='create') { - $urlToggleDisplayMod = $_SERVER["PHP_SELF"].'?facid='.$facid.'&action='.$action.'&accountid='.$accountid.'&display-all-invoices=' . (intval(!$displayAllInvoices)); + if ($action == 'create') { + $urlToggleDisplayMod = $_SERVER["PHP_SELF"].'?facid='.((int) $facid).'&action='.urlencode($action).'&accountid='.((int) $accountid).'&display-all-invoices=' . (intval(!$displayAllInvoices)); if (empty($displayAllInvoices)) { $btnTitle = $langs->trans('DisplayOtherInvoicesToo'); @@ -626,7 +625,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '
'; - print ''."\n"; + print '
'."\n"; print ''; print ''; print ''; diff --git a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql index 64308faacac..a8d28fb6b22 100644 --- a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql +++ b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql @@ -28,5 +28,5 @@ create table llx_societe_perentity accountancy_code_supplier varchar(32), -- supplier accountancy auxiliary account accountancy_code_sell varchar(32), -- Selling accountancy code accountancy_code_buy varchar(32), -- Buying accountancy code - vat_reverse_charge tinyint DEFAULT 0 + vat_reverse_charge tinyint DEFAULT 0 -- VAT reverse charge )ENGINE=innodb; diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 1ea42ee784a..46a4e350589 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -354,6 +354,13 @@ ErrorStreamMustBeEnabled=The PHP stream %s is not available. Check your PHP modu ErrorYouTryToPayInvoicesWithDifferentCurrenciesInSamePayment=Error, you try to pay different invoices with different currencies in the same payment ErrorLinkNotFoundWithSharedLink=Error, link not found with this shared key ErrorBadNumberOfLinesMustHaveAtLeastOneLinePlusTitle=Bad number of lines. The files must have at least 2 lines (1 line for title and 1 line for data) +ErrorTooManyAttempts= Too many attempts, please try again later +ErrorThisContactXIsAlreadyDefinedAsThisType=%s is already defined as contact for this type. +ErrorThisGroupIsAlreadyDefinedAsThisType=The contacts with this group are already defined as contact for this type. +ErrorIsNotInError=%s is not in error +ErrorFilenameExtensionNotAllowed=File %s has a forbidden file extension +ErrorNoValueForSelectListType=Error, a value for this type of field is mandatory + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -432,14 +439,9 @@ BadSetupOfField = Error bad setup of field BadSetupOfFieldClassNotFoundForValidation = Error bad setup of field : Class not found for validation BadSetupOfFieldFileNotFound = Error bad setup of field : File not found for inclusion BadSetupOfFieldFetchNotCallable = Error bad setup of field : Fetch not callable on class -ErrorTooManyAttempts= Too many attempts, please try again later TotalAmountEmpty=Total Amount Empty FailedToFoundTheConversionRateForInvoice=Failed to found the conversion rate for invoice ThisIdNotDefined=Id not defined OperNotDefined=Payment method not defined -ErrorThisContactXIsAlreadyDefinedAsThisType=%s is already defined as contact for this type. -ErrorThisGroupIsAlreadyDefinedAsThisType=The contacts with this group are already defined as contact for this type. EmptyMessageNotAllowedError=Empty message is not allowed -ErrorIsNotInError=%s is not in error -ErrorFilenameExtensionNotAllowed=File %s has a forbidden file extension -ErrorNoValueForSelectListType=Error, a value for this type of field is mandatory +SomeShipmentExists=Error, there is some shipment linked to the order. Deletion refused. diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index c3aabdbf27f..da94e853c59 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1627,7 +1627,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")"; } elseif (!empty($allprojectforuser)) { // Limit on on user - if (empty($search_user)) { + if (empty($search_user) && !empty($arrayfields['author']['checked'])) { $search_user = $user->id; } if ($search_user > 0) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 19a95d7c708..b3359575268 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1907,7 +1907,7 @@ div.ticketpublicarealist>form>div.div-table-responsive { margin: 20px 20px 20px 20px; } .flexcontainer { - browser->name, array('chrome', 'firefox'))) { + browser->name, array('chrome', 'firefox', 'safari'))) { echo 'display: inline-flex;'."\n"; } ?> flex-flow: row wrap; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 535c8126ca3..edd74b98f29 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2055,7 +2055,7 @@ div.ticketpublicarealist>form>div.div-table-responsive { } .flexcontainer { - browser->name, array('chrome', 'firefox'))) { + browser->name, array('chrome', 'firefox', 'safari'))) { echo 'display: inline-flex;'."\n"; } ?> flex-flow: row wrap; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9476046f186..bbdd06ba789 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2717,7 +2717,7 @@ if ($action == 'create' || $action == 'adduserldap') { print ''; // Country - print '
'.$langs->trans('Invoice').'
'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).''; + print '
'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).''; print img_picto('', 'country', 'class="pictofixedwidth"'); if ($permissiontoedit) { print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id), 'country_id');