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

v017.php ➔ maj_legacy_v017_dist()   F

Complexity

Conditions 23
Paths > 20000

Size

Total Lines 175

Duplication

Lines 72
Ratio 41.14 %

Importance

Changes 0
Metric Value
cc 23
nc 1769472
nop 2
dl 72
loc 175
rs 0
c 0
b 0
f 0

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.7*
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°017
24
 *
25
 * @param float $version_installee Version actuelle
26
 * @param float $version_cible Version de destination
27
 **/
28
function maj_legacy_v017_dist($version_installee, $version_cible) {
29
	if (upgrade_vers(1.702, $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_articles ADD extra longblob NULL");
31
		sql_query("ALTER TABLE spip_auteurs ADD extra longblob NULL");
32
		sql_query("ALTER TABLE spip_breves ADD extra longblob NULL");
33
		sql_query("ALTER TABLE spip_rubriques ADD extra longblob NULL");
34
		sql_query("ALTER TABLE spip_mots ADD extra longblob NULL");
35
36
		// recuperer les eventuels 'supplement' installes en 1.701
37 View Code Duplication
		if ($version_installee == 1.701) {
0 ignored issues
show
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...
38
			sql_query("UPDATE spip_articles SET extra = supplement");
39
			sql_query("ALTER TABLE spip_articles DROP supplement");
40
			sql_query("UPDATE spip_auteurs SET extra = supplement");
41
			sql_query("ALTER TABLE spip_auteurs DROP supplement");
42
			sql_query("UPDATE spip_breves SET extra = supplement");
43
			sql_query("ALTER TABLE spip_breves DROP supplement");
44
			sql_query("UPDATE spip_rubriques SET extra = supplement");
45
			sql_query("ALTER TABLE spip_rubriques DROP supplement");
46
			sql_query("UPDATE spip_mots SET extra = supplement");
47
			sql_query("ALTER TABLE spip_mots DROP supplement");
48
		}
49
50
		$u = sql_query("SELECT extra FROM spip_articles");
51
		$u &= sql_query("SELECT extra FROM spip_auteurs");
52
		$u &= sql_query("SELECT extra FROM spip_breves");
53
		$u &= sql_query("SELECT extra FROM spip_rubriques");
54
		$u &= sql_query("SELECT extra FROM spip_mots");
55
		maj_version(1.702, $u);
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...
56
	}
57
58
	if (upgrade_vers(1.703, $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...
59
		sql_query("ALTER TABLE spip_articles ADD lang VARCHAR(10) DEFAULT '' NOT NULL");
60
		sql_query("ALTER TABLE spip_rubriques ADD lang VARCHAR(10) DEFAULT '' NOT NULL");
61
		maj_version(1.703);
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
64 View Code Duplication
	if (upgrade_vers(1.704, $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...
65
		sql_query("ALTER TABLE spip_articles ADD INDEX lang (lang)");
66
		sql_query("ALTER TABLE spip_auteurs ADD INDEX lang (lang)");
67
		sql_query("ALTER TABLE spip_rubriques ADD INDEX lang (lang)");
68
		maj_version(1.704);
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...
69
	}
70
71
	if (upgrade_vers(1.705, $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...
72
		sql_query("ALTER TABLE spip_articles ADD langue_choisie VARCHAR(3) DEFAULT 'non'");
73
		sql_query("ALTER TABLE spip_rubriques ADD langue_choisie VARCHAR(3) DEFAULT 'non'");
74
		maj_version(1.705);
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...
75
	}
76
77 View Code Duplication
	if (upgrade_vers(1.707, $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...
78
		sql_query("UPDATE spip_articles SET langue_choisie='oui' WHERE MID(lang,1,1) != '.' AND lang != ''");
79
		sql_query("UPDATE spip_articles SET lang=MID(lang,2,8) WHERE langue_choisie = 'non'");
80
		sql_query("UPDATE spip_rubriques SET langue_choisie='oui' WHERE MID(lang,1,1) != '.' AND lang != ''");
81
		sql_query("UPDATE spip_rubriques SET lang=MID(lang,2,8) WHERE langue_choisie = 'non'");
82
		maj_version(1.707);
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...
83
	}
84
85
	if (upgrade_vers(1.708, $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...
86
		sql_query("ALTER TABLE spip_breves ADD lang VARCHAR(10) DEFAULT '' NOT NULL");
87
		sql_query("ALTER TABLE spip_breves ADD langue_choisie VARCHAR(3) DEFAULT 'non'");
88
		maj_version(1.708);
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...
89
	}
90
91
	if (upgrade_vers(1.709, $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...
92
		sql_query("ALTER TABLE spip_articles ADD id_trad bigint(21) DEFAULT '0' NOT NULL");
93
		sql_query("ALTER TABLE spip_articles ADD INDEX id_trad (id_trad)");
94
		maj_version(1.709);
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...
95
	}
96
97
	if (upgrade_vers(1.717, $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...
98
		sql_query("ALTER TABLE spip_articles ADD INDEX date_modif (date_modif)");
99
		maj_version(1.717);
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...
100
	}
101
102 View Code Duplication
	if (upgrade_vers(1.718, $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...
103
		sql_query("ALTER TABLE spip_referers DROP domaine");
104
		sql_query("ALTER TABLE spip_referers_articles DROP domaine");
105
		sql_query("ALTER TABLE spip_referers_temp DROP domaine");
106
		maj_version(1.718);
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...
107
	}
108
109 View Code Duplication
	if (upgrade_vers(1.722, $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...
110
		sql_query("ALTER TABLE spip_articles ADD nom_site tinytext NOT NULL");
111
		sql_query("ALTER TABLE spip_articles ADD url_site VARCHAR(255) NOT NULL");
112
		sql_query("ALTER TABLE spip_articles ADD INDEX url_site (url_site)");
113
		if ($version_installee >= 1.720) {
114
			sql_query("UPDATE spip_articles SET url_site=url_ref");
115
			sql_query("ALTER TABLE spip_articles DROP INDEX url_ref");
116
			sql_query("ALTER TABLE spip_articles DROP url_ref");
117
		}
118
		maj_version(1.722);
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...
119
	}
120
121 View Code Duplication
	if (upgrade_vers(1.723, $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...
122
		if ($version_installee == 1.722) {
123
			sql_query("ALTER TABLE spip_articles MODIFY url_site VARCHAR(255) NOT NULL");
124
			sql_query("ALTER TABLE spip_articles DROP INDEX url_site;");
125
			sql_query("ALTER TABLE spip_articles ADD INDEX url_site (url_site);");
126
		}
127
		maj_version(1.723);
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...
128
	}
129
130
	if (upgrade_vers(1.724, $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...
131
		sql_query("ALTER TABLE spip_messages ADD date_fin datetime DEFAULT '0000-00-00 00:00:00' NOT NULL");
132
		maj_version(1.724);
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...
133
	}
134
135
	if (upgrade_vers(1.726, $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...
136
		sql_query("ALTER TABLE spip_auteurs ADD low_sec tinytext NOT NULL");
137
		maj_version(1.726);
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...
138
	}
139
140 View Code Duplication
	if (upgrade_vers(1.727, $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...
141
		// occitans : oci_xx -> oc_xx
142
		sql_query("UPDATE spip_auteurs SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'");
143
		sql_query("UPDATE spip_rubriques SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'");
144
		sql_query("UPDATE spip_articles SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'");
145
		sql_query("UPDATE spip_breves SET lang=REPLACE(lang,'oci_', 'oc_') WHERE lang LIKE 'oci_%'");
146
		maj_version(1.727);
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...
147
	}
148
149
	// Ici version 1.7 officielle
150
	if (upgrade_vers(1.728, $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_articles ADD id_version int unsigned DEFAULT '0' NOT NULL");
152
		maj_version(1.728);
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.730, $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_articles ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
157
		sql_query("ALTER TABLE spip_articles ADD INDEX idx (idx)");
158
		sql_query("ALTER TABLE spip_auteurs ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
159
		sql_query("ALTER TABLE spip_auteurs ADD INDEX idx (idx)");
160
		sql_query("ALTER TABLE spip_breves ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
161
		sql_query("ALTER TABLE spip_breves ADD INDEX idx (idx)");
162
		sql_query("ALTER TABLE spip_mots ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
163
		sql_query("ALTER TABLE spip_mots ADD INDEX idx (idx)");
164
		sql_query("ALTER TABLE spip_rubriques ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
165
		sql_query("ALTER TABLE spip_rubriques ADD INDEX idx (idx)");
166
		sql_query("ALTER TABLE spip_syndic ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
167
		sql_query("ALTER TABLE spip_syndic ADD INDEX idx (idx)");
168
		sql_query("ALTER TABLE spip_forum ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
169
		sql_query("ALTER TABLE spip_forum ADD INDEX idx (idx)");
170
		sql_query("ALTER TABLE spip_signatures ADD idx ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL");
171
		sql_query("ALTER TABLE spip_signatures ADD INDEX idx (idx)");
172
		maj_version(1.730);
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...
173
	}
174
175 View Code Duplication
	if (upgrade_vers(1.731, $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...
176
		sql_query("UPDATE spip_articles SET idx='1' where lang IN ('de','vi')");
177
		sql_query("UPDATE spip_rubriques SET idx='1' where lang IN ('de','vi')");
178
		sql_query("UPDATE spip_breves SET idx='1' where lang IN ('de','vi')");
179
		sql_query("UPDATE spip_auteurs SET idx='1' where lang IN ('de','vi')");
180
		maj_version(1.731);
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...
181
	}
182
183
	if (upgrade_vers(1.732, $version_installee,
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...
184
		$version_cible)) { // en correction d'un vieux truc qui avait fait sauter le champ inclus sur les bases version 1.415
185
		sql_query("ALTER TABLE spip_documents ADD inclus  VARCHAR(3) DEFAULT 'non'");
186
		maj_version(1.732);
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...
187
	}
188
189 View Code Duplication
	if (upgrade_vers(1.733, $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...
190
		// sql_query("ALTER TABLE spip_articles ADD id_version int unsigned DEFAULT '0' NOT NULL");
191
		sql_query("DROP TABLE spip_versions");
192
		sql_query("DROP TABLE spip_versions_fragments");
193
		creer_base();
194
		maj_version(1.733);
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...
195
	}
196
197
	#if ($version_installee < 1.734) {
198
	#	// integrer nouvelles tables auxiliaires du compilateur ESJ
199
	#	creer_base();
200
	#	maj_version(1.734);
201
	#}
202
}
203