From 6ef999dce0bfdb8f4f2a4b71bd41804c3adf66d3 Mon Sep 17 00:00:00 2001 From: nicod_ Date: Sat, 23 Jan 2021 16:21:35 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20donn=C3=A9es=20du=20r=C3=A9f?= =?UTF-8?q?=C3=A9rentiel=20v4,=20et=20fonctions=20de=20mise=20=C3=A0=20jou?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/opquast.php | 41 +- data/data-fr-v4.json | 2162 +++++++++++++++++++++++++++++++++++ opquast_administrations.php | 104 +- paquet.xml | 4 +- 4 files changed, 2293 insertions(+), 18 deletions(-) create mode 100644 data/data-fr-v4.json diff --git a/base/opquast.php b/base/opquast.php index 8317ed5..c77421e 100644 --- a/base/opquast.php +++ b/base/opquast.php @@ -16,12 +16,16 @@ if (!defined('_ECRIRE_INC_VERSION')) { * Déclarations d'interface pour le compilateur **/ function opquast_declarer_tables_interfaces($interfaces) { - $interfaces['table_des_tables']['opquast_criteres'] = 'opquast_criteres'; + $interfaces['table_des_tables']['opquast_criteres'] = 'opquast_criteres'; $interfaces['table_des_tables']['opquast_criteres_liens'] = 'opquast_criteres_liens'; - $interfaces['table_des_tables']['opquast_tags'] = 'opquast_tags'; + $interfaces['table_des_tables']['opquast_tags'] = 'opquast_tags'; + $interfaces['table_des_tables']['opquast_themes'] = 'opquast_themes'; + $interfaces['table_des_tables']['opquast_etapes'] = 'opquast_etapes'; $interfaces['tables_jointures']['spip_opquast_criteres'][] = 'opquast_criteres_liens'; - $interfaces['tables_jointures']['spip_opquast_tags'][] = 'opquast_criteres_liens'; + $interfaces['tables_jointures']['spip_opquast_tags'][] = 'opquast_criteres_liens'; + $interfaces['tables_jointures']['spip_opquast_themes'][] = 'opquast_criteres_liens'; + $interfaces['tables_jointures']['spip_opquast_etapes'][] = 'opquast_criteres_liens'; return $interfaces; } @@ -45,6 +49,8 @@ function opquast_declarer_tables_objets_sql($tables) { 'table_objet_surnoms' => array('opquast_critere'), 'field' => array( 'id_opquast_critere' => 'BIGINT(21) NOT NULL', + 'numero' => 'BIGINT(21) NOT NULL', + 'version' => 'VARCHAR(5) NOT NULL DEFAULT ""', 'titre' => "TEXT NOT NULL DEFAULT ''", 'lien' => "TEXT NOT NULL DEFAULT ''", 'texte' => "TEXT NOT NULL DEFAULT ''", @@ -56,7 +62,12 @@ function opquast_declarer_tables_objets_sql($tables) { 'KEY statut' => 'statut', ), 'titre' => 'titre AS titre, "" AS lang', - 'champs_editables' => array(), + 'champs_editables' => array( + 'titre', + 'texte', + 'numero', + 'version', + ), 'champs_versionnes' => array(), 'rechercher_champs' => array( 'titre' => 10, @@ -118,6 +129,28 @@ function opquast_declarer_tables_principales($tables) { ), ); + $tables['spip_opquast_themes'] = array( + 'field' => array( + 'id_opquast_theme' => 'BIGINT(21) NOT NULL', + 'titre' => "TEXT NOT NULL DEFAULT ''", + 'maj' => 'TIMESTAMP', + ), + 'key' => array( + 'PRIMARY KEY' => 'id_opquast_theme', + ), + ); + + $tables['spip_opquast_etapes'] = array( + 'field' => array( + 'id_opquast_etape' => 'BIGINT(21) NOT NULL', + 'titre' => "TEXT NOT NULL DEFAULT ''", + 'maj' => 'TIMESTAMP', + ), + 'key' => array( + 'PRIMARY KEY' => 'id_opquast_etape', + ), + ); + return $tables; } diff --git a/data/data-fr-v4.json b/data/data-fr-v4.json new file mode 100644 index 0000000..ec85016 --- /dev/null +++ b/data/data-fr-v4.json @@ -0,0 +1,2162 @@ +{ + "225": { + "objectif": "