2bc542629d9142c5934fdfc8ffe42003902bad25
[lhc/web/www.git] / www / plugins / rss_article_3_0 / base / rssarticle.php
1 <?php
2
3 if (!defined('_ECRIRE_INC_VERSION')) {
4 return;
5 }
6
7 /**
8 * Ajouter la table spip_articles_syndic
9 * @param array $tables_auxiliaires
10 * @return array
11 */
12 function rssarticle_declarer_tables_auxiliaires($tables_auxiliaires){
13
14 $spip_rssarticle = array(
15 "id_article" => "bigint(21) NOT NULL",
16 "id_syndic" => "bigint(21) NOT NULL");
17
18 $spip_rssarticle_key = array(
19 "INDEX" => "id_article");
20
21 $tables_auxiliaires['spip_articles_syndic'] = array(
22 'field' => &$spip_rssarticle,
23 'key' => &$spip_rssarticle_key);
24
25 return $tables_auxiliaires;
26 }
27
28 /**
29 * Declarer la table spip_articles_syndic dans les jointures
30 * @param array $interface
31 * @return array
32 */
33 function rssarticle_declarer_tables_interfaces($interface){
34
35 $interface['table_des_tables']['articles_syndic']='articles_syndic';
36
37 // permet au compilateur de determiner explicitement les jointures possibles
38 // lorsqu'une boucle sur une table demande un champ inconnu
39 $interface['tables_jointures']['spip_articles'][] = 'articles_syndic';
40
41 return $interface;
42 }
43
44 /**
45 * Ajouter des champs a la table syndic
46 * @param array $tables_principales
47 * @return array
48 */
49 function rssarticle_declarer_tables_principales($tables_principales){
50 // Extension de la table syndic
51 $tables_principales['spip_syndic']['field']['rssarticle'] = "varchar(3) DEFAULT 'non' NOT NULL";
52
53 return $tables_principales;
54 }
55
56
57