etre capable de recalculer la chaine. on passe en fonction la creation d'une chaine et d'une blochaine
65 lines
1.6 KiB
PHP
Executable file
65 lines
1.6 KiB
PHP
Executable file
<?php
|
|
/**
|
|
* Déclarations relatives à la base de données
|
|
*
|
|
* @plugin Block Log
|
|
* @copyright 2019
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Blocklog\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 blocklog_declarer_tables_interfaces($interfaces) {
|
|
|
|
$interfaces['table_des_tables']['blocklogs'] = 'blocklogs';
|
|
|
|
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 blocklog_declarer_tables_objets_sql($tables) {
|
|
|
|
$tables['spip_blocklogs'] = array(
|
|
'type' => 'blocklog',
|
|
'principale' => 'oui',
|
|
'field'=> array(
|
|
'id_blocklog' => 'bigint(21) NOT NULL',
|
|
'id_objet' => 'bigint(21) DEFAULT "0" NOT NULL',
|
|
'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL',
|
|
'num' => 'bigint(21) NOT NULL DEFAULT 0',
|
|
'blockchaine' => 'text NOT NULL DEFAULT ""',
|
|
'chaine' => 'text NOT NULL DEFAULT ""',
|
|
'requete' => 'text NOT NULL DEFAULT ""',
|
|
'maj' => 'TIMESTAMP'
|
|
),
|
|
'key' => array(
|
|
'PRIMARY KEY' => 'id_blocklog',
|
|
),
|
|
'champs_editables' => array('num', 'blockchaine', 'chaine','id_objet', 'objet', 'requete'),
|
|
);
|
|
|
|
return $tables;
|
|
}
|