compagnon_administrations.php 674 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. if (!defined('_ECRIRE_INC_VERSION')) return;
  3. function compagnon_upgrade($nom_meta_base_version, $version_cible){
  4. $maj = array();
  5. $maj['create'] = array(
  6. array('compagnon_create')
  7. );
  8. include_spip('base/upgrade');
  9. maj_plugin($nom_meta_base_version, $version_cible, $maj);
  10. }
  11. function compagnon_create() {
  12. include_spip('inc/config');
  13. if (sql_getfetsel('id_rubrique', 'spip_rubriques', '', '', '', '0,1')) {
  14. ecrire_config('compagnon/config/activer', 'non');
  15. } else {
  16. ecrire_config('compagnon/config/activer', 'oui');
  17. }
  18. }
  19. function compagnon_vider_tables($nom_meta_base_version) {
  20. effacer_meta("compagnon");
  21. effacer_meta($nom_meta_base_version);
  22. }
  23. ?>