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