From 7a69fdc5b787659f1436a87fff25943265167658 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Fri, 6 Dec 2019 15:37:14 +0100 Subject: [PATCH] FEAT #12091 TIME 0:15 Remove custom fields for users --- .../class_business_app_tools_Abstract.php | 21 ------------------- apps/maarch_entreprise/lang/en.php | 15 ------------- apps/maarch_entreprise/lang/fr.php | 16 -------------- apps/maarch_entreprise/lang/nl.php | 5 ----- migration/19.12/1912.sql | 3 +++ sql/structure.sql | 3 --- 6 files changed, 3 insertions(+), 60 deletions(-) diff --git a/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php b/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php index cbebcfb958d..12b4f1d9648 100755 --- a/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php +++ b/apps/maarch_entreprise/class/class_business_app_tools_Abstract.php @@ -611,33 +611,12 @@ abstract class business_app_tools_Abstract extends Database } } - /** - * Loads current folder identifier in session - * - */ - protected function _loadCurrentFolder($userId) - { - if (isset($userId)) { - $db = new Database(); - $stmt = $db->query( - "SELECT custom_t1 FROM " . USERS_TABLE . " WHERE user_id = ?", - array($userId) - ); - $res = $stmt->fetchObject(); - - $_SESSION['current_folder_id'] = $res->custom_t1; - } - } - /** * Loads app specific vars in session * */ public function load_app_var_session($userData = '') { - if (is_array($userData)) { - $this->_loadCurrentFolder($userData['UserId']); - } $this->_loadEntrepriseVar(); $this->load_features( 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] diff --git a/apps/maarch_entreprise/lang/en.php b/apps/maarch_entreprise/lang/en.php index a9169bbf60c..8120e4c9ede 100755 --- a/apps/maarch_entreprise/lang/en.php +++ b/apps/maarch_entreprise/lang/en.php @@ -2986,21 +2986,6 @@ if (!defined('_INTEGER')) { if (!defined('_FLOAT')) { define('_FLOAT', 'Floating'); } -if (!defined('_CUSTOM_T1')) { - define('_CUSTOM_T1', 'Text field 1'); -} -if (!defined('_CUSTOM_T2')) { - define('_CUSTOM_T2', 'Text field 2'); -} -if (!defined('_CUSTOM_D1')) { - define('_CUSTOM_D1', 'Date field'); -} -if (!defined('_CUSTOM_N1')) { - define('_CUSTOM_N1', 'Integer field'); -} -if (!defined('_CUSTOM_F1')) { - define('_CUSTOM_F1', 'Floating field'); -} if (!defined('_ITEM_NOT_IN_LIST')) { define('_ITEM_NOT_IN_LIST', 'Missing element from the allowed values list'); diff --git a/apps/maarch_entreprise/lang/fr.php b/apps/maarch_entreprise/lang/fr.php index a6fffa9e674..160dcb886a6 100755 --- a/apps/maarch_entreprise/lang/fr.php +++ b/apps/maarch_entreprise/lang/fr.php @@ -3013,22 +3013,6 @@ if (!defined('_INTEGER')) { if (!defined('_FLOAT')) { define('_FLOAT', 'Flottant'); } -if (!defined('_CUSTOM_T1')) { - define('_CUSTOM_T1', 'Champ Texte 1'); -} -if (!defined('_CUSTOM_T2')) { - define('_CUSTOM_T2', 'Champ Texte 2'); -} -if (!defined('_CUSTOM_D1')) { - define('_CUSTOM_D1', 'Champ Date'); -} -if (!defined('_CUSTOM_N1')) { - define('_CUSTOM_N1', 'Champ Entier'); -} -if (!defined('_CUSTOM_F1')) { - define('_CUSTOM_F1', 'Champ Flottant'); -} - if (!defined('_ITEM_NOT_IN_LIST')) { define('_ITEM_NOT_IN_LIST', 'Elèment absent de la liste des valeurs autorisées'); } diff --git a/apps/maarch_entreprise/lang/nl.php b/apps/maarch_entreprise/lang/nl.php index f573d3532cc..03b62455603 100755 --- a/apps/maarch_entreprise/lang/nl.php +++ b/apps/maarch_entreprise/lang/nl.php @@ -955,11 +955,6 @@ if (!defined('_WARNING')) { define('_WARNING', 'Let op');} if (!defined('_STRING')) { define('_STRING', 'Karakterreeks');} if (!defined('_INTEGER')) { define('_INTEGER', 'Geheel');} if (!defined('_FLOAT')) { define('_FLOAT', 'Zwevend');} -if (!defined('_CUSTOM_T1')) { define('_CUSTOM_T1', 'Veld tekst 1');} -if (!defined('_CUSTOM_T2')) { define('_CUSTOM_T2', 'Veld tekst 2');} -if (!defined('_CUSTOM_D1')) { define('_CUSTOM_D1', 'Veld Datum');} -if (!defined('_CUSTOM_N1')) { define('_CUSTOM_N1', 'Veld Geheel');} -if (!defined('_CUSTOM_F1')) { define('_CUSTOM_F1', 'Veld Zwevend');} if (!defined('_ITEM_NOT_IN_LIST')) { define('_ITEM_NOT_IN_LIST', 'Element niet in de lijst van de toegelaten waarden');} if (!defined('_PB_WITH_FINGERPRINT_OF_DOCUMENT')) { define('_PB_WITH_FINGERPRINT_OF_DOCUMENT', 'De initiële digitale afdruk van het document komt niet overeen met die van het document waarnaar verwezen wordt');} if (!defined('_MISSING')) { define('_MISSING', 'ontbrekend(e)');} diff --git a/migration/19.12/1912.sql b/migration/19.12/1912.sql index 2a65fd37d97..2c4927bb492 100644 --- a/migration/19.12/1912.sql +++ b/migration/19.12/1912.sql @@ -644,6 +644,9 @@ ALTER TABLE res_attachments DROP COLUMN IF EXISTS is_multicontacts; ALTER TABLE res_attachments DROP COLUMN IF EXISTS is_multi_docservers; ALTER TABLE res_attachments DROP COLUMN IF EXISTS tnl_path; ALTER TABLE res_attachments DROP COLUMN IF EXISTS tnl_filename; +ALTER TABLE users DROP COLUMN IF EXISTS custom_t1; +ALTER TABLE users DROP COLUMN IF EXISTS custom_t2; +ALTER TABLE users DROP COLUMN IF EXISTS custom_t3; /* M2M */ diff --git a/sql/structure.sql b/sql/structure.sql index 03288718408..f239a859c44 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -215,9 +215,6 @@ CREATE TABLE users phone character varying(32) DEFAULT NULL::character varying, mail character varying(255) DEFAULT NULL::character varying, initials character varying(32) DEFAULT NULL::character varying, - custom_t1 character varying(50) DEFAULT '0'::character varying, - custom_t2 character varying(50) DEFAULT NULL::character varying, - custom_t3 character varying(50) DEFAULT NULL::character varying, status character varying(10) NOT NULL DEFAULT 'OK'::character varying, password_modification_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP, loginmode character varying(50) DEFAULT NULL::character varying, -- GitLab