Browse Source

AUTO_INCREMENT sur les id

master
cyp@rouquin.me 7 years ago
parent
commit
877f68a928
  1. 6
      base/infographies.php
  2. 3
      formulaires/editer_infographies_data.php
  3. 4
      infographies_administrations.php
  4. 2
      paquet.xml

6
base/infographies.php

@ -62,7 +62,7 @@ function infographies_declarer_tables_objets_sql($tables){
'editable' => 'oui',
'texte_changer_statut' => 'infographie:texte_infographie_statut',
'field' => array(
"id_infographie" => "bigint(21) NOT NULL",
"id_infographie" => "bigint(21) NOT NULL AUTO_INCREMENT",
"titre" => "varchar(255) NOT NULL DEFAULT ''",
"texte" => "longtext DEFAULT '' NOT NULL",
"credits" => "text DEFAULT '' NOT NULL",
@ -117,7 +117,7 @@ function infographies_declarer_tables_objets_sql($tables){
'type' => 'infographies_data',
'principale' => 'non',
'field' => array(
"id_infographies_data" => "bigint(21) NOT NULL",
"id_infographies_data" => "bigint(21) NOT NULL AUTO_INCREMENT",
"titre" => "varchar(255) NOT NULL DEFAULT ''",
"texte" => "longtext DEFAULT '' NOT NULL",
"credits" => "text DEFAULT '' NOT NULL",
@ -149,7 +149,7 @@ function infographies_declarer_tables_objets_sql($tables){
'type' => 'infographies_donnee',
'principale' => 'non',
'field' => array(
"id_infographies_donnee" => "bigint(21) NOT NULL",
"id_infographies_donnee" => "bigint(21) NOT NULL AUTO_INCREMENT",
"id_infographies_data" => "bigint(21) NOT NULL",
"rang" => "int NOT NULL DEFAULT 0",
"axe_x" => "varchar(255) NOT NULL DEFAULT ''",

3
formulaires/editer_infographies_data.php

@ -39,6 +39,7 @@ function formulaires_editer_infographies_data_verifier_dist($id_infographies_dat
// http://doc.spip.org/@inc_editer_infographies_data_dist
function formulaires_editer_infographies_data_traiter_dist($id_infographies_data='new', $retour='',$associer_objet='', $lier_trad=0, $config_fonc='infographies_datas_edit_config', $row=array(), $hidden=''){
$res = formulaires_editer_objet_traiter('infographies_data',$id_infographies_data,0,$lier_trad,$retour,$config_fonc,$row,$hidden);
// Un lien auteur a prendre en compte ?
@ -51,7 +52,7 @@ function formulaires_editer_infographies_data_traiter_dist($id_infographies_data
include_spip('action/editer_infographies_data');
infographies_data_associer($id_infographies_data, array($objet => $id_objet));
if (isset($res['redirect']))
$res['redirect'] = parametre_url ($res['redirect'], "id_lien_ajoute", $id_infographies_data, '&');
$res['redirect'] = parametre_url($res['redirect'], "id_lien_ajoute", $id_infographies_data, '&');
}
}

4
infographies_administrations.php

@ -23,6 +23,10 @@ function infographies_upgrade($nom_meta_base_version,$version_cible){
array('maj_tables',array('spip_infographies_datas'))
);
$maj['0.1.1'] = array(
array('maj_tables',array('spip_infographies_datas'))
);
include_spip('base/upgrade');
maj_plugin($nom_meta_base_version, $version_cible, $maj);
}

2
paquet.xml

@ -5,7 +5,7 @@
etat="dev"
logo="prive/themes/spip/images/infographie-64.png"
compatibilite="[3.0.0;3.0.*]"
schema="0.1.0"
schema="0.1.1"
>
<nom>Infographies</nom>

Loading…
Cancel
Save