Changeset 125417 in spip-zone for _plugins_/zotspip/branches/declarer_tables_objets_sql/base/zotspip.php
- Timestamp:
- Aug 25, 2020, 6:49:40 PM (5 months ago)
- Location:
- _plugins_/zotspip/branches/declarer_tables_objets_sql
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/zotspip/branches/declarer_tables_objets_sql/base/zotspip.php
r75288 r125417 1 1 <?php 2 2 3 // Sécurité 4 if (!defined("_ECRIRE_INC_VERSION")) return; 3 if (!defined('_ECRIRE_INC_VERSION')) { 4 return; 5 } 5 6 6 7 function zotspip_declarer_tables_interfaces($interface){ … … 22 23 } 23 24 24 function zotspip_declarer_tables_ principales($tables_principales){25 function zotspip_declarer_tables_objets_sql($tables){ 25 26 //-- Table zitems ----------------------------------------------------------- 26 $zitems = array( 27 "id_zitem" => "varchar(16) DEFAULT '' NOT NULL", 28 "id_parent" => "varchar(16) DEFAULT '' NOT NULL", 29 "type_ref" => "varchar(255) DEFAULT '' NOT NULL", 30 "annee" => "smallint(6)", 31 "titre" => "text DEFAULT '' NOT NULL", 32 "auteurs" => "text DEFAULT '' NOT NULL", 33 "resume" => "mediumtext DEFAULT '' NOT NULL", 34 "date" => "varchar(255) DEFAULT '' NOT NULL", 35 "pages" => "varchar(255) DEFAULT '' NOT NULL", 36 "publication" => "text DEFAULT '' NOT NULL", 37 "editeur" => "text DEFAULT '' NOT NULL", 38 "collection" => "varchar(255) DEFAULT '' NOT NULL", 39 "conference" => "text DEFAULT '' NOT NULL", 40 "type_doc" => "text DEFAULT '' NOT NULL", 41 "volume" => "varchar(255) DEFAULT '' NOT NULL", 42 "numero" => "varchar(255) DEFAULT '' NOT NULL", 43 "doi" => "varchar(255) DEFAULT '' NOT NULL", 44 "isbn" => "varchar(255) DEFAULT '' NOT NULL", 45 "issn" => "varchar(255) DEFAULT '' NOT NULL", 46 "url" => "text DEFAULT '' NOT NULL", 47 "extras" => "text DEFAULT '' NOT NULL", 48 "mimetype" => "varchar(255) DEFAULT '' NOT NULL", 49 "poids" => "bigint", 50 "fichier" => "text DEFAULT '' NOT NULL", 51 "json" => "mediumtext DEFAULT '' NOT NULL", 52 "csljson" => "mediumtext DEFAULT '' NOT NULL", 53 "updated" => "varchar(50) DEFAULT '' NOT NULL", 54 "date_ajout"=> "varchar(50) DEFAULT '' NOT NULL" 27 $tables['spip_zitems'] = array( 28 'type' => 'zitem', 29 'principale' => 'oui', 30 'texte_objet' => 'zotero:zitem_singulier', 31 'texte_objets' => 'zotero:zitem_pluriel', 32 'icone_objet' => 'zotero', 33 'field' => array( 34 "id_zitem" => "varchar(16) DEFAULT '' NOT NULL", 35 "id_parent" => "varchar(16) DEFAULT '' NOT NULL", 36 "type_ref" => "varchar(255) DEFAULT '' NOT NULL", 37 "annee" => "smallint(6)", 38 "titre" => "text DEFAULT '' NOT NULL", 39 "auteurs" => "text DEFAULT '' NOT NULL", 40 "resume" => "mediumtext DEFAULT '' NOT NULL", 41 "date" => "varchar(255) DEFAULT '' NOT NULL", 42 "pages" => "varchar(255) DEFAULT '' NOT NULL", 43 "publication" => "text DEFAULT '' NOT NULL", 44 "editeur" => "text DEFAULT '' NOT NULL", 45 "collection" => "varchar(255) DEFAULT '' NOT NULL", 46 "conference" => "text DEFAULT '' NOT NULL", 47 "type_doc" => "text DEFAULT '' NOT NULL", 48 "volume" => "varchar(255) DEFAULT '' NOT NULL", 49 "numero" => "varchar(255) DEFAULT '' NOT NULL", 50 "doi" => "varchar(255) DEFAULT '' NOT NULL", 51 "isbn" => "varchar(255) DEFAULT '' NOT NULL", 52 "issn" => "varchar(255) DEFAULT '' NOT NULL", 53 "url" => "text DEFAULT '' NOT NULL", 54 "extras" => "text DEFAULT '' NOT NULL", 55 "mimetype" => "varchar(255) DEFAULT '' NOT NULL", 56 "poids" => "bigint", 57 "fichier" => "text DEFAULT '' NOT NULL", 58 "json" => "mediumtext DEFAULT '' NOT NULL", 59 "csljson" => "mediumtext DEFAULT '' NOT NULL", 60 "updated" => "varchar(50) DEFAULT '' NOT NULL", 61 "date_ajout"=> "varchar(50) DEFAULT '' NOT NULL" 62 ), 63 'key' => array( 64 "PRIMARY KEY" => "id_zitem", 65 "KEY id_parent" => "id_parent" 66 ) 55 67 ); 56 57 $zitems_cles = array( 58 "PRIMARY KEY" => "id_zitem", 59 "KEY id_parent" => "id_parent" 60 ); 61 62 $tables_principales['spip_zitems'] = array( 63 'field' => &$zitems, 64 'key' => &$zitems_cles 65 ); 66 68 return $tables; 69 } 70 71 function zotspip_declarer_tables_auxiliaires($tables_auxiliaires){ 67 72 //-- Table zcollections ----------------------------------------------------------- 68 73 $zcollections = array( … … 78 83 ); 79 84 80 $tables_ principales['spip_zcollections'] = array(85 $tables_auxiliaires['spip_zcollections'] = array( 81 86 'field' => &$zcollections, 82 87 'key' => &$zcollections_cles … … 96 101 ); 97 102 98 $tables_ principales['spip_zcreators'] = array(103 $tables_auxiliaires['spip_zcreators'] = array( 99 104 'field' => &$zcreators, 100 105 'key' => &$zcreators_cles … … 112 117 ); 113 118 114 $tables_ principales['spip_ztags'] = array(119 $tables_auxiliaires['spip_ztags'] = array( 115 120 'field' => &$ztags, 116 121 'key' => &$ztags_cles 117 122 ); 118 119 return $tables_principales;120 }121 122 function zotspip_declarer_tables_auxiliaires($tables_auxiliaires){123 123 //-- Table zitems_zcollections ----------------------------------------------------------- 124 124 $zitems_zcollections = array( … … 139 139 return $tables_auxiliaires; 140 140 } 141 142 143 ?>
Note: See TracChangeset
for help on using the changeset viewer.