$beforeversionarray = explode('.', '3.3.9'); if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_categorie_association($db, $langs, $conf); } // Script for VX (X<3.4) -> V3.4 // No specific scripts // Tasks to do always and only into last targeted version $afterversionarray = explode('.', '3.6.9'); // target is after this $beforeversionarray = explode('.', '3.7.9'); // target is before this if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_event_assignement($db, $langs, $conf); // Reload modules (this must be always and only into last targeted version) $listofmodule = array('MAIN_MODULE_AGENDA', 'MAIN_MODULE_BARCODE', 'MAIN_MODULE_CRON', 'MAIN_MODULE_COMMANDE', 'MAIN_MODULE_DEPLACEMENT', 'MAIN_MODULE_DON', 'MAIN_MODULE_ECM', 'MAIN_MODULE_FACTURE', 'MAIN_MODULE_FOURNISSEUR', 'MAIN_MODULE_OPENSURVEY', 'MAIN_MODULE_PAYBOX', 'MAIN_MODULE_PRODUIT', 'MAIN_MODULE_SOCIETE', 'MAIN_MODULE_SERVICE', 'MAIN_MODULE_USER'); migrate_reload_modules($db, $langs, $conf, $listofmodule); // Reload menus (this must be always and only into last targeted version) migrate_reload_menu($db, $langs, $conf, $versionto); } print '<tr><td colspan="4"><br>' . $langs->trans("MigrationFinished") . '</td></tr>'; // On commit dans tous les cas. // La procedure etant concue pour pouvoir passer plusieurs fois quelquesoit la situation. $db->commit(); $db->close(); // Actions for all version (not in database) migrate_delete_old_files($db, $langs, $conf); migrate_delete_old_dir($db, $langs, $conf); } print '</table>'; } else { print '<div class="error">' . $langs->trans('ErrorWrongParameters') . '</div>';
// Reload menus migrate_reload_menu($db,$langs,$conf,$versionto); } // Script for VX (X<3.1) -> V3.1 $afterversionarray=explode('.','3.0.9'); $beforeversionarray=explode('.','3.1.9'); if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { migrate_directories($db,$langs,$conf,'/rss','/externalrss'); migrate_actioncomm_element($db,$langs,$conf); // Reload modules migrate_reload_modules($db,$langs,$conf); // Reload menus migrate_reload_menu($db,$langs,$conf,$versionto); } // Script for VX (X<3.2) -> V3.2 $afterversionarray=explode('.','3.1.9'); $beforeversionarray=explode('.','3.2.9'); if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { migrate_price_contrat($db,$langs,$conf); migrate_mode_reglement($db,$langs,$conf); // Reload modules