+++ /dev/null
-<?php
-/**
- * Déclarations relatives à la base de données
- *
- * @plugin Souscription
- * @copyright 2013
- * @author Olivier Tétard
- * @licence GNU/GPL
- * @package SPIP\Souscription\Pipelines
- */
-
-if (!defined('_ECRIRE_INC_VERSION')) return;
-
-
-/**
- * Déclaration des alias de tables et filtres automatiques de champs
- *
- * @pipeline declarer_tables_interfaces
- * @param array $interfaces
- * Déclarations d'interface pour le compilateur
- * @return array
- * Déclarations d'interface pour le compilateur
- */
-function souscription_declarer_tables_interfaces($interfaces) {
-
- $interfaces['table_des_tables']['souscription_dons'] = 'souscription_dons';
-
- return $interfaces;
-}
-
-
-/**
- * Déclaration des objets éditoriaux
- *
- * @pipeline declarer_tables_objets_sql
- * @param array $tables
- * Description des tables
- * @return array
- * Description complétée des tables
- */
-function souscription_declarer_tables_objets_sql($tables) {
-
- $tables['spip_souscription_dons'] =
- array(
- 'type' => 'souscription_don',
- 'principale' => "oui",
- 'table_objet_surnoms' => array('souscriptiondon'), // table_objet('souscription_don') => 'souscription_dons'
- 'field'=> array("id_souscription_don" => "bigint(21) NOT NULL",
- "id_transaction" => "bigint(21) NOT NULL DEFAULT 0",
- "montant" => "int(11) NOT NULL DEFAULT 0",
- "courriel" => "text NOT NULL DEFAULT ''",
- "nom" => "text NOT NULL DEFAULT ''",
- "prenom" => "text NOT NULL DEFAULT ''",
- "code_postal" => "text NOT NULL DEFAULT ''",
- "adresse" => "text NOT NULL DEFAULT ''",
- "ville" => "text NOT NULL DEFAULT ''",
- "recu_fiscal" => "int(1) NOT NULL DEFAULT 0",
- "envoyer_info" => "int(2) NOT NULL DEFAULT 0",
- /* "statut" => "varchar(255) DEFAULT '0' NOT NULL COLLATE NOCASE", */
- "date_souscription " => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'",
- "maj" => "TIMESTAMP"
- ),
- 'key' => array("PRIMARY KEY" => "id_souscription_don",
- ),
- 'titre' => "nom AS titre, '' AS lang",
- 'date' => "date_souscription",
- 'champs_editables' => array('montant', 'courriel', 'nom', 'prenom', 'code_postal', 'adresse', 'ville', 'recu_fiscal', 'envoyer_info'),
- 'champs_versionnes' => array('montant', 'courriel', 'nom', 'prenom', 'code_postal', 'adresse', 'ville', 'recu_fiscal', 'envoyer_info'),
- 'rechercher_champs' => array(),
- 'tables_jointures' => array('spip_transactions' => 'id_transaction'),
- );
-
- return $tables;
-}
-
-
-/* /\** */
-/* * Déclaration des tables secondaires (liaisons) */
-/* * */
-/* * @pipeline declarer_tables_auxiliaires */
-/* * @param array $tables */
-/* * Description des tables */
-/* * @return array */
-/* * Description complétée des tables */
-/* *\/ */
-/* function souscription_declarer_tables_auxiliaires($tables) { */
-
-/* $tables['spip_souscription_dons_liens'] = */
-/* array( */
-/* 'field' => array("id_souscription_don" => "bigint(21) DEFAULT '0' NOT NULL", */
-/* "id_objet" => "bigint(21) DEFAULT '0' NOT NULL", */
-/* "objet" => "VARCHAR(25) DEFAULT '' NOT NULL", */
-/* "vu" => "VARCHAR(6) DEFAULT 'non' NOT NULL" */
-/* ), */
-/* 'key' => array("PRIMARY KEY" => "id_souscription_don,id_objet,objet", */
-/* "KEY id_souscription_don" => "id_souscription_don" */
-/* ) */
-/* ); */
-
-/* return $tables; */
-/* } */
-?>