46acc9b572161233c59913b3ce1319d15ed88569
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2014 *
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 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
16 * Declarer les interfaces
18 * @param array $interfaces
21 function urls_declarer_tables_interfaces($interfaces) {
22 $interfaces['table_des_tables']['urls']='urls';
28 * @param array $tables_auxiliaires
31 function urls_declarer_tables_auxiliaires($tables_auxiliaires){
34 // un id parent eventuel, pour discriminer les doublons arborescents
35 "id_parent" => "bigint(21) DEFAULT '0' NOT NULL",
36 "url" => "VARCHAR(255) NOT NULL",
38 "type" => "varchar(15) DEFAULT 'article' NOT NULL",
40 "id_objet" => "bigint(21) NOT NULL",
41 // pour connaitre la plus recente.
42 // ATTENTION, pas on update CURRENT_TIMESTAMP implicite
43 // et pas le nom maj, surinterprete par inc/import_1_3
44 "date" => "DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL",
45 // nombre de segments dans url
46 "segments" => "SMALLINT(3) DEFAULT '1' NOT NULL",
47 // URL permanente, prioritaire
48 "perma" => "TINYINT(1) DEFAULT '0' NOT NULL",
51 $spip_urls_key = array(
52 "PRIMARY KEY" => "id_parent, url",
53 "KEY type" => "type, id_objet");
55 $tables_auxiliaires['spip_urls'] = array(
56 'field' => &$spip_urls,
57 'key' => &$spip_urls_key);
59 return $tables_auxiliaires;