Server : Apache System : Linux ks5.tuic.fr 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 User : pragmatice ( 1003) PHP Version : 8.2.24 Disable Function : NONE Directory : /home/pragmatice/public_html/lesite/plugins/breves/base/ |
<?php /***************************************************************************\ * SPIP, Système de publication pour l'internet * * * * Copyright © avec tendresse depuis 2001 * * Arnaud Martin, Antoine Pitrou, Philippe Rivière, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribué sous licence GNU/GPL. * * Pour plus de détails voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ /** * Déclarations relatives à la base de données * * @package SPIP\Breves\Pipelines **/ if (!defined('_ECRIRE_INC_VERSION')) { return; } /** * Déclare les alias de boucle et traitements automatiques de certaines balises * * @pipeline declarer_tables_interfaces * @param array $interfaces * Déclarations d'interface pour le compilateur * @return array * Déclarations d'interface pour le compilateur */ function breves_declarer_tables_interfaces($interfaces) { $interfaces['table_des_tables']['breves'] = 'breves'; $interfaces['exceptions_des_tables']['breves']['id_secteur'] = 'id_rubrique'; $interfaces['exceptions_des_tables']['breves']['date'] = 'date_heure'; $interfaces['exceptions_des_tables']['breves']['nom_site'] = 'lien_titre'; $interfaces['exceptions_des_tables']['breves']['url_site'] = 'lien_url'; $interfaces['table_des_traitements']['LIEN_TITRE'][] = _TRAITEMENT_TYPO; $interfaces['table_des_traitements']['LIEN_URL'][] = 'vider_url(%s)'; return $interfaces; } /** * Déclarer l'objet éditorial de brèves * * @pipeline declarer_tables_objets_sql * @param array $tables * Description des tables * @return array * Description complétée des tables */ function breves_declarer_tables_objets_sql($tables) { $tables['spip_breves'] = [ 'texte_retour' => 'icone_retour', 'texte_objets' => 'breves:breves', 'texte_objet' => 'breves:breve', 'texte_modifier' => 'breves:icone_modifier_breve', 'texte_creer' => 'breves:icone_nouvelle_breve', 'info_aucun_objet' => 'breves:info_aucun_breve', 'info_1_objet' => 'breves:info_1_breve', 'info_nb_objets' => 'breves:info_nb_breves', 'texte_logo_objet' => 'breves:logo_breve', 'texte_langue_objet' => 'breves:titre_langue_breve', 'titre' => 'titre, lang', 'date' => 'date_heure', 'principale' => 'oui', 'introduction_longueur' => '300', 'field' => [ 'id_breve' => 'bigint(21) NOT NULL', 'date_heure' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", 'titre' => "text DEFAULT '' NOT NULL", 'texte' => "longtext DEFAULT '' NOT NULL", 'lien_titre' => "text DEFAULT '' NOT NULL", 'lien_url' => "text DEFAULT '' NOT NULL", 'statut' => "varchar(6) DEFAULT '0' NOT NULL", 'id_rubrique' => "bigint(21) DEFAULT '0' NOT NULL", 'lang' => "VARCHAR(10) DEFAULT '' NOT NULL", 'langue_choisie' => "VARCHAR(3) DEFAULT 'non'", 'maj' => 'TIMESTAMP' ], 'key' => [ 'PRIMARY KEY' => 'id_breve', 'KEY id_rubrique' => 'id_rubrique', ], 'parent' => ['type' => 'rubrique', 'champ' => 'id_rubrique'], 'join' => [ 'id_breve' => 'id_breve', 'id_rubrique' => 'id_rubrique' ], 'statut' => [ [ 'champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop', 'exception' => 'statut' ] ], 'texte_changer_statut' => 'breves:entree_breve_publiee', 'aide_changer_statut' => 'brevesstatut', 'statut_titres' => [ 'prop' => 'breves:titre_breve_proposee', 'publie' => 'breves:titre_breve_publiee', 'refuse' => 'breves:titre_breve_refusee', ], 'statut_textes_instituer' => [ 'prop' => 'breves:item_breve_proposee', //_T('texte_statut_propose_evaluation') 'publie' => 'breves:item_breve_validee', //_T('texte_statut_publie') 'refuse' => 'breves:item_breve_refusee', //_T('texte_statut_refuse') ], 'rechercher_champs' => [ 'titre' => 8, 'texte' => 2, 'lien_titre' => 1, 'lien_url' => 1 ], 'rechercher_jointures' => [ 'document' => ['titre' => 2, 'descriptif' => 1] ], 'champs_editables' => [ 'id_rubrique', 'titre', 'lien_titre', 'lien_url', 'texte', ], 'champs_versionnes' => [ 'id_rubrique', 'titre', 'lien_titre', 'lien_url', 'texte', ], ]; return $tables; }