99ce6189b34ac298c3929d2db3c672c2279bedda
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2017 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
14 * Gestion des mises à jour de SPIP, versions 1.6*
16 * @package SPIP\Core\SQL\Upgrade
18 if (!defined('_ECRIRE_INC_VERSION')) {
23 * Mises à jour de SPIP n°016
25 * @param float $version_installee Version actuelle
26 * @param float $version_cible Version de destination
28 function maj_v016_dist($version_installee, $version_cible) {
30 if (upgrade_vers(1.600, $version_installee, $version_cible)) {
31 #8/08/07 plus d'indexation dans le core
32 # include_spip('inc/indexation');
34 # creer_liste_indexation();
38 if (upgrade_vers(1.601, $version_installee, $version_cible)) {
39 spip_query("ALTER TABLE spip_forum ADD INDEX id_syndic (id_syndic)");
43 if (upgrade_vers(1.603, $version_installee, $version_cible)) {
44 // supprimer les fichiers deplaces
45 spip_unlink('inc_meta_cache.php');
46 spip_unlink('inc_meta_cache.php3');
47 spip_unlink('data/engines-list.ini');
51 if (upgrade_vers(1.604, $version_installee, $version_cible)) {
52 spip_query("ALTER TABLE spip_auteurs ADD lang VARCHAR(10) DEFAULT '' NOT NULL");
53 $u = spip_query("SELECT * FROM spip_auteurs WHERE prefs LIKE '%spip_lang%'");
54 while ($row = sql_fetch($u)) {
55 $prefs = unserialize($row['prefs']);
56 $l = $prefs['spip_lang'];
57 unset($prefs['spip_lang']);
58 spip_query("UPDATE spip_auteurs SET lang=" . _q($l) . ", prefs='" . addslashes(serialize($prefs)) . "' WHERE id_auteur=" . $row['id_auteur']);
60 $u = spip_query("SELECT lang FROM spip_auteurs");
61 maj_version(1.604, $u);