[SPIP] ~v3.0.20-->v3.0.25
[lhc/web/clavette_www.git] / www / plugins-dist / organiseur / base / organiseur.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
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 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15
16 /**
17 * Declaration des champs complementaires sur la table auteurs, pour les clients
18 *
19 * @param array $tables
20 * @return array
21 */
22 function organiseur_declarer_tables_objets_sql($tables){
23
24 $tables['spip_auteurs']['field']["imessage"] = "VARCHAR(3)";
25 $tables['spip_auteurs']['field']["messagerie"] = "VARCHAR(3)";
26
27 $tables['spip_messages'] = array(
28 'page'=> false,
29 'texte_modifier' => 'icone_modifier_message',
30 'texte_creer' => 'icone_ecrire_nouveau_message',
31 'texte_objets' => 'organiseur:messages',
32 'texte_objet' => 'organiseur:message',
33 'info_aucun_objet'=> 'info_aucun_message',
34 'info_1_objet' => 'info_1_message',
35 'info_nb_objets' => 'info_nb_messages',
36
37 'principale' => 'oui',
38 'champs_editables' => array('titre', 'texte', 'type','date_heure', 'date_fin', 'rv', 'id_auteur', 'destinataires'),
39 'field' => array(
40 "id_message" => "bigint(21) NOT NULL",
41 "titre" => "text DEFAULT '' NOT NULL",
42 "texte" => "longtext DEFAULT '' NOT NULL",
43 // normal,
44 // pb (pense bete)
45 // affich (annonce publique)
46 "type" => "varchar(6) DEFAULT '' NOT NULL",
47 "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
48 "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
49 "rv" => "varchar(3) DEFAULT '' NOT NULL",
50 "statut" => "varchar(6) DEFAULT '0' NOT NULL",
51 "id_auteur" => "bigint(21) DEFAULT 0 NOT NULL",
52 "destinataires" => "text DEFAULT '' NOT NULL",
53 "maj" => "TIMESTAMP"
54 ),
55 'key' => array(
56 "PRIMARY KEY" => "id_message",
57 "KEY id_auteur" => "id_auteur"
58 ),
59 'titre' => "titre, '' AS lang",
60 'date' => 'date_heure',
61 'statut' => array(
62 array(
63 'champ' => 'statut',
64 'publie' => 'publie',
65 'previsu' => '!',
66 'exception' => array('statut','tout')
67 ),
68 ),
69 'rechercher_champs' => array(
70 'titre' => 8, 'texte' => 1
71 ),
72
73 );
74
75 return $tables;
76
77 }
78
79 /**
80 * Interfaces des tables agenda et messagerie
81 *
82 * @param array $interfaces
83 * @return array
84 */
85 function organiseur_declarer_tables_interfaces($interfaces){
86 $interfaces['table_des_tables']['messages']='messages';
87
88 return $interfaces;
89 }
90
91 ?>