You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
729 B

  1. <?php
  2. if (!defined('_ECRIRE_INC_VERSION')) return;
  3. include_spip('inc/meta');
  4. function doc2article_upgrade($nom_meta_base_version,$version_cible){
  5. $current_version = '0.0';
  6. if ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )
  7. || (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){
  8. include_spip('base/doc2article');
  9. if (version_compare($current_version,'0.0','<=')){
  10. include_spip('base/create');
  11. include_spip('base/abstract_sql');
  12. creer_base();
  13. ecrire_meta($nom_meta_base_version,$current_version=$version_cible,'non');
  14. }
  15. }
  16. }
  17. function doc2article_vider_tables($nom_meta_base_version) {
  18. sql_drop_table('spip_doc2article');
  19. effacer_meta($nom_meta_base_version);
  20. }
  21. ?>