feaf14644532b625da5c5844b7f031405343ad87
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
14 * Déclarations relatives à la base de données
16 * @package SPIP\Breves\Pipelines
19 if (!defined('_ECRIRE_INC_VERSION')) {
24 * Déclare les alias de boucle et traitements automatiques de certaines balises
26 * @pipeline declarer_tables_interfaces
27 * @param array $interfaces
28 * Déclarations d'interface pour le compilateur
30 * Déclarations d'interface pour le compilateur
32 function breves_declarer_tables_interfaces($interfaces) {
33 $interfaces['table_des_tables']['breves'] = 'breves';
35 $interfaces['exceptions_des_tables']['breves']['id_secteur'] = 'id_rubrique';
36 $interfaces['exceptions_des_tables']['breves']['date'] = 'date_heure';
37 $interfaces['exceptions_des_tables']['breves']['nom_site'] = 'lien_titre';
38 $interfaces['exceptions_des_tables']['breves']['url_site'] = 'lien_url';
40 $interfaces['table_des_traitements']['LIEN_TITRE'][] = _TRAITEMENT_TYPO
;
41 $interfaces['table_des_traitements']['LIEN_URL'][] = 'vider_url(%s)';
47 * Déclarer l'objet éditorial de brèves
49 * @pipeline declarer_tables_objets_sql
50 * @param array $tables
51 * Description des tables
53 * Description complétée des tables
55 function breves_declarer_tables_objets_sql($tables) {
56 $tables['spip_breves'] = array(
57 'texte_retour' => 'icone_retour',
58 'texte_objets' => 'breves:breves',
59 'texte_objet' => 'breves:breve',
60 'texte_modifier' => 'breves:icone_modifier_breve',
61 'texte_creer' => 'breves:icone_nouvelle_breve',
62 'info_aucun_objet' => 'breves:info_aucun_breve',
63 'info_1_objet' => 'breves:info_1_breve',
64 'info_nb_objets' => 'breves:info_nb_breves',
65 'texte_logo_objet' => 'breves:logo_breve',
66 'texte_langue_objet' => 'breves:titre_langue_breve',
67 'titre' => 'titre, lang',
68 'date' => 'date_heure',
69 'principale' => 'oui',
70 'introduction_longueur' => '300',
72 'id_breve' => 'bigint(21) NOT NULL',
73 'date_heure' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
74 'titre' => "text DEFAULT '' NOT NULL",
75 'texte' => "longtext DEFAULT '' NOT NULL",
76 'lien_titre' => "text DEFAULT '' NOT NULL",
77 'lien_url' => "text DEFAULT '' NOT NULL",
78 'statut' => "varchar(6) DEFAULT '0' NOT NULL",
79 'id_rubrique' => "bigint(21) DEFAULT '0' NOT NULL",
80 'lang' => "VARCHAR(10) DEFAULT '' NOT NULL",
81 'langue_choisie' => "VARCHAR(3) DEFAULT 'non'",
85 'PRIMARY KEY' => 'id_breve',
86 'KEY id_rubrique' => 'id_rubrique',
89 'id_breve' => 'id_breve',
90 'id_rubrique' => 'id_rubrique'
96 'previsu' => 'publie,prop',
97 'exception' => 'statut'
100 'texte_changer_statut' => 'breves:entree_breve_publiee',
101 'aide_changer_statut' => 'brevesstatut',
102 'statut_titres' => array(
103 'prop' => 'breves:titre_breve_proposee',
104 'publie' => 'breves:titre_breve_publiee',
105 'refuse' => 'breves:titre_breve_refusee',
107 'statut_textes_instituer' => array(
108 'prop' => 'breves:item_breve_proposee', //_T('texte_statut_propose_evaluation')
109 'publie' => 'breves:item_breve_validee', //_T('texte_statut_publie')
110 'refuse' => 'breves:item_breve_refusee', //_T('texte_statut_refuse')
113 'rechercher_champs' => array(
119 'rechercher_jointures' => array(
120 'document' => array('titre' => 2, 'descriptif' => 1)
122 'champs_versionnes' => array('id_rubrique', 'titre', 'lien_titre', 'lien_url', 'texte'),