Completed
Push — master ( 3e6f39...ee2ef7 )
by cam
04:21
created

v018.php ➔ maj_legacy_v018_dist()   F

Complexity

Conditions 25
Paths > 20000

Size

Total Lines 212

Duplication

Lines 33
Ratio 15.57 %

Importance

Changes 0
Metric Value
cc 25
nc 8388608
nop 2
dl 33
loc 212
rs 0
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A v018.php ➔ maj_v018_calculer_threads() 0 23 5

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/***************************************************************************\
4
 *  SPIP, Système de publication pour l'internet                           *
5
 *                                                                         *
6
 *  Copyright © avec tendresse depuis 2001                                 *
7
 *  Arnaud Martin, Antoine Pitrou, Philippe Rivière, Emmanuel Saint-James  *
8
 *                                                                         *
9
 *  Ce programme est un logiciel libre distribué sous licence GNU/GPL.     *
10
 *  Pour plus de détails voir le fichier COPYING.txt ou l'aide en ligne.   *
11
\***************************************************************************/
12
13
/**
14
 * Gestion des mises à jour de SPIP, versions 1.8*
15
 *
16
 * @package SPIP\Core\SQL\Upgrade
17
 **/
18
if (!defined('_ECRIRE_INC_VERSION')) {
19
	return;
20
}
21
22
/**
23
 * Mises à jour de SPIP n°018
24
 *
25
 * @param float $version_installee Version actuelle
26
 * @param float $version_cible Version de destination
27
 **/
28
function maj_legacy_v018_dist($version_installee, $version_cible) {
29
	if (upgrade_vers(1.801, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
30
		sql_query("ALTER TABLE spip_rubriques	ADD statut_tmp VARCHAR(10) NOT NULL,	ADD date_tmp datetime DEFAULT '0000-00-00 00:00:00' NOT NULL");
31
		include_spip('inc/rubriques');
32
		calculer_rubriques();
33
		maj_version(1.801);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
34
	}
35
36
	// Nouvelles tables d'invalidation
37
	if (upgrade_vers(1.802, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
38
		sql_query("DROP TABLE spip_id_article_caches");
39
		sql_query("DROP TABLE spip_id_auteur_caches");
40
		sql_query("DROP TABLE spip_id_breve_caches");
41
		sql_query("DROP TABLE spip_id_document_caches");
42
		sql_query("DROP TABLE spip_id_forum_caches");
43
		sql_query("DROP TABLE spip_id_groupe_caches");
44
		sql_query("DROP TABLE spip_id_message_caches");
45
		sql_query("DROP TABLE spip_id_mot_caches");
46
		sql_query("DROP TABLE spip_id_rubrique_caches");
47
		sql_query("DROP TABLE spip_id_signature_caches");
48
		sql_query("DROP TABLE spip_id_syndic_article_caches");
49
		sql_query("DROP TABLE spip_id_syndic_caches");
50
		sql_query("DROP TABLE spip_id_type_caches");
51
		sql_query("DROP TABLE spip_inclure_caches");
52
		maj_version(1.802);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
53
	}
54
	if (upgrade_vers(1.803, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
55
56
		#	27 AOUT 2004 : conservons cette table pour autoriser les retours
57
		#	de SPIP 1.8a6 CVS vers 1.7.2
58
		#	sql_query("DROP TABLE spip_forum_cache");
59
60
		sql_query("DROP TABLE spip_inclure_caches");
61
		maj_version(1.803);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
62
	}
63
	if (upgrade_vers(1.804, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
64
		// recreer la table spip_caches
65
		sql_query("DROP TABLE spip_caches");
66
		creer_base();
67
		maj_version(1.804);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
68
	}
69
70
	/**
71
	 * Recalculer tous les threads
72
	 *
73
	 * Fonction du plugin forum recopiee ici pour assurer la montee
74
	 * de version dans tous les cas de figure
75
	 **/
76
	function maj_v018_calculer_threads() {
77
		// fixer les id_thread des debuts de discussion
78
		sql_update('spip_forum', array('id_thread' => 'id_forum'), "id_parent=0");
79
		// reparer les messages qui n'ont pas l'id_secteur de leur parent
80
		do {
81
			$discussion = "0";
82
			$precedent = 0;
83
			$r = sql_select("fille.id_forum AS id,	maman.id_thread AS thread", 'spip_forum AS fille, spip_forum AS maman',
84
				"fille.id_parent = maman.id_forum AND fille.id_thread <> maman.id_thread", '', "thread");
85
			while ($row = sql_fetch($r)) {
86
				if ($row['thread'] == $precedent) {
87
					$discussion .= "," . $row['id'];
88
				} else {
89
					if ($precedent) {
90
						sql_updateq("spip_forum", array("id_thread" => $precedent), "id_forum IN ($discussion)");
91
					}
92
					$precedent = $row['thread'];
93
					$discussion = $row['id'];
94
				}
95
			}
96
			sql_updateq("spip_forum", array("id_thread" => $precedent), "id_forum IN ($discussion)");
97
		} while ($discussion != "0");
98
	}
99
100
	if (upgrade_vers(1.805, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
101
		sql_query("ALTER TABLE spip_forum ADD id_thread bigint(21) DEFAULT '0' NOT NULL");
102
		maj_v018_calculer_threads();
103
		maj_version(1.805);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
104
	}
105
106
	// tables d'orthographe
107
	#if ($version_installee < 1.806)
108
	#	maj_version(1.806);
109
110
	// URLs propres (inc_version = 0.12)
111
	if (upgrade_vers(1.807, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
112
		foreach (array('articles', 'breves', 'rubriques', 'mots') as $objets) {
113
			sql_query("ALTER TABLE spip_$objets ADD url_propre VARCHAR(255) NOT NULL");
114
			sql_query("ALTER TABLE spip_$objets ADD INDEX url_propre (url_propre)");
115
		}
116
		maj_version(1.807);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
117
	}
118
119
	// referers de la veille
120
	if (upgrade_vers(1.808, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
121
		sql_query("ALTER TABLE spip_referers ADD visites_veille INT UNSIGNED NOT NULL");
122
		maj_version(1.808);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
123
	}
124
125
126
	// corrections diverses
127 View Code Duplication
	if (upgrade_vers(1.809, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
128
		// plus de retour possible vers 1.7.2
129
		sql_query("DROP TABLE spip_forum_cache");
130
131
		// les requetes ci-dessous ne s'appliqueront que si on est passe
132
		// par une certaine version de developpement - oublie de le faire
133
		// plus tot, car le code d'alors recreait purement et simplement
134
		// cette table
135
		sql_query("ALTER TABLE spip_versions DROP chapo");
136
		sql_query("ALTER TABLE spip_versions DROP texte");
137
		sql_query("ALTER TABLE spip_versions DROP ps");
138
		sql_query("ALTER TABLE spip_versions DROP extra");
139
		sql_query("ALTER TABLE spip_versions ADD champs text NOT NULL");
140
141
		maj_version(1.809);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
142
	}
143
144
	// Annuler les brouillons de forum jamais valides
145
	if (upgrade_vers(1.810, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
146
		sql_delete("spip_forum", "statut='redac'");
147
		maj_version(1.810);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
148
	}
149
150
	if (upgrade_vers(1.811, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
151
		sql_query("ALTER TABLE spip_syndic ADD extra longblob NULL");
152
		maj_version(1.811);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
153
	}
154
155
	if (upgrade_vers(1.812, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
156
		sql_query("ALTER TABLE spip_documents ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
157
		maj_version(1.812);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
158
	}
159
160
	// Mise a jour des types MIME
161
	if (upgrade_vers(1.813, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
162
		# rien a faire car c'est creer_base() qui s'en charge
163
		maj_version(1.813);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
164
	}
165
166
	// URLs propres auteurs
167
	if (upgrade_vers(1.814, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
168
		sql_query("ALTER TABLE spip_auteurs ADD url_propre VARCHAR(255) NOT NULL");
169
		sql_query("ALTER TABLE spip_auteurs ADD INDEX url_propre (url_propre)");
170
		maj_version(1.814);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
171
	}
172
173
	// Mots-cles sur les documents
174
	// + liens documents <-> sites et articles syndiques (podcasting)
175
	if (upgrade_vers(1.815, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
176
		sql_query("ALTER TABLE spip_documents	ADD distant VARCHAR(3) DEFAULT 'non'");
177
		maj_version(1.815);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
178
	}
179
180
	// Indexation des documents (rien a faire sauf reinstaller inc_auxbase)
181
	if (upgrade_vers(1.816, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
182
		maj_version(1.816);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
183
	}
184
185
	// Texte et descriptif des groupes de mots-cles
186
	if (upgrade_vers(1.817, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
187
		sql_query("ALTER TABLE spip_groupes_mots ADD descriptif text NOT NULL AFTER titre");
188
		sql_query("ALTER TABLE spip_groupes_mots ADD COLUMN texte longblob NOT NULL AFTER descriptif");
189
		maj_version(1.817);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
190
	}
191
192
	// Conformite des noms de certains champs (0minirezo => minirezo)
193 View Code Duplication
	if (upgrade_vers(1.818, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
194
		sql_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 0minirezo minirezo char(3) NOT NULL");
195
		sql_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 1comite comite char(3) NOT NULL");
196
		sql_query("ALTER TABLE spip_groupes_mots CHANGE COLUMN 6forum forum char(3) NOT NULL");
197
		maj_version(1.818);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
198
	}
199
200
	// Options de syndication : miroir + oubli
201
	if (upgrade_vers(1.819, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
202
		sql_query("ALTER TABLE spip_syndic ADD miroir VARCHAR(3) DEFAULT 'non'");
203
		sql_query("ALTER TABLE spip_syndic ADD oubli VARCHAR(3) DEFAULT 'non'");
204
		maj_version(1.819);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
205
	}
206
207
	// Un bug dans les 1.730 (il manquait le "ADD")
208 View Code Duplication
	if (upgrade_vers(1.820, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
209
		sql_query("ALTER TABLE spip_articles ADD INDEX idx (idx)");
210
		sql_query("ALTER TABLE spip_auteurs ADD INDEX idx (idx)");
211
		sql_query("ALTER TABLE spip_breves ADD INDEX idx (idx)");
212
		sql_query("ALTER TABLE spip_mots ADD INDEX idx (idx)");
213
		sql_query("ALTER TABLE spip_rubriques ADD INDEX idx (idx)");
214
		sql_query("ALTER TABLE spip_syndic ADD INDEX idx (idx)");
215
		sql_query("ALTER TABLE spip_forum ADD INDEX idx (idx)");
216
		sql_query("ALTER TABLE spip_signatures ADD INDEX idx (idx)");
217
		maj_version(1.820);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
218
	}
219
220
	// reindexer les articles (on avait oublie les auteurs)
221
	if (upgrade_vers(1.821, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
222
		sql_query("UPDATE spip_articles SET idx='1' WHERE idx='oui'");
223
		maj_version(1.821);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
224
	}
225
	// le 'type' des mots doit etre du texte, sinon on depasse en champ multi
226
	if (upgrade_vers(1.822, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
227
		sql_query("ALTER TABLE spip_mots DROP INDEX type");
228
		sql_query("ALTER TABLE spip_mots CHANGE type type TEXT NOT NULL");
229
		maj_version(1.822);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
230
	}
231
	// ajouter une table de fonctions pour ajax
232
	if (upgrade_vers(1.825, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
233
		maj_version(1.825);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
234
	}
235
	if (upgrade_vers(1.826, $version_installee, $version_cible)) {
0 ignored issues
show
Deprecated Code introduced by
The function upgrade_vers() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
236
		sql_query("ALTER TABLE spip_ajax_fonc DROP fonction");
237
		maj_version(1.826);
0 ignored issues
show
Deprecated Code introduced by
The function maj_version() has been deprecated with message: Utiliser `maj_plugin()` ou la globale `maj` pour le core.

This function has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed from the class and what other function to use instead.

Loading history...
238
	}
239
}
240