|
|
|
@ -31,8 +31,8 @@ function sites_declarer_tables_interfaces($interfaces) {
|
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['url_article'] = 'url'; |
|
|
|
|
# ne sert plus ? verifier balise_LESAUTEURS |
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['lesauteurs'] = 'lesauteurs'; |
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['url_site'] = array('syndic', 'url_site'); |
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['nom_site'] = array('syndic', 'nom_site'); |
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['url_site'] = ['syndic', 'url_site']; |
|
|
|
|
$interfaces['exceptions_des_tables']['syndic_articles']['nom_site'] = ['syndic', 'nom_site']; |
|
|
|
|
|
|
|
|
|
$interfaces['table_date']['syndication'] = 'date'; |
|
|
|
|
|
|
|
|
@ -42,7 +42,7 @@ function sites_declarer_tables_interfaces($interfaces) {
|
|
|
|
|
|
|
|
|
|
// Articles syndiques : passage des donnees telles quelles, sans traitement typo |
|
|
|
|
// la securite et conformite XHTML de ces champs est assuree par safehtml() |
|
|
|
|
foreach (array('DESCRIPTIF', 'SOURCE', 'URL', 'URL_SOURCE', 'LESAUTEURS', 'TAGS') as $balise) { |
|
|
|
|
foreach (['DESCRIPTIF', 'SOURCE', 'URL', 'URL_SOURCE', 'LESAUTEURS', 'TAGS'] as $balise) { |
|
|
|
|
if (!isset($interfaces['table_des_traitements'][$balise]['syndic_articles'])) { |
|
|
|
|
$interfaces['table_des_traitements'][$balise]['syndic_articles'] = 'safehtml(%s)'; |
|
|
|
|
} else { |
|
|
|
@ -57,10 +57,10 @@ function sites_declarer_tables_interfaces($interfaces) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sites_declarer_tables_objets_sql($tables) { |
|
|
|
|
$tables['spip_syndic'] = array( |
|
|
|
|
'table_objet_surnoms' => array('site'), |
|
|
|
|
$tables['spip_syndic'] = [ |
|
|
|
|
'table_objet_surnoms' => ['site'], |
|
|
|
|
'type' => 'site', |
|
|
|
|
'type_surnoms' => array('syndic'), |
|
|
|
|
'type_surnoms' => ['syndic'], |
|
|
|
|
'texte_retour' => 'icone_retour', |
|
|
|
|
'texte_objets' => 'icone_sites_references', |
|
|
|
|
'texte_objet' => 'sites:icone_site_reference', |
|
|
|
@ -72,52 +72,52 @@ function sites_declarer_tables_objets_sql($tables) {
|
|
|
|
|
'titre' => "nom_site AS titre, '' AS lang", |
|
|
|
|
'date' => 'date', |
|
|
|
|
'principale' => 'oui', |
|
|
|
|
'field' => array( |
|
|
|
|
"id_syndic" => "bigint(21) NOT NULL", |
|
|
|
|
"id_rubrique" => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
"id_secteur" => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
"nom_site" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"url_site" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"url_syndic" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"descriptif" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"maj" => "TIMESTAMP", |
|
|
|
|
"syndication" => "VARCHAR(3) DEFAULT '' NOT NULL", |
|
|
|
|
"statut" => "varchar(10) DEFAULT '0' NOT NULL", |
|
|
|
|
"date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
"date_syndic" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
"date_index" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
"moderation" => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
"miroir" => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
"oubli" => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
"resume" => "VARCHAR(3) DEFAULT 'oui'" |
|
|
|
|
), |
|
|
|
|
'key' => array( |
|
|
|
|
"PRIMARY KEY" => "id_syndic", |
|
|
|
|
"KEY id_rubrique" => "id_rubrique", |
|
|
|
|
"KEY id_secteur" => "id_secteur", |
|
|
|
|
"KEY statut" => "statut, date_syndic", |
|
|
|
|
), |
|
|
|
|
'parent' => array('type' => 'rubrique', 'champ' => 'id_rubrique'), |
|
|
|
|
'join' => array( |
|
|
|
|
"id_syndic" => "id_syndic", |
|
|
|
|
"id_rubrique" => "id_rubrique" |
|
|
|
|
), |
|
|
|
|
'statut' => array( |
|
|
|
|
array('champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop', 'exception' => 'statut') |
|
|
|
|
), |
|
|
|
|
'field' => [ |
|
|
|
|
'id_syndic' => 'bigint(21) NOT NULL', |
|
|
|
|
'id_rubrique' => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
'id_secteur' => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
'nom_site' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'url_site' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'url_syndic' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'descriptif' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'maj' => 'TIMESTAMP', |
|
|
|
|
'syndication' => "VARCHAR(3) DEFAULT '' NOT NULL", |
|
|
|
|
'statut' => "varchar(10) DEFAULT '0' NOT NULL", |
|
|
|
|
'date' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
'date_syndic' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
'date_index' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
'moderation' => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
'miroir' => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
'oubli' => "VARCHAR(3) DEFAULT 'non'", |
|
|
|
|
'resume' => "VARCHAR(3) DEFAULT 'oui'" |
|
|
|
|
], |
|
|
|
|
'key' => [ |
|
|
|
|
'PRIMARY KEY' => 'id_syndic', |
|
|
|
|
'KEY id_rubrique' => 'id_rubrique', |
|
|
|
|
'KEY id_secteur' => 'id_secteur', |
|
|
|
|
'KEY statut' => 'statut, date_syndic', |
|
|
|
|
], |
|
|
|
|
'parent' => ['type' => 'rubrique', 'champ' => 'id_rubrique'], |
|
|
|
|
'join' => [ |
|
|
|
|
'id_syndic' => 'id_syndic', |
|
|
|
|
'id_rubrique' => 'id_rubrique' |
|
|
|
|
], |
|
|
|
|
'statut' => [ |
|
|
|
|
['champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop', 'exception' => 'statut'] |
|
|
|
|
], |
|
|
|
|
'texte_changer_statut' => 'sites:info_statut_site_1', |
|
|
|
|
'statut_textes_instituer' => array( |
|
|
|
|
'statut_textes_instituer' => [ |
|
|
|
|
'prop' => 'texte_statut_propose_evaluation', |
|
|
|
|
'publie' => 'texte_statut_publie', |
|
|
|
|
'refuse' => 'texte_statut_poubelle', |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
'rechercher_champs' => array( |
|
|
|
|
'rechercher_champs' => [ |
|
|
|
|
'nom_site' => 5, |
|
|
|
|
'url_site' => 1, |
|
|
|
|
'descriptif' => 3 |
|
|
|
|
), |
|
|
|
|
'champs_editables' => array( |
|
|
|
|
], |
|
|
|
|
'champs_editables' => [ |
|
|
|
|
'nom_site', |
|
|
|
|
'url_site', |
|
|
|
|
'descriptif', |
|
|
|
@ -127,19 +127,19 @@ function sites_declarer_tables_objets_sql($tables) {
|
|
|
|
|
'miroir', |
|
|
|
|
'oubli', |
|
|
|
|
'resume' |
|
|
|
|
), |
|
|
|
|
'champs_versionnes' => array( |
|
|
|
|
], |
|
|
|
|
'champs_versionnes' => [ |
|
|
|
|
'id_rubrique', |
|
|
|
|
'id_secteur', |
|
|
|
|
'nom_site', |
|
|
|
|
'url_site', |
|
|
|
|
'url_syndic', |
|
|
|
|
'descriptif' |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
], |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
$tables['spip_syndic_articles'] = array( |
|
|
|
|
'table_objet_surnoms' => array('syndic_article'), |
|
|
|
|
$tables['spip_syndic_articles'] = [ |
|
|
|
|
'table_objet_surnoms' => ['syndic_article'], |
|
|
|
|
|
|
|
|
|
'texte_retour' => 'icone_retour', |
|
|
|
|
'texte_objets' => 'sites:icone_articles_syndic', |
|
|
|
@ -158,55 +158,55 @@ function sites_declarer_tables_objets_sql($tables) {
|
|
|
|
|
'date' => 'date', |
|
|
|
|
'editable' => 'non', |
|
|
|
|
'principale' => 'oui', |
|
|
|
|
'field' => array( |
|
|
|
|
"id_syndic_article" => "bigint(21) NOT NULL", |
|
|
|
|
"id_syndic" => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
"titre" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"url" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
"lesauteurs" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"maj" => "TIMESTAMP", |
|
|
|
|
"statut" => "varchar(10) DEFAULT '0' NOT NULL", |
|
|
|
|
"descriptif" => "text DEFAULT '' NOT NULL", |
|
|
|
|
"lang" => "VARCHAR(10) DEFAULT '' NOT NULL", |
|
|
|
|
"url_source" => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
"source" => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
"tags" => "TEXT DEFAULT '' NOT NULL", |
|
|
|
|
"raw_data" => "TEXT DEFAULT '' NOT NULL", |
|
|
|
|
"raw_format" => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
"raw_methode" => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
), |
|
|
|
|
'key' => array( |
|
|
|
|
"PRIMARY KEY" => "id_syndic_article", |
|
|
|
|
"KEY id_syndic" => "id_syndic", |
|
|
|
|
"KEY statut" => "statut", |
|
|
|
|
"KEY url" => "url(255)" |
|
|
|
|
), |
|
|
|
|
'join' => array( |
|
|
|
|
"id_syndic_article" => "id_syndic_article", |
|
|
|
|
"id_syndic" => "id_syndic" |
|
|
|
|
), |
|
|
|
|
'statut' => array( |
|
|
|
|
array('champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop', 'exception' => 'statut'), |
|
|
|
|
array( |
|
|
|
|
'champ' => array(array('spip_syndic', 'id_syndic'), 'statut'), |
|
|
|
|
'field' => [ |
|
|
|
|
'id_syndic_article' => 'bigint(21) NOT NULL', |
|
|
|
|
'id_syndic' => "bigint(21) DEFAULT '0' NOT NULL", |
|
|
|
|
'titre' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'url' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'date' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", |
|
|
|
|
'lesauteurs' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'maj' => 'TIMESTAMP', |
|
|
|
|
'statut' => "varchar(10) DEFAULT '0' NOT NULL", |
|
|
|
|
'descriptif' => "text DEFAULT '' NOT NULL", |
|
|
|
|
'lang' => "VARCHAR(10) DEFAULT '' NOT NULL", |
|
|
|
|
'url_source' => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
'source' => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
'tags' => "TEXT DEFAULT '' NOT NULL", |
|
|
|
|
'raw_data' => "TEXT DEFAULT '' NOT NULL", |
|
|
|
|
'raw_format' => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
'raw_methode' => "TINYTEXT DEFAULT '' NOT NULL", |
|
|
|
|
], |
|
|
|
|
'key' => [ |
|
|
|
|
'PRIMARY KEY' => 'id_syndic_article', |
|
|
|
|
'KEY id_syndic' => 'id_syndic', |
|
|
|
|
'KEY statut' => 'statut', |
|
|
|
|
'KEY url' => 'url(255)' |
|
|
|
|
], |
|
|
|
|
'join' => [ |
|
|
|
|
'id_syndic_article' => 'id_syndic_article', |
|
|
|
|
'id_syndic' => 'id_syndic' |
|
|
|
|
], |
|
|
|
|
'statut' => [ |
|
|
|
|
['champ' => 'statut', 'publie' => 'publie', 'previsu' => 'publie,prop', 'exception' => 'statut'], |
|
|
|
|
[ |
|
|
|
|
'champ' => [['spip_syndic', 'id_syndic'], 'statut'], |
|
|
|
|
'publie' => 'publie', |
|
|
|
|
'previsu' => 'publie,prop', |
|
|
|
|
'exception' => 'statut' |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
'statut_images' => array( |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
'statut_images' => [ |
|
|
|
|
'puce-rouge-anim-xx.svg', |
|
|
|
|
'publie' => 'puce-publier-8.png', |
|
|
|
|
'refuse' => 'puce-supprimer-8.png', |
|
|
|
|
'dispo' => 'puce-proposer-8.png', |
|
|
|
|
'off' => 'puce-refuser-8.png', |
|
|
|
|
), |
|
|
|
|
'rechercher_champs' => array( |
|
|
|
|
], |
|
|
|
|
'rechercher_champs' => [ |
|
|
|
|
'titre' => 5, |
|
|
|
|
'descriptif' => 1 |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
] |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
return $tables; |
|
|
|
|
} |
|
|
|
|