Changeset 112354 in spip-zone
- Timestamp:
- Nov 7, 2018, 1:55:39 PM (2 years ago)
- Location:
- _plugins_/dictionnaires/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/dictionnaires/trunk/base/dictionnaires_tables.php
r92115 r112354 8 8 9 9 // Sécurité 10 if (!defined('_ECRIRE_INC_VERSION')) return; 10 if (!defined('_ECRIRE_INC_VERSION')) { 11 return; 12 } 11 13 12 14 /** … … 19 21 * Déclarations d'interface pour le compilateur 20 22 */ 21 function dictionnaires_declarer_tables_interfaces($interfaces) {23 function dictionnaires_declarer_tables_interfaces($interfaces) { 22 24 // 'spip_' dans l'index de $tables_principales 23 25 $interfaces['table_des_tables']['dictionnaires'] = 'dictionnaires'; … … 41 43 $tables['spip_dictionnaires'] = array( 42 44 'type' => 'dictionnaire', 45 'principale' => 'oui', 43 46 44 47 'titre' => "titre, '' AS lang", 45 48 'date' => '', 46 'principale' => 'oui',47 49 48 50 'field' => array( … … 99 101 $tables['spip_definitions'] = array( 100 102 'type' => 'definition', 103 'principale' => 'oui', 101 104 102 105 'titre' => "titre, lang", 103 106 'date' => 'date', 104 'principale' => 'oui',105 107 106 108 'field' => array( … … 134 136 'lang', 'date','id_trad' 135 137 ), 138 'champs_versionnes' => array( 139 'titre', 'texte', 'termes', 'url_externe' 140 ), 136 141 'rechercher_champs' => array( 137 142 'titre' => 8, 'texte' => 4, 'termes' => 6, 138 143 ), 139 144 145 'texte_langue_objet' => 'definition:texte_langue_objet', 146 'texte_definir_comme_traduction_objet' => "definition:texte_definir_comme_traduction_objet", 147 148 'statut_textes_instituer' => array( 149 'prop' => 'texte_statut_propose_evaluation', 150 'publie' => 'texte_statut_publie', 151 'refuse' => 'texte_statut_refuse', 152 'poubelle' => 'texte_statut_poubelle', 153 ), 140 154 'statut' => array( 141 155 array( … … 147 161 ), 148 162 'texte_changer_statut' => 'definition:changer_statut', 149 'texte_langue_objet' => 'definition:texte_langue_objet', 150 'texte_definir_comme_traduction_objet' => "definition:texte_definir_comme_traduction_objet", 151 'statut_titres' => array( 152 'prop'=>'info_article_propose', 153 'publie'=>'info_article_publie', 154 'poubelle'=>'info_article_supprime' 155 ), 156 'statut_textes_instituer' => array( 157 'prop' => 'texte_statut_propose_evaluation', 158 'publie' => 'texte_statut_publie', 159 'refuse' => 'texte_statut_poubelle', 160 ), 161 'champs_versionnes' => array( 162 'titre', 'texte', 'termes', 'url_externe' 163 ), 163 164 164 ); 165 165 … … 177 177 * Description complétée des tables 178 178 */ 179 function dictionnaires_declarer_tables_auxiliaires($tables_auxiliaires) {179 function dictionnaires_declarer_tables_auxiliaires($tables_auxiliaires) { 180 180 //-- Table de relations definitions_liens 181 181 $spip_definitions_liens = array( … … 197 197 return $tables_auxiliaires; 198 198 } 199 200 ?> -
_plugins_/dictionnaires/trunk/dictionnaires_administrations.php
r111125 r112354 8 8 9 9 // Sécurité 10 if (!defined('_ECRIRE_INC_VERSION')) return; 10 if (!defined('_ECRIRE_INC_VERSION')) { 11 return; 12 } 11 13 12 14 /** … … 67 69 * dans ce plugin. 68 70 **/ 69 function dictionnaires_migrer_acronymes() {71 function dictionnaires_migrer_acronymes() { 70 72 // Si F&T contient une table d'acronymes 71 73 if (count($liste = sql_fetsel('id_form', 'spip_forms', "type_form='acronymes_sigles'"))) { … … 131 133 * @return void 132 134 */ 133 function dictionnaires_vider_tables($nom_meta_base_version) {135 function dictionnaires_vider_tables($nom_meta_base_version) { 134 136 135 137 include_spip('base/abstract_sql'); … … 147 149 148 150 } 149 150 ?> -
_plugins_/dictionnaires/trunk/dictionnaires_autoriser.php
r65553 r112354 8 8 9 9 // Sécurité 10 if (!defined('_ECRIRE_INC_VERSION')) return; 10 if (!defined('_ECRIRE_INC_VERSION')) { 11 return; 12 } 11 13 12 14 /** … … 184 186 return autoriser('modifier', $type, $id, $qui, $opt); 185 187 } 186 187 ?> -
_plugins_/dictionnaires/trunk/dictionnaires_fonctions.php
r110957 r112354 8 8 9 9 // Sécurité 10 if (!defined('_ECRIRE_INC_VERSION')) return; 11 10 if (!defined('_ECRIRE_INC_VERSION')) { 11 return; 12 } 12 13 13 14 … … 78 79 * @return string HTML du terme et de sa définition 79 80 **/ 80 function dictionnaires_replace_callback($captures) {81 function dictionnaires_replace_callback($captures) { 81 82 include_spip('inc/config'); 82 83 static $deja_remplaces = array(); -
_plugins_/dictionnaires/trunk/dictionnaires_pipelines.php
r66220 r112354 8 8 9 9 // Sécurité 10 if (!defined('_ECRIRE_INC_VERSION')) return; 10 if (!defined('_ECRIRE_INC_VERSION')) { 11 return; 12 } 11 13 12 14 /** … … 28 30 * @return array Données du pipeline 29 31 **/ 30 function dictionnaires_post_edition($flux) {32 function dictionnaires_post_edition($flux) { 31 33 // TOUT CELA EST A FAIRE 32 34 return $flux; … … 89 91 } 90 92 93 /** 94 * Optimiser la base de données 95 * 96 * Supprime les objets à la poubelle. 97 * 98 * @pipeline optimiser_base_disparus 99 * @param array $flux Données du pipeline 100 * @return array Données du pipeline 101 */ 102 function dictionnaires_optimiser_base_disparus($flux) { 91 103 92 ?> 104 sql_delete('spip_definitions', "statut='poubelle' AND maj < " . $flux['args']['date']); 105 106 return $flux; 107 } -
_plugins_/dictionnaires/trunk/paquet.xml
r111125 r112354 2 2 prefix="dictionnaires" 3 3 categorie="divers" 4 version="1. 1.11"4 version="1.2.0" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.2.*]" … … 22 22 <pipeline nom="declarer_tables_interfaces" inclure="base/dictionnaires_tables.php" /> 23 23 <pipeline nom="declarer_tables_auxiliaires" inclure="base/dictionnaires_tables.php" /> 24 <pipeline nom="optimiser_base_disparus" inclure="dictionnaires_pipelines.php" /> 24 25 25 26 <!-- <pipeline nom="post_edition" inclure="dictionnaires_pipelines.php" /> -->
Note: See TracChangeset
for help on using the changeset viewer.