renomme spip_aut_mods en spip_aut_modeles
This commit is contained in:
parent
3e8561ce8f
commit
75efda4b08
4 changed files with 18 additions and 18 deletions
|
@ -26,8 +26,8 @@ if (!defined('_ECRIRE_INC_VERSION')) {
|
|||
function auted_upgrade($nom_meta_base_version, $version_cible) {
|
||||
$maj = array();
|
||||
|
||||
$maj['create'] = array(array('maj_tables', array('spip_aut_mods','spip_auteurs')));
|
||||
$maj['1.0.2'] = array(array('maj_tables', array('spip_aut_mods','spip_auteurs')));
|
||||
$maj['create'] = array(array('maj_tables', array('spip_aut_modeles','spip_auteurs')));
|
||||
$maj['1.0.3'] = array(array('maj_tables', array('spip_aut_modeles','spip_auteurs')));
|
||||
|
||||
include_spip('base/upgrade');
|
||||
maj_plugin($nom_meta_base_version, $version_cible, $maj);
|
||||
|
|
|
@ -25,7 +25,7 @@ if (!defined('_ECRIRE_INC_VERSION')) {
|
|||
*/
|
||||
function auted_declarer_tables_interfaces($interfaces) {
|
||||
|
||||
$interfaces['table_des_tables']['aut_mods'] = 'aut_mods';
|
||||
$interfaces['table_des_tables']['aut_modeles'] = 'aut_modeles';
|
||||
|
||||
return $interfaces;
|
||||
}
|
||||
|
@ -42,19 +42,19 @@ function auted_declarer_tables_interfaces($interfaces) {
|
|||
*/
|
||||
function auted_declarer_tables_objets_sql($tables) {
|
||||
|
||||
$tables['spip_aut_mods'] = array(
|
||||
'type' => 'aut_mod',
|
||||
'principale' => 'oui',
|
||||
'table_objet_surnoms' => array('autmod'), // table_objet('aut_mod') => 'aut_mods'
|
||||
$tables['spip_aut_modeles'] = array(
|
||||
'type' => 'aut_modele',
|
||||
'principale' => 'oui',
|
||||
'table_objet_surnoms' => array('autmodele'),
|
||||
'field'=> array(
|
||||
'id_aut_mod' => 'bigint(21) NOT NULL',
|
||||
'nom' => 'varchar(55) NOT NULL DEFAULT ""',
|
||||
'modele' => 'text NOT NULL DEFAULT ""',
|
||||
'statut' => 'varchar(20) DEFAULT "0" NOT NULL',
|
||||
'maj' => 'TIMESTAMP'
|
||||
'id_aut_modele' => 'bigint(21) NOT NULL',
|
||||
'nom' => 'varchar(55) NOT NULL DEFAULT ""',
|
||||
'modele' => 'text NOT NULL DEFAULT ""',
|
||||
'statut' => 'varchar(20) DEFAULT "0" NOT NULL',
|
||||
'maj' => 'TIMESTAMP'
|
||||
),
|
||||
'key' => array(
|
||||
'PRIMARY KEY' => 'id_aut_mod',
|
||||
'PRIMARY KEY' => 'id_aut_modele',
|
||||
'KEY statut' => 'statut',
|
||||
),
|
||||
'titre' => 'nom AS titre, "" AS lang',
|
||||
|
|
|
@ -43,11 +43,11 @@ function formulaires_editer_autorisations_traiter_dist($id_auteur=0, $redirect='
|
|||
'modele' => json_encode($Tautorisations),
|
||||
'statut' => 'publie'
|
||||
];
|
||||
$id_aut_modele = sql_getfetsel('id_aut_mod', 'spip_aut_mods', 'nom='.sql_quote($nom_modele));
|
||||
$id_aut_modele = sql_getfetsel('id_aut_modele', 'spip_aut_modeles', 'nom='.sql_quote($nom_modele));
|
||||
if (intval($id_aut_modele)) {
|
||||
sql_updateq('spip_aut_mods', $aut_modele, 'id_aut_mod='.intval($id_aut_modele));
|
||||
sql_updateq('spip_aut_modeles', $aut_modele, 'id_aut_modele='.intval($id_aut_modele));
|
||||
} else {
|
||||
sql_insertq('spip_aut_mods', $aut_modele);
|
||||
sql_insertq('spip_aut_modeles', $aut_modele);
|
||||
}
|
||||
$set['aut_modele'] = $nom_modele;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<paquet
|
||||
prefix="auted"
|
||||
categorie="outil"
|
||||
version="1.0.2"
|
||||
version="1.0.3"
|
||||
etat="dev"
|
||||
compatibilite="[3.2.0-dev;3.3.*]"
|
||||
logo="prive/themes/spip/images/auted-64.png"
|
||||
documentation=""
|
||||
schema="1.0.2"
|
||||
schema="1.0.3"
|
||||
>
|
||||
<!--
|
||||
Paquet généré le 2020-02-10 11:18:59
|
||||
|
|
Loading…
Add table
Reference in a new issue