"concat(tables_liees,'evenements,')"), "evenements='oui'"), array('sql_alter',"TABLE spip_groupes_mots DROP evenements"), ); $maj['0.20'] = array( array('sql_alter',"TABLE spip_rubriques ADD agenda tinyint(1) DEFAULT 0 NOT NULL"), ); $maj['0.21'] = array( array('sql_alter',"TABLE spip_evenements ADD adresse text NOT NULL"), array('sql_alter',"TABLE spip_evenements ADD inscription text NOT NULL"), array('sql_alter',"TABLE spip_evenements ADD places text NOT NULL"), ); $maj['0.22'] = array( array('maj_tables',array('spip_evenements_participants')), ); $maj['0.23'] = array( array('sql_alter',"TABLE spip_evenements CHANGE titre titre text NOT NULL DEFAULT ''"), array('sql_alter',"TABLE spip_evenements CHANGE descriptif descriptif text NOT NULL DEFAULT ''"), array('sql_alter',"TABLE spip_evenements CHANGE lieu lieu text NOT NULL DEFAULT ''"), array('sql_alter',"TABLE spip_evenements CHANGE adresse adresse text NOT NULL DEFAULT ''"), ); include_spip('maj/svn10000'); $maj['0.24.0'] = array( array('maj_liens','mot','evenement'), array('sql_drop_table',"spip_mots_evenements"), array('sql_alter',"TABLE spip_evenements ADD statut varchar(10) DEFAULT 0 NOT NULL"), ); $maj['0.25.0'] = array( array('upgrade_evenements_statut_025'), ); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); } function agenda_vider_tables($nom_meta_base_version) { sql_drop_table("spip_evenements"); #sql_drop_table("spip_mots_evenements"); // au cas ou ? sql_alter("TABLE spip_rubriques DROP COLUMN agenda"); effacer_meta($nom_meta_base_version); } function upgrade_evenements_articles_012(){ $res = sql_select("*", "spip_evenements_articles"); while ($row = sql_fetch($res)){ $id_article = $row['id_article']; $id_evenement = $row['id_evenement']; sql_update("spip_evenements", array('id_article'=>$id_article),'id_evenement='.intval($id_evenement)); } } function upgrade_evenements_statut_025(){ include_spip('action/editer_evenement'); $res = sql_select('id_evenement','spip_evenements',"statut='0'"); while ($row = sql_fetch($res)){ evenement_modifier($row['id_evenement'],array()); } } ?>