Changeset 74912 in spip-zone for _plugins_/mesfavoris/mesfavoris_pipelines.php
- Timestamp:
- Aug 23, 2013, 3:24:09 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/mesfavoris/mesfavoris_pipelines.php
r64726 r74912 2 2 /** 3 3 * Plugin mesfavoris 4 * (c) 2009-201 2 Olivier Sallou, Cedric Morin4 * (c) 2009-2013 Olivier Sallou, Cedric Morin, Gilles Vincent 5 5 * Distribue sous licence GPL 6 6 * 7 7 */ 8 8 9 /** 10 * Utilisation des pipelines 11 * 12 * @package SPIP\Mesfavoris\Pipelines 13 */ 14 9 15 // Sécurité 10 16 if (!defined("_ECRIRE_INC_VERSION")) return; 11 17 12 18 /** 19 * Déclaration de l'index de $tables_principales qui sera utilisé dans les 'spip_' 20 * 21 * @pipeline declarer_tables_interfaces 22 * @param array $interface Array contenant les infos des tables visibles par recherche sur 'spip_bidule' 23 * @return array Cet Array de description modifié 24 */ 25 function mesfavoris_declarer_tables_interfaces($interface){ 26 $interface['table_des_tables']['favoris']='favoris'; 27 return $interface; 28 } 29 30 /** 31 * Declaration des tables principales 32 * 33 * @pipeline declarer_tables_principales 34 * @param array $tables_principales Un array de description des tables 35 * @return array $tables_principales L'Array de description complété 36 */ 37 function mesfavoris_declarer_tables_principales($tables_principales){ 38 $spip_favoris = array( 39 "id_favori" => "bigint(21) NOT NULL", 40 "id_auteur" => "bigint DEFAULT '0' NOT NULL", 41 "id_objet" => "bigint(21) DEFAULT '0' NOT NULL", 42 "objet" => "VARCHAR (25) DEFAULT '' NOT NULL", 43 "categorie" => "VARCHAR (25) DEFAULT '' NOT NULL", 44 "maj" => "TIMESTAMP" 45 ); 46 47 $spip_favoris_key = array( 48 "PRIMARY KEY" => "id_favori", 49 "KEY auteur_objet" => "id_auteur,id_objet,objet", 50 "KEY id_auteur" => "id_auteur", 51 "KEY id_objet" => "id_objet", 52 "KEY objet" => "objet", 53 "KEY categorie" => "categorie", 54 ); 55 56 $tables_principales['spip_favoris'] = 57 array('field' => &$spip_favoris, 'key' => &$spip_favoris_key); 58 59 return $tables_principales; 60 } 61 62 /** 13 63 * Insertion dans le pipeline insert_head_css 14 * 64 * 65 * @pipeline insert_head_css 15 66 * @param string $flux Le contenu CSS du head 16 67 * @param string $flux Le contenu CSS du head modifié
Note: See TracChangeset
for help on using the changeset viewer.