diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bf56b1a776416..449bb20dbdc41 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9457,7 +9457,7 @@ protected function setSaveQuery() $queryarray[$field] = ((int) $conf->entity); } else { // $this->{$field} may be null, '', 0, '0', 123, '123' - if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) { + if ((isset($this->{$field}) && ((string) $this->{$field}) != '') || !empty($info['notnull'])) { if (!isset($this->{$field})) { $queryarray[$field] = 0; } elseif ($this->isInt($info)) { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 2cefd50cc3e22..fd83a09ab0e90 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2696,7 +2696,7 @@ if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, ''); } - print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=close&token='.newToken().'&id='.$object->id, ''); + print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, ''); } } diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql index 370e6f4595e4a..c0c984332b209 100644 --- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql +++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql @@ -92,6 +92,7 @@ ALTER TABLE llx_adherent DROP COLUMN whatsapp; ALTER TABLE llx_societe DROP COLUMN skype; ALTER TABLE llx_user ADD COLUMN email_oauth2 varchar(255); +ALTER TABLE llx_user ADD COLUMN last_main_doc varchar(255); ALTER TABLE llx_prelevement_demande ADD INDEX idx_prelevement_demande_ext_payment_id (ext_payment_id); @@ -155,7 +156,7 @@ ALTER TABLE llx_resource ADD COLUMN zip varchar(25) DEFAULT NULL AFTER address; ALTER TABLE llx_resource ADD COLUMN town varchar(50) DEFAULT NULL AFTER zip; ALTER TABLE llx_resource ADD COLUMN photo_filename varchar(255) DEFAULT NULL AFTER town; ALTER TABLE llx_resource ADD COLUMN max_users integer DEFAULT NULL AFTER photo_filename; -ALTER TABLE llx_resource ADD COLUMN phone varchar(255) DEFAULT NULL AFTER user_places; +ALTER TABLE llx_resource ADD COLUMN phone varchar(255) DEFAULT NULL AFTER max_users; ALTER TABLE llx_resource ADD COLUMN email varchar(255) DEFAULT NULL AFTER phone; ALTER TABLE llx_resource ADD COLUMN url varchar(255) DEFAULT NULL AFTER email; ALTER TABLE llx_resource ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 70dea5d7628ad..141200a602454 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -80,7 +80,7 @@ create table llx_user note_public text, note_private text DEFAULT NULL, model_pdf varchar(255) DEFAULT NULL, - last_main_doc varchar(255), -- relative filepath+filename of last main generated document + last_main_doc varchar(255), -- relative filepath+filename of last main generated document datelastlogin datetime, datepreviouslogin datetime, datelastpassvalidation datetime, -- last date we change password or we made a disconnect all @@ -94,7 +94,7 @@ create table llx_user openid varchar(255), statut tinyint DEFAULT 1, photo varchar(255), -- filename or url of photo - lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. + lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. color varchar(6), barcode varchar(255) DEFAULT NULL, fk_barcode_type integer DEFAULT 0, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c9fedabb06f26..931cb74aa1169 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2442,3 +2442,4 @@ RecommendedForProduction=Recommended for Production RecommendedForDebug=Recommended for Debug ExportUseForce=Use the parameter -f ExportUseForceHelp=Force to continue the export even when an error is found (Backup may not be reliable) +EnterAnIP=Enter an IP address \ No newline at end of file diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index d93f5cb8a4758..a05c0307ac7fb 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -397,7 +397,7 @@ } // Back to draft - if ($object->status == $object::STATUS_VALIDATED) { + if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_RECRUITED) { if ($permissiontoadd) { print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); }