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