diff --git a/base/gamucontact.php b/base/gamucontact.php new file mode 100644 index 0000000..ac36a5e --- /dev/null +++ b/base/gamucontact.php @@ -0,0 +1,58 @@ + 'oui', + 'field'=> [ + 'id_message' => 'bigint(21) NOT NULL', + 'titre' => 'text NOT NULL', + 'objet' => "varchar(255) NOT NULL", + 'texte' => 'longtext NOT NULL', + 'nom' => "varchar(255) NOT NULL", + 'telephone' => "varchar(55) NOT NULL", + 'email_contact' => "varchar(255) NOT NULL", + 'type' => "varchar(6) NOT NULL DEFAULT ''", + 'date_heure' => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", + 'date_fin' => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", + 'rv' => "varchar(3) NOT NULL DEFAULT ''", + 'statut' => "varchar(6) NOT NULL DEFAULT '0'", + 'id_auteur' => "bigint(21) NOT NULL DEFAULT '0'", + 'destinataires' => 'text NOT NULL', + 'maj' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', + ], + 'key' => array( + 'PRIMARY KEY' => 'id_message', + 'KEY statut' => 'statut', + 'KEY id_auteur' => 'id_auteur', + ) + ]; + + return $tables; +} + diff --git a/gamucontact_administrations.php b/gamucontact_administrations.php index aac1dea..65acf43 100644 --- a/gamucontact_administrations.php +++ b/gamucontact_administrations.php @@ -27,7 +27,7 @@ function gamucontact_upgrade($nom_meta_base_version, $version_cible) { $maj = array(); $maj['create'] = array(array('maj_tables', array('spip_messages'))); - $maj['1.0.4'] = array(array('maj_tables', array('spip_messages'))); + $maj['1.0.5'] = array(array('maj_tables', array('spip_messages'))); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); diff --git a/gamucontact_autorisations.php b/gamucontact_autorisations.php index 742d67f..f908285 100644 --- a/gamucontact_autorisations.php +++ b/gamucontact_autorisations.php @@ -2,7 +2,6 @@ /** * Définit les autorisations du plugin GamuContact * -zsh:1: command not found: qa * @copyright 2021 * @author tofulm * @licence GNU/GPL diff --git a/gamucontact_options.php b/gamucontact_options.php index f708efc..452b3ee 100644 --- a/gamucontact_options.php +++ b/gamucontact_options.php @@ -57,13 +57,3 @@ $GLOBALS['gamucontact'] = [ ], ]; - -function gamucontact_declarer_tables_objets_sql($tables) { - - $tables['spip_messages']['field']['telephone'] = "varchar(55) NOT NULL"; - $tables['spip_messages']['field']['nom'] = "varchar(255) NOT NULL"; - $tables['spip_messages']['field']['objet'] = "varchar(255) NOT NULL"; - $tables['spip_messages']['field']['email_contact'] = "varchar(255) NOT NULL"; - - return $tables; -} diff --git a/modeles/gamucontact_message.html b/modeles/gamucontact_message.html index 7f549f2..355b78a 100644 --- a/modeles/gamucontact_message.html +++ b/modeles/gamucontact_message.html @@ -10,8 +10,8 @@ []

-

<:gamucontact:formulaire_contact:>

- +

#NOM_SITE_SPIP : <:gamucontact:formulaire_contact:>

+
[<:gamucontact:nom:> : (#NOM)
] [<:gamucontact:email:> : (#EMAIL_CONTACT)
] diff --git a/paquet.xml b/paquet.xml index 0805414..98bf04c 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,12 +1,12 @@ GamuContact @@ -20,7 +20,7 @@ - - + +