diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0d5e94a23f0..6f6766f3b92 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3496,7 +3496,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_folder', 'object_folder-open','object_generic', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', - 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', + 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_cron', 'object_donation', 'object_dynamicprice', 'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_inventory', 'object_label', 'object_margin', 'object_members', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_other', @@ -3537,7 +3537,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'account'=>'university', 'accountline'=>'receipt', 'accountancy'=>'search-dollar', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', 'asset'=>'money-check-alt', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'billr'=>'file-invoice-dollar', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical', 'bom'=>'shapes', - 'chart'=>'chart-line', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'collab'=>'people-arrows', 'conversation'=>'comments', + 'chart'=>'chart-line', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'collab'=>'people-arrows', 'conversation'=>'comments', 'cron'=>'business-time', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', @@ -3646,7 +3646,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Define $color $arrayconvpictotocolor = array( 'address'=>'#6c6aa8', 'building'=>'#6c6aa8', 'bom'=>'#a69944', - 'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'dynamicprice'=>'#a69944', + 'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'cron'=>'#555', + 'dynamicprice'=>'#a69944', 'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999', 'language'=>'#555', 'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944', 'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'inventory'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944', diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php index 62585333c1d..95a3dd2c15d 100644 --- a/htdocs/core/modules/modCron.class.php +++ b/htdocs/core/modules/modCron.class.php @@ -55,7 +55,7 @@ class modCron extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. - $this->picto = 'technic'; + $this->picto = 'cron'; // Data directories to create when module is enabled $this->dirs = array(); diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 31f0aa738d6..ffe09f54588 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -48,6 +48,11 @@ UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','D -- For v14 +ALTER TABLE llx_oauth_token ADD COLUMN restricted_ips varchar(200); +ALTER TABLE llx_oauth_token ADD COLUMN datec datetime DEFAULT NULL; +ALTER TABLE llx_oauth_token ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + + ALTER TABLE llx_mailing_cibles MODIFY COLUMN tag varchar(64) NULL; ALTER TABLE llx_mailing_cibles ADD INDEX idx_mailing_cibles_tag (tag); diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index ffa4f1029e7..06fc43f98b3 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -26,8 +26,8 @@ create table llx_events rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date type varchar(32) NOT NULL, -- action type - entity integer DEFAULT 1 NOT NULL, -- multi company id - prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix + entity integer DEFAULT 1 NOT NULL, -- multi company id + prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix dateevent datetime, -- date event fk_user integer, -- id user description varchar(250) NOT NULL, -- full description of action @@ -36,10 +36,3 @@ create table llx_events fk_object integer -- id of related object ) ENGINE=innodb; --- --- List of codes for the field entity --- --- 1 : first company events --- 2 : second company events --- 3 : etc... --- diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql index 145e646230d..06f2625c76e 100644 --- a/htdocs/install/mysql/tables/llx_oauth_token.sql +++ b/htdocs/install/mysql/tables/llx_oauth_token.sql @@ -17,11 +17,14 @@ CREATE TABLE llx_oauth_token ( rowid integer AUTO_INCREMENT PRIMARY KEY, - service varchar(36), - token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2 - tokenstring text, -- token in json format '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"} + service varchar(36), -- 'Google', 'Stripe', 'auth-public-key', ... + token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2 + tokenstring text, -- token in text or json format. Value depends on 'service. For example for an OAUTH service: '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"} fk_soc integer, - fk_user integer, + fk_user integer, -- Id of user in llx_user fk_adherent integer, + restricted_ips varchar(200), -- Restrict the authentication mode/token to some IPs + datec datetime DEFAULT NULL, -- date creation project + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, entity integer DEFAULT 1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_alert.sql b/htdocs/install/mysql/tables/llx_user_alert.sql index cded256de70..fd443e5e93f 100644 --- a/htdocs/install/mysql/tables/llx_user_alert.sql +++ b/htdocs/install/mysql/tables/llx_user_alert.sql @@ -21,6 +21,6 @@ create table llx_user_alert ( rowid integer AUTO_INCREMENT PRIMARY KEY, type integer, - fk_contact integer, -- pointe sur llx_socpeople - fk_user integer + fk_contact integer, -- id of llx_socpeople + fk_user integer -- id of llx_user )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_clicktodial.sql b/htdocs/install/mysql/tables/llx_user_clicktodial.sql index e6b02be0cbc..d9941a09ab0 100644 --- a/htdocs/install/mysql/tables/llx_user_clicktodial.sql +++ b/htdocs/install/mysql/tables/llx_user_clicktodial.sql @@ -17,14 +17,12 @@ -- =========================================================================== -- --- Stockage des informations relatives au click to dial +-- Table to store each different IP / devices / puclib key used for login -- -create table llx_user_clicktodial +create table llx_user_ipdevices ( - fk_user integer PRIMARY KEY, - url varchar(255), - login varchar(32), - pass varchar(64), - poste varchar(20) - + rowid integer PRIMARY KEY, + fk_user integer NOT NULL, -- ID llx_user + ip varchar(64), + user_agent varchar(255) NULL, -- user agent )ENGINE=innodb;