Changeset 90167 in spip-zone
- Timestamp:
- Jun 13, 2015, 5:24:53 PM (6 years ago)
- Location:
- _plugins_/reservation_evenement/trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/reservation_evenement/trunk/base/reservation_evenement.php
r89191 r90167 11 11 12 12 if (!defined('_ECRIRE_INC_VERSION')) 13 13 return; 14 14 15 15 /** … … 24 24 function reservation_evenement_declarer_tables_interfaces($interfaces) { 25 25 26 27 28 29 26 $interfaces['table_des_tables']['reservations'] = 'reservations'; 27 $interfaces['table_des_tables']['reservations_details'] = 'reservations_details'; 28 29 return $interfaces; 30 30 } 31 31 … … 40 40 */ 41 41 function reservation_evenement_declarer_tables_objets_sql($tables) { 42 43 $tables['spip_reservations'] = array( 44 'type' => 'reservation', 45 'principale' => "oui", 46 'field' => array( 47 "id_reservation" => "bigint(21) NOT NULL", 48 "id_auteur" => "bigint(21) NOT NULL DEFAULT '0'", 49 "reference" => "varchar(255) NOT NULL DEFAULT ''", 50 "date_paiement" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 51 "type_paiement" => "varchar(50) NOT NULL DEFAULT ''", 52 "nom" => "varchar(255) NOT NULL DEFAULT ''", 53 "email" => "varchar(255) NOT NULL DEFAULT ''", 54 "maj" => "timestamp", 55 "donnees_auteur" => "text NOT NULL DEFAULT ''", 56 "date" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 57 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 58 "lang" => "varchar(10) DEFAULT '' NOT NULL", 59 "maj" => "TIMESTAMP" 60 ), 61 'key' => array( 62 "PRIMARY KEY" => "id_reservation", 63 "KEY statut" => "statut,id_auteur,lang", 64 ), 65 'titre' => "reference AS titre, '' AS lang", 66 'date' => "date", 67 'champs_editables' => array( 68 'id_auteur', 69 'date_paiement', 70 'nom', 71 'email', 72 'donnees_auteur', 73 'reference', 74 'lang' 75 ), 76 'champs_versionnes' => array( 77 'id_auteur', 78 'date_paiement', 79 'nom', 80 'email', 81 'donnees_auteur', 82 'reference' 83 ), 84 'rechercher_champs' => array( 85 "reference" => 8, 86 "id_reservation" => 8 87 ), 88 'tables_jointures' => array( 89 'id_reservation', 90 'id_auteur' 91 ), 92 'statut_textes_instituer' => array( 93 'attente' => 'reservation:texte_statut_attente', 94 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 95 'accepte' => 'reservation:texte_statut_accepte', 96 'cloture' => 'reservation:texte_statut_cloture', 97 'encours' => 'reservation:texte_statut_encours', 98 'refuse' => 'reservation:texte_statut_refuse', 99 'poubelle' => 'reservation:texte_statut_poubelle', 100 ), 101 'statut_images' => array( 102 'attente' => 'puce-reservation-attente-16.png', 103 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 104 'accepte' => 'puce-reservation-accepte-16.png', 105 'cloture' => 'puce-reservation-cloture-16.png', 106 'encours' => 'puce-reservation-encours-16.png', 107 'refuse' => 'puce-reservation-refuse-16.png', 108 'poubelle' => 'puce-reservation-poubelle-16.png', 109 ), 110 'statut' => array( array( 111 'champ' => 'statut', 112 'publie' => 'accepte,cloture', 113 'previsu' => 'accepte,attente,attente_paiement', 114 'post_date' => 'date', 115 'exception' => array( 116 'statut', 117 'tout' 118 ) 119 )), 120 'texte_changer_statut' => 'reservation:texte_changer_statut_reservation', 121 ); 122 123 $tables['spip_reservations_details'] = array( 124 'type' => 'reservations_detail', 125 'principale' => "oui", 126 'table_objet_surnoms' => array('reservationsdetail'), // table_objet('reservations_detail') => 'reservations_details' 127 'field' => array( 128 "id_reservations_detail" => "bigint(21) NOT NULL", 129 "id_reservation" => "bigint(21) NOT NULL DEFAULT '0'", 130 "id_evenement" => "bigint(21) NOT NULL DEFAULT '0'", 131 "descriptif" => "text NOT NULL", 132 "quantite" => "int(11) NOT NULL DEFAULT '1'", 133 "prix_ht" => "float NOT NULL DEFAULT '0'", 134 "prix" => "float NOT NULL DEFAULT '0'", 135 "taxe" => "decimal(4,3) NOT NULL DEFAULT '0.000'", 136 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 137 "maj" => "TIMESTAMP" 138 ), 139 'key' => array( 140 "PRIMARY KEY" => "id_reservations_detail", 141 "KEY statut" => "statut,id_reservation,id_evenement", 142 ), 143 'titre' => "descriptif AS titre, '' AS lang", 144 #'date' => "", 145 'champs_editables' => array( 146 'id_reservation', 147 'id_evenement', 148 'descriptif', 149 'quantite', 150 'prix_ht', 151 'prix', 152 'taxe' 153 ), 154 'champs_versionnes' => array(), 155 'rechercher_champs' => array(), 156 'tables_jointures' => array( 157 'id_evenement', 158 'id_reservation' 159 ), 160 'statut_textes_instituer' => array( 161 'attente' => 'reservation:texte_statut_attente', 162 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 163 'accepte' => 'reservation:texte_statut_accepte', 164 'cloture' => 'reservation:texte_statut_cloture', 165 'refuse' => 'reservation:texte_statut_refuse', 166 'poubelle' => 'reservation:texte_statut_poubelle', 167 ), 168 'statut_images' => array( 169 'attente' => 'puce-reservation-attente-16.png', 170 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 171 'accepte' => 'puce-reservation-accepte-16.png', 172 'cloture' => 'puce-reservation-cloture-16.png', 173 'refuse' => 'puce-reservation-refuse-16.png', 174 'poubelle' => 'puce-reservation-poubelle-16.png', 175 ), 176 'statut' => array( array( 177 'champ' => 'statut', 178 'publie' => 'accepte,cloture', 179 'previsu' => 'accepte,attente,attente_paiement', 180 'post_date' => 'date', 181 'exception' => array( 182 'statut', 183 'tout' 184 ) 185 )), 186 'texte_changer_statut' => 'reservations:texte_changer_statut_reservations_detail', 187 ); 188 //adaptation de la déclaration si le plugin prix_objets est installé 189 if (test_plugin_actif('prix_objets')) { 190 $tables['spip_reservations_details']['field'] = array_merge($tables['spip_reservations_details']['field'], array('id_prix_objet' => "bigint(21) NOT NULL DEFAULT '0'")); 191 $tables['spip_reservations_details']['champs_editables'] = array( 192 'id_reservation', 193 'id_evenement', 194 'descriptif', 195 'quantite', 196 'prix_ht', 197 'prix', 198 'taxe', 199 'id_prix_objet' 200 ); 201 } 202 203 //Ajouter le champ action_cloture dans le tables artiles et evenements 204 205 206 $tables['spip_articles']['champs_editable'][] = "action_cloture"; 207 $tables['spip_evenements']['champs_editable'][] = "action_cloture"; 208 209 return $tables; 210 42 43 $tables['spip_reservations'] = array( 44 'type' => 'reservation', 45 'principale' => "oui", 46 'field' => array( 47 "id_reservation" => "bigint(21) NOT NULL", 48 "id_reservation_source" => "bigint(21) NOT NULL", 49 "id_auteur" => "bigint(21) NOT NULL DEFAULT '0'", 50 "reference" => "varchar(255) NOT NULL DEFAULT ''", 51 "date_paiement" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 52 "type_paiement" => "varchar(50) NOT NULL DEFAULT ''", 53 "nom" => "varchar(255) NOT NULL DEFAULT ''", 54 "email" => "varchar(255) NOT NULL DEFAULT ''", 55 "type_lien" => "varchar(25) NOT NULL DEFAULT ''", 56 "origine_lien" => "varchar(25) NOT NULL DEFAULT ''", 57 "maj" => "timestamp", 58 "donnees_auteur" => "text NOT NULL DEFAULT ''", 59 "date" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 60 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 61 "lang" => "varchar(10) DEFAULT '' NOT NULL", 62 "maj" => "TIMESTAMP" 63 ), 64 'key' => array( 65 "PRIMARY KEY" => "id_reservation", 66 "KEY statut" => "statut,id_auteur,lang,id_reservation_source", 67 ), 68 'titre' => "reference AS titre, '' AS lang", 69 'date' => "date", 70 'champs_editables' => array( 71 'id_reservation_source', 72 'id_auteur', 73 'date_paiement', 74 'nom', 75 'email', 76 'type_lien', 77 'origine_lien', 78 'donnees_auteur', 79 'reference', 80 'lang' 81 ), 82 'champs_versionnes' => array( 83 'id_auteur', 84 'date_paiement', 85 'nom', 86 'email', 87 'donnees_auteur', 88 'reference' 89 ), 90 'rechercher_champs' => array( 91 "reference" => 8, 92 "id_reservation" => 8 93 ), 94 'tables_jointures' => array( 95 'id_reservation', 96 'id_auteur' 97 ), 98 'statut_textes_instituer' => array( 99 'attente' => 'reservation:texte_statut_attente', 100 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 101 'accepte' => 'reservation:texte_statut_accepte', 102 'cloture' => 'reservation:texte_statut_cloture', 103 'encours' => 'reservation:texte_statut_encours', 104 'refuse' => 'reservation:texte_statut_refuse', 105 'poubelle' => 'reservation:texte_statut_poubelle', 106 ), 107 'statut_images' => array( 108 'attente' => 'puce-reservation-attente-16.png', 109 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 110 'accepte' => 'puce-reservation-accepte-16.png', 111 'cloture' => 'puce-reservation-cloture-16.png', 112 'encours' => 'puce-reservation-encours-16.png', 113 'refuse' => 'puce-reservation-refuse-16.png', 114 'poubelle' => 'puce-reservation-poubelle-16.png', 115 ), 116 'statut' => array( array( 117 'champ' => 'statut', 118 'publie' => 'accepte,cloture', 119 'previsu' => 'accepte,attente,attente_paiement', 120 'post_date' => 'date', 121 'exception' => array( 122 'statut', 123 'tout' 124 ) 125 )), 126 'texte_changer_statut' => 'reservation:texte_changer_statut_reservation', 127 ); 128 129 $tables['spip_reservations_details'] = array( 130 'type' => 'reservations_detail', 131 'principale' => "oui", 132 'table_objet_surnoms' => array('reservationsdetail'), // table_objet('reservations_detail') => 'reservations_details' 133 'field' => array( 134 "id_reservations_detail" => "bigint(21) NOT NULL", 135 "id_reservation" => "bigint(21) NOT NULL DEFAULT '0'", 136 "id_evenement" => "bigint(21) NOT NULL DEFAULT '0'", 137 "descriptif" => "text NOT NULL", 138 "quantite" => "int(11) NOT NULL DEFAULT '1'", 139 "prix_ht" => "float NOT NULL DEFAULT '0'", 140 "prix" => "float NOT NULL DEFAULT '0'", 141 "taxe" => "decimal(4,3) NOT NULL DEFAULT '0.000'", 142 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 143 "maj" => "TIMESTAMP" 144 ), 145 'key' => array( 146 "PRIMARY KEY" => "id_reservations_detail", 147 "KEY statut" => "statut,id_reservation,id_evenement", 148 ), 149 'titre' => "descriptif AS titre, '' AS lang", 150 #'date' => "", 151 'champs_editables' => array( 152 'id_reservation', 153 'id_evenement', 154 'descriptif', 155 'quantite', 156 'prix_ht', 157 'prix', 158 'taxe' 159 ), 160 'champs_versionnes' => array(), 161 'rechercher_champs' => array(), 162 'tables_jointures' => array( 163 'id_evenement', 164 'id_reservation' 165 ), 166 'statut_textes_instituer' => array( 167 'attente' => 'reservation:texte_statut_attente', 168 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 169 'accepte' => 'reservation:texte_statut_accepte', 170 'cloture' => 'reservation:texte_statut_cloture', 171 'refuse' => 'reservation:texte_statut_refuse', 172 'poubelle' => 'reservation:texte_statut_poubelle', 173 ), 174 'statut_images' => array( 175 'attente' => 'puce-reservation-attente-16.png', 176 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 177 'accepte' => 'puce-reservation-accepte-16.png', 178 'cloture' => 'puce-reservation-cloture-16.png', 179 'refuse' => 'puce-reservation-refuse-16.png', 180 'poubelle' => 'puce-reservation-poubelle-16.png', 181 ), 182 'statut' => array( array( 183 'champ' => 'statut', 184 'publie' => 'accepte,cloture', 185 'previsu' => 'accepte,attente,attente_paiement', 186 'post_date' => 'date', 187 'exception' => array( 188 'statut', 189 'tout' 190 ) 191 )), 192 'texte_changer_statut' => 'reservations:texte_changer_statut_reservations_detail', 193 ); 194 //adaptation de la déclaration si le plugin prix_objets est installé 195 if (test_plugin_actif('prix_objets')) { 196 $tables['spip_reservations_details']['field'] = array_merge($tables['spip_reservations_details']['field'], array('id_prix_objet' => "bigint(21) NOT NULL DEFAULT '0'")); 197 $tables['spip_reservations_details']['champs_editables'] = array( 198 'id_reservation', 199 'id_evenement', 200 'descriptif', 201 'quantite', 202 'prix_ht', 203 'prix', 204 'taxe', 205 'id_prix_objet' 206 ); 207 } 208 209 //Ajouter le champ action_cloture dans le tables artiles et evenements 210 211 $tables['spip_articles']['champs_editable'][] = "action_cloture"; 212 $tables['spip_evenements']['champs_editable'][] = "action_cloture"; 213 214 return $tables; 215 211 216 } 212 217 213 218 function reservation_evenement_declarer_tables_principales($tables_principales) { 214 219 215 216 217 218 220 $tables_principales['spip_articles']['field']['action_cloture'] = "tinyint(1) NOT NULL"; 221 $tables_principales['spip_evenements']['field']['action_cloture'] = "tinyint(1) NOT NULL"; 222 223 return $tables_principales; 219 224 } 220 -
_plugins_/reservation_evenement/trunk/inc/reservation_enregistrer.php
r89847 r90167 22 22 $fonction_reference = charger_fonction('reservation_reference', 'inc/'); 23 23 24 $set = array( 25 'statut' => $statut, 26 'lang' => _request('lang') 27 ); 28 29 //les champs extras auteur 30 include_spip('cextras_pipelines'); 31 $valeurs_extras = array(); 24 set_request('statut', $statut); 25 $reference = $fonction_reference($id_auteur); 26 set_request('reference', $reference); 32 27 33 28 if (_request('enregistrer')) { … … 42 37 auth_loger($auteur); 43 38 } 44 $set['reference'] = $fonction_reference($id_auteur); 39 45 40 } 46 elseif (!intval($id_auteur)) { 47 $set['nom'] = _request('nom'); 48 $set['email'] = _request('email'); 49 //$set['donnees_auteur']=serialize( $valeurs_extras); 50 } 51 else { 41 elseif (intval($id_auteur)) { 42 //les champs extras auteur 43 include_spip('cextras_pipelines'); 44 $valeurs_extras = array(); 45 46 if (!is_array($champs_extras_auteurs) AND function_exists('champs_extras_objet')) { 47 //Charger les définitions pour la création des formulaires 48 $champs_extras_auteurs = champs_extras_objet(table_objet_sql('auteur')); 49 } 50 51 if (is_array($champs_extras_auteurs)) { 52 foreach ($champs_extras_auteurs as $value) { 53 $valeurs_extras[$value['options']['label']] = _request($value['options']['nom']); 54 } 55 } 56 57 set_request('nom', ''); 58 set_request('email', ''); 59 52 60 $valeurs = array_merge(array( 53 61 'nom' => _request('nom'), … … 56 64 sql_updateq('spip_auteurs', $valeurs, 'id_auteur=' . $id_auteur); 57 65 } 58 $set['reference'] = $fonction_reference();59 $set['id_auteur'] = $id_auteur;66 67 set_request('id_auteur',$id_auteur); 60 68 61 $id_reservation = $action('new', 'reservation' , $set);69 $id_reservation = $action('new', 'reservation'); 62 70 63 71 // On ajoute l'id à la session 64 session_set('id_reservation', $id_reservation); 72 $id_reservation = $id_reservation[0]; 73 if (! _request('id_reservation_source')) session_set('id_reservation', $id_reservation); 65 74 66 75 $message = '<p>' . _T('reservation:reservation_enregistre') . '</p>'; 67 76 $message .= '<h3>' . _T('reservation:details_reservation') . '</h3>'; 68 $message .= recuperer_fond('inclure/reservation', array('id_reservation' => $id_reservation [0]));77 $message .= recuperer_fond('inclure/reservation', array('id_reservation' => $id_reservation)); 69 78 70 79 //Ivalider les caches -
_plugins_/reservation_evenement/trunk/paquet.xml
r89951 r90167 2 2 prefix="reservation_evenement" 3 3 categorie="date" 4 version="1.19. 4"4 version="1.19.5" 5 5 etat="test" 6 6 compatibilite="[3.0.16;3.1.*]" 7 7 logo="prive/themes/spip/images/reservation_evenement-64.png" 8 8 documentation="http://contrib.spip.net/Reservation-d-evenements-4459" 9 schema="1. 4.2"9 schema="1.5.2" 10 10 > 11 11 -
_plugins_/reservation_evenement/trunk/prive/objets/liste/inc-reservations_reservations.html
r79404 r90167 24 24 <td class='picto'>[(#CHEMIN_IMAGE{reservation-16.png}|balise_img)]</td> 25 25 <td class='statut'>[(#STATUT|puce_statut{reservation,#ID_RESERVATION})]</td> 26 <td class='reference principale'>[(#LOGO_RESERVATION|image_reduire{20,26})]<a href="[(#ID_RESERVATION|generer_url_entite{reservation})]" title="<:info_numero_abbreviation|attribut_html:> #ID_RESERVATION">[(#RANG). ]#REFERENCE</a></td> 26 <td class='reference principale'><a href="[(#ID_RESERVATION|generer_url_entite{reservation})]" title="<:info_numero_abbreviation|attribut_html:> #ID_RESERVATION"> 27 [(#RANG). ]#REFERENCE 28 </a> 29 [(#ID_RESERVATION_SOURCE|>{0}|oui) 30 <br /><img src="[(#CHEMIN_IMAGE{lien-#TYPE_LIEN-16.png}|sinon{#CHEMIN_IMAGE{lien-16.png}})]" alt="[(#ORIGINE_LIEN|concat{:lien_}|concat{#TYPE_LIEN}|_T|sinon{<:reservation:lien_defaut:>})]" title="[(#ORIGINE_LIEN|concat{:lien_}|concat{#TYPE_LIEN}|_T|sinon{<:reservation:lien_defaut:>})]" /> 31 ] 32 </td> 27 33 <td class='auteur'> 28 34 <BOUCLE_auteur(AUTEURS){id_auteur}{tout}> -
_plugins_/reservation_evenement/trunk/reservation_evenement_administrations.php
r89185 r90167 10 10 */ 11 11 12 if (!defined('_ECRIRE_INC_VERSION')) return;13 12 if (!defined('_ECRIRE_INC_VERSION')) 13 return; 14 14 15 15 /** … … 21 21 * - insérer du pre-contenu, 22 22 * - installer des valeurs de configuration, 23 * - mettre à jour la structure SQL 23 * - mettre à jour la structure SQL 24 24 * 25 25 * @param string $nom_meta_base_version … … 28 28 * Version du schéma de données dans ce plugin (déclaré dans paquet.xml) 29 29 * @return void 30 **/30 **/ 31 31 function reservation_evenement_upgrade($nom_meta_base_version, $version_cible) { 32 $maj = array(); 33 34 if($version_cible=='1.3.3'){ 35 include_spip('inc/config'); 36 $config=lire_config('reservation_evenement'); 37 if(isset($config['envoi_separe'])){ 38 $config['envoi_separe']=$config['envoi_separe']; 39 unset($config['envoi_separe']); 40 } 41 } 32 $maj = array(); 42 33 43 $maj['create'] = array(array('maj_tables', array('spip_reservations', 'spip_reservations_details','spip_articles','spip_evenements'))); 44 $maj['1.1.0'] = array( 45 array('sql_alter','TABLE spip_reservations_details CHANGE prix_unitaire_ht prix_ht float NOT NULL DEFAULT 0'), 46 array('maj_tables', array('spip_reservations_details')) 47 ); 48 $maj['1.2.0'] = array( array('maj_tables', array('spip_reservations_details'))); 49 $maj['1.3.1'] = array( array('maj_tables', array('spip_reservations'))); 50 $maj['1.3.3'] = array( array('ecrire_config', 'reservation_evenement', $config) ); 51 $maj['1.4.1'] = array(array('maj_tables', array('spip_articles','spip_evenements'))); 52 include_spip('inc/reservation_evenement_administrations'); 53 $maj['1.4.2'] = array( 54 array('sql_alter','TABLE spip_reservations_details CHANGE quantite quantite int(11) NOT NULL DEFAULT 1'), 55 array('update_donnees_auteurs') 56 ); 57 58 include_spip('base/upgrade'); 59 maj_plugin($nom_meta_base_version, $version_cible, $maj); 34 if ($version_cible == '1.3.3') { 35 include_spip('inc/config'); 36 $config = lire_config('reservation_evenement'); 37 if (isset($config['envoi_separe'])) { 38 $config['envoi_separe'] = $config['envoi_separe']; 39 unset($config['envoi_separe']); 40 } 41 } 42 43 $maj['create'] = array( array( 44 'maj_tables', 45 array( 46 'spip_reservations', 47 'spip_reservations_details', 48 'spip_articles', 49 'spip_evenements' 50 ) 51 )); 52 $maj['1.1.0'] = array( 53 array( 54 'sql_alter', 55 'TABLE spip_reservations_details CHANGE prix_unitaire_ht prix_ht float NOT NULL DEFAULT 0' 56 ), 57 array( 58 'maj_tables', 59 array('spip_reservations_details') 60 ) 61 ); 62 $maj['1.2.0'] = array( array( 63 'maj_tables', 64 array('spip_reservations_details') 65 )); 66 $maj['1.3.1'] = array( array( 67 'maj_tables', 68 array('spip_reservations') 69 )); 70 $maj['1.3.3'] = array( array( 71 'ecrire_config', 72 'reservation_evenement', 73 $config 74 )); 75 $maj['1.4.1'] = array( array( 76 'maj_tables', 77 array( 78 'spip_articles', 79 'spip_evenements' 80 ) 81 )); 82 include_spip('inc/reservation_evenement_administrations'); 83 $maj['1.4.2'] = array( 84 array( 85 'sql_alter', 86 'TABLE spip_reservations_details CHANGE quantite quantite int(11) NOT NULL DEFAULT 1' 87 ), 88 array('update_donnees_auteurs') 89 ); 90 $maj['1.5.2'] = array( 91 array( 92 'maj_tables', 93 array('spip_reservations') 94 ), 95 array( 96 'sql_alter', 97 'TABLE spip_reservations ADD INDEX `id_reservation_source` (`id_reservation_source`)' 98 ) 99 ); 100 101 include_spip('base/upgrade'); 102 maj_plugin($nom_meta_base_version, $version_cible, $maj); 60 103 } 61 62 104 63 105 /** 64 106 * Fonction de désinstallation du plugin Réservation Événements. 65 * 107 * 66 108 * Vous devez : 67 109 * 68 110 * - nettoyer toutes les données ajoutées par le plugin et son utilisation 69 * - supprimer les tables et les champs créés par le plugin. 111 * - supprimer les tables et les champs créés par le plugin. 70 112 * 71 113 * @param string $nom_meta_base_version 72 114 * Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP 73 115 * @return void 74 **/116 **/ 75 117 function reservation_evenement_vider_tables($nom_meta_base_version) { 76 118 119 sql_drop_table("spip_reservations"); 120 sql_drop_table("spip_reservations_details"); 77 121 78 sql_drop_table("spip_reservations"); 79 sql_drop_table("spip_reservations_details"); 122 # Nettoyer les versionnages et forums 123 sql_delete("spip_versions", sql_in("objet", array( 124 'reservation', 125 'reservations_detail' 126 ))); 127 sql_delete("spip_versions_fragments", sql_in("objet", array( 128 'reservation', 129 'reservations_detail' 130 ))); 131 sql_delete("spip_forum", sql_in("objet", array( 132 'reservation', 133 'reservations_detail' 134 ))); 80 135 81 # Nettoyer les versionnages et forums 82 sql_delete("spip_versions", sql_in("objet", array('reservation', 'reservations_detail'))); 83 sql_delete("spip_versions_fragments", sql_in("objet", array('reservation', 'reservations_detail'))); 84 sql_delete("spip_forum", sql_in("objet", array('reservation', 'reservations_detail'))); 85 86 effacer_meta($nom_meta_base_version); 136 effacer_meta($nom_meta_base_version); 87 137 }
Note: See TracChangeset
for help on using the changeset viewer.