[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / maj / v016.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
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 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 function maj_v016_dist($version_installee, $version_cible)
16 {
17
18 if (upgrade_vers(1.600, $version_installee, $version_cible)) {
19 #8/08/07 plus d'indexation dans le core
20 # include_spip('inc/indexation');
21 # purger_index();
22 # creer_liste_indexation();
23 maj_version (1.600);
24 }
25
26 if (upgrade_vers(1.601, $version_installee, $version_cible)) {
27 spip_query("ALTER TABLE spip_forum ADD INDEX id_syndic (id_syndic)");
28 maj_version (1.601);
29 }
30
31 if (upgrade_vers(1.603, $version_installee, $version_cible)) {
32 // supprimer les fichiers deplaces
33 spip_unlink('inc_meta_cache.php');
34 spip_unlink('inc_meta_cache.php3');
35 spip_unlink('data/engines-list.ini');
36 maj_version (1.603);
37 }
38
39 if (upgrade_vers(1.604, $version_installee, $version_cible)) {
40 spip_query("ALTER TABLE spip_auteurs ADD lang VARCHAR(10) DEFAULT '' NOT NULL");
41 $u = spip_query("SELECT * FROM spip_auteurs WHERE prefs LIKE '%spip_lang%'");
42 while ($row = sql_fetch($u)) {
43 $prefs = unserialize($row['prefs']);
44 $l = $prefs['spip_lang'];
45 unset ($prefs['spip_lang']);
46 spip_query("UPDATE spip_auteurs SET lang=" . _q($l) . ", prefs='".addslashes(serialize($prefs))."' WHERE id_auteur=".$row['id_auteur']);
47 }
48 $u = spip_query("SELECT lang FROM spip_auteurs");
49 maj_version (1.604, $u);
50 }
51 }
52
53
54 ?>