Completed
Push — master ( 822703...31691f )
by cam
01:52 queued 15s
created
ecrire/inc/chercher_rubrique.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	if (isset($data[$root])) { # pas de racine sauf pour les rubriques
147 147
 	$r = "<option$selected value='$root' class='$class' style='$style'>$espace"
148 148
 			. $data[$root]
149
-			. '</option>' . "\n";
149
+			. '</option>'."\n";
150 150
 	} else {
151 151
 		$r = '';
152 152
 	}
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	}
175 175
 
176 176
 	// et voila le travail
177
-	return $r . $sous;
177
+	return $r.$sous;
178 178
 }
179 179
 
180 180
 /**
@@ -221,12 +221,12 @@  discard block
 block discarded – undo
221 221
 	while ($r = sql_fetch($q)) {
222 222
 		if (autoriser('voir', 'rubrique', $r['id_rubrique'])) {
223 223
 			// titre largeur maxi a 50
224
-			$titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50);
224
+			$titre = couper(supprimer_tags(typo($r['titre'])).' ', 50);
225 225
 			if (
226 226
 				$GLOBALS['meta']['multi_rubriques'] == 'oui'
227 227
 				and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0)
228 228
 			) {
229
-				$titre .= ' [' . traduire_nom_langue($r['lang']) . ']';
229
+				$titre .= ' ['.traduire_nom_langue($r['lang']).']';
230 230
 			}
231 231
 			$data[$r['id_rubrique']] = $titre;
232 232
 			$enfants[$r['id_parent']][] = $r['id_rubrique'];
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
 	$att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'";
254 254
 
255 255
 	if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) {
256
-		$r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2];
256
+		$r = "<input$att type='hidden' value='".$r[1]."' />".$r[2];
257 257
 	} else {
258
-		$r = '<select' . $att . " size='1'>\n$opt</select>\n";
258
+		$r = '<select'.$att." size='1'>\n$opt</select>\n";
259 259
 	}
260 260
 
261 261
 	# message pour neuneus (a supprimer ?)
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') {
298 298
 
299 299
 	if ($id_rubrique) {
300
-		$titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
300
+		$titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
301 301
 	} else {
302 302
 		if ($type == 'auteur') {
303 303
 			$titre = '&nbsp;';
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	}
308 308
 
309 309
 	$titre = str_replace('&amp;', '&', entites_html(textebrut(typo($titre))));
310
-	$init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'";
310
+	$init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'";
311 311
 
312 312
 	$url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do"
313 313
 		. (!$idem ? '' : "&exclus=$idem")
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 		. " jQuery(this).toggleClass('toggled'); "
357 357
 		. "return charger_node_url_si_vide('"
358 358
 		. $url
359
-		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>"
359
+		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>"
360 360
 		. $img_icone
361 361
 		. "</a><img src='"
362 362
 		. chemin_image('loader.svg')
Please login to merge, or discard this patch.
Indentation   +196 added lines, -196 removed lines patch added patch discarded remove patch
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
  **/
19 19
 
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	return;
21
+    return;
22 22
 }
23 23
 
24 24
 if (!defined('_SPIP_SELECT_RUBRIQUES')) {
25
-	/**
26
-	 * @var int Nombre de rubriques maximum du sélecteur de rubriques.
27
-	 * Au delà, on bascule sur un sélecteur ajax.
28
-	 * mettre 100000 pour desactiver ajax
29
-	 */
30
-	define('_SPIP_SELECT_RUBRIQUES', 20);
25
+    /**
26
+     * @var int Nombre de rubriques maximum du sélecteur de rubriques.
27
+     * Au delà, on bascule sur un sélecteur ajax.
28
+     * mettre 100000 pour desactiver ajax
29
+     */
30
+    define('_SPIP_SELECT_RUBRIQUES', 20);
31 31
 }
32 32
 
33 33
 /**
@@ -55,22 +55,22 @@  discard block
 block discarded – undo
55 55
  *     Code HTML du sélecteur
56 56
  **/
57 57
 function inc_chercher_rubrique_dist($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') {
58
-	if (sql_countsel('spip_rubriques') < 1) {
59
-		return '';
60
-	}
61
-
62
-	// Mode sans Ajax :
63
-	// - soit parce que le cookie ajax n'est pas la
64
-	// - soit parce qu'il y a peu de rubriques
65
-	if (
66
-		_SPIP_AJAX < 1
67
-		or $type == 'breve'
68
-		or sql_countsel('spip_rubriques') < _SPIP_SELECT_RUBRIQUES
69
-	) {
70
-		return selecteur_rubrique_html($id_rubrique, $type, $restreint, $idem);
71
-	} else {
72
-		return selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem, $do);
73
-	}
58
+    if (sql_countsel('spip_rubriques') < 1) {
59
+        return '';
60
+    }
61
+
62
+    // Mode sans Ajax :
63
+    // - soit parce que le cookie ajax n'est pas la
64
+    // - soit parce qu'il y a peu de rubriques
65
+    if (
66
+        _SPIP_AJAX < 1
67
+        or $type == 'breve'
68
+        or sql_countsel('spip_rubriques') < _SPIP_SELECT_RUBRIQUES
69
+    ) {
70
+        return selecteur_rubrique_html($id_rubrique, $type, $restreint, $idem);
71
+    } else {
72
+        return selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem, $do);
73
+    }
74 74
 }
75 75
 
76 76
 // compatibilite pour extensions qui utilisaient l'ancien nom
@@ -87,17 +87,17 @@  discard block
 block discarded – undo
87 87
  **/
88 88
 function style_menu_rubriques($i) {
89 89
 
90
-	$espace = '';
91
-	$style = '';
92
-	for ($count = 1; $count <= $i; $count++) {
93
-		$espace .= '&nbsp;&nbsp;&nbsp;&nbsp;';
94
-	}
95
-	if ($i == 1) {
96
-		$espace = '';
97
-	}
98
-	$class = "niveau_$i";
99
-
100
-	return [$class, $style, $espace];
90
+    $espace = '';
91
+    $style = '';
92
+    for ($count = 1; $count <= $i; $count++) {
93
+        $espace .= '&nbsp;&nbsp;&nbsp;&nbsp;';
94
+    }
95
+    if ($i == 1) {
96
+        $espace = '';
97
+    }
98
+    $class = "niveau_$i";
99
+
100
+    return [$class, $style, $espace];
101 101
 }
102 102
 
103 103
 /**
@@ -121,60 +121,60 @@  discard block
 block discarded – undo
121 121
  *     Code HTML du sélecteur
122 122
  **/
123 123
 function sous_menu_rubriques($id_rubrique, $root, $niv, &$data, &$enfants, $exclus, $restreint, $type) {
124
-	static $decalage_secteur;
125
-
126
-	// Si on a demande l'exclusion ne pas descendre dans la rubrique courante
127
-	if (
128
-		$exclus > 0
129
-		and $root == $exclus
130
-	) {
131
-		return '';
132
-	}
133
-
134
-	// en fonction du niveau faire un affichage plus ou moins kikoo
135
-
136
-	// selected ?
137
-	$selected = ($root == $id_rubrique) ? ' selected="selected"' : '';
138
-
139
-	// le style en fonction de la profondeur
140
-	[$class, $style, $espace] = style_menu_rubriques($niv);
141
-
142
-	$class .= ' selec_rub';
143
-
144
-	// creer l'<option> pour la rubrique $root
145
-
146
-	if (isset($data[$root])) { # pas de racine sauf pour les rubriques
147
-	$r = "<option$selected value='$root' class='$class' style='$style'>$espace"
148
-			. $data[$root]
149
-			. '</option>' . "\n";
150
-	} else {
151
-		$r = '';
152
-	}
153
-
154
-	// et le sous-menu pour ses enfants
155
-	$sous = '';
156
-	if (isset($enfants[$root])) {
157
-		foreach ($enfants[$root] as $sousrub) {
158
-			$sous .= sous_menu_rubriques(
159
-				$id_rubrique,
160
-				$sousrub,
161
-				$niv + 1,
162
-				$data,
163
-				$enfants,
164
-				$exclus,
165
-				$restreint,
166
-				$type
167
-			);
168
-		}
169
-	}
170
-
171
-	// si l'objet a deplacer est publie, verifier qu'on a acces aux rubriques
172
-	if ($restreint and $root != $id_rubrique and !autoriser('publierdans', 'rubrique', $root)) {
173
-		return $sous;
174
-	}
175
-
176
-	// et voila le travail
177
-	return $r . $sous;
124
+    static $decalage_secteur;
125
+
126
+    // Si on a demande l'exclusion ne pas descendre dans la rubrique courante
127
+    if (
128
+        $exclus > 0
129
+        and $root == $exclus
130
+    ) {
131
+        return '';
132
+    }
133
+
134
+    // en fonction du niveau faire un affichage plus ou moins kikoo
135
+
136
+    // selected ?
137
+    $selected = ($root == $id_rubrique) ? ' selected="selected"' : '';
138
+
139
+    // le style en fonction de la profondeur
140
+    [$class, $style, $espace] = style_menu_rubriques($niv);
141
+
142
+    $class .= ' selec_rub';
143
+
144
+    // creer l'<option> pour la rubrique $root
145
+
146
+    if (isset($data[$root])) { # pas de racine sauf pour les rubriques
147
+    $r = "<option$selected value='$root' class='$class' style='$style'>$espace"
148
+            . $data[$root]
149
+            . '</option>' . "\n";
150
+    } else {
151
+        $r = '';
152
+    }
153
+
154
+    // et le sous-menu pour ses enfants
155
+    $sous = '';
156
+    if (isset($enfants[$root])) {
157
+        foreach ($enfants[$root] as $sousrub) {
158
+            $sous .= sous_menu_rubriques(
159
+                $id_rubrique,
160
+                $sousrub,
161
+                $niv + 1,
162
+                $data,
163
+                $enfants,
164
+                $exclus,
165
+                $restreint,
166
+                $type
167
+            );
168
+        }
169
+    }
170
+
171
+    // si l'objet a deplacer est publie, verifier qu'on a acces aux rubriques
172
+    if ($restreint and $root != $id_rubrique and !autoriser('publierdans', 'rubrique', $root)) {
173
+        return $sous;
174
+    }
175
+
176
+    // et voila le travail
177
+    return $r . $sous;
178 178
 }
179 179
 
180 180
 /**
@@ -195,75 +195,75 @@  discard block
 block discarded – undo
195 195
  *     Code HTML du sélecteur
196 196
  **/
197 197
 function selecteur_rubrique_html($id_rubrique, $type, $restreint, $idem = 0) {
198
-	$enfants = [];
199
-	$data = [];
200
-	if ($type == 'rubrique' and autoriser('publierdans', 'rubrique', 0)) {
201
-		$data[0] = _T('info_racine_site');
202
-	}
203
-	# premier choix = neant
204
-	# si auteur (rubriques restreintes)
205
-	# ou si creation avec id_rubrique=0
206
-	elseif ($type == 'auteur' or !$id_rubrique) {
207
-		$data[0] = '&nbsp;';
208
-	}
209
-
210
-	//
211
-	// creer une structure contenant toute l'arborescence
212
-	//
213
-
214
-	include_spip('base/abstract_sql');
215
-	$q = sql_select(
216
-		'id_rubrique, id_parent, titre, statut, lang, langue_choisie',
217
-		'spip_rubriques',
218
-		($type == 'breve' ? ' id_parent=0 ' : ''),
219
-		'',
220
-		'0+titre,titre'
221
-	);
222
-	while ($r = sql_fetch($q)) {
223
-		if (autoriser('voir', 'rubrique', $r['id_rubrique'])) {
224
-			// titre largeur maxi a 50
225
-			$titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50);
226
-			if (
227
-				$GLOBALS['meta']['multi_rubriques'] == 'oui'
228
-				and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0)
229
-			) {
230
-				$titre .= ' [' . traduire_nom_langue($r['lang']) . ']';
231
-			}
232
-			$data[$r['id_rubrique']] = $titre;
233
-			$enfants[$r['id_parent']][] = $r['id_rubrique'];
234
-			if ($id_rubrique == $r['id_rubrique']) {
235
-				$id_parent = $r['id_parent'];
236
-			}
237
-		}
238
-	}
239
-
240
-	// si une seule rubrique comme choix possible,
241
-	// inutile de mettre le selecteur sur un choix vide par defaut
242
-	// sauf si le selecteur s'adresse a une rubrique puisque on peut la mettre a la racine dans ce cas
243
-	if (
244
-		count($data) == 2
245
-		and isset($data[0])
246
-		and !in_array($type, ['auteur', 'rubrique'])
247
-		and !$id_rubrique
248
-	) {
249
-		unset($data[0]);
250
-	}
251
-
252
-
253
-	$opt = sous_menu_rubriques($id_rubrique, 0, 0, $data, $enfants, $idem, $restreint, $type);
254
-	$att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'";
255
-
256
-	if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) {
257
-		$r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2];
258
-	} else {
259
-		$r = '<select' . $att . " size='1'>\n$opt</select>\n";
260
-	}
261
-
262
-	# message pour neuneus (a supprimer ?)
198
+    $enfants = [];
199
+    $data = [];
200
+    if ($type == 'rubrique' and autoriser('publierdans', 'rubrique', 0)) {
201
+        $data[0] = _T('info_racine_site');
202
+    }
203
+    # premier choix = neant
204
+    # si auteur (rubriques restreintes)
205
+    # ou si creation avec id_rubrique=0
206
+    elseif ($type == 'auteur' or !$id_rubrique) {
207
+        $data[0] = '&nbsp;';
208
+    }
209
+
210
+    //
211
+    // creer une structure contenant toute l'arborescence
212
+    //
213
+
214
+    include_spip('base/abstract_sql');
215
+    $q = sql_select(
216
+        'id_rubrique, id_parent, titre, statut, lang, langue_choisie',
217
+        'spip_rubriques',
218
+        ($type == 'breve' ? ' id_parent=0 ' : ''),
219
+        '',
220
+        '0+titre,titre'
221
+    );
222
+    while ($r = sql_fetch($q)) {
223
+        if (autoriser('voir', 'rubrique', $r['id_rubrique'])) {
224
+            // titre largeur maxi a 50
225
+            $titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50);
226
+            if (
227
+                $GLOBALS['meta']['multi_rubriques'] == 'oui'
228
+                and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0)
229
+            ) {
230
+                $titre .= ' [' . traduire_nom_langue($r['lang']) . ']';
231
+            }
232
+            $data[$r['id_rubrique']] = $titre;
233
+            $enfants[$r['id_parent']][] = $r['id_rubrique'];
234
+            if ($id_rubrique == $r['id_rubrique']) {
235
+                $id_parent = $r['id_parent'];
236
+            }
237
+        }
238
+    }
239
+
240
+    // si une seule rubrique comme choix possible,
241
+    // inutile de mettre le selecteur sur un choix vide par defaut
242
+    // sauf si le selecteur s'adresse a une rubrique puisque on peut la mettre a la racine dans ce cas
243
+    if (
244
+        count($data) == 2
245
+        and isset($data[0])
246
+        and !in_array($type, ['auteur', 'rubrique'])
247
+        and !$id_rubrique
248
+    ) {
249
+        unset($data[0]);
250
+    }
251
+
252
+
253
+    $opt = sous_menu_rubriques($id_rubrique, 0, 0, $data, $enfants, $idem, $restreint, $type);
254
+    $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'";
255
+
256
+    if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) {
257
+        $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2];
258
+    } else {
259
+        $r = '<select' . $att . " size='1'>\n$opt</select>\n";
260
+    }
261
+
262
+    # message pour neuneus (a supprimer ?)
263 263
 #	if ($type != 'auteur' AND $type != 'breve')
264 264
 #		$r .= "\n<br />"._T('texte_rappel_selection_champs');
265 265
 
266
-	return $r;
266
+    return $r;
267 267
 }
268 268
 
269 269
 /**
@@ -297,26 +297,26 @@  discard block
 block discarded – undo
297 297
  */
298 298
 function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') {
299 299
 
300
-	if ($id_rubrique) {
301
-		$titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
302
-	} else {
303
-		if ($type == 'auteur') {
304
-			$titre = '&nbsp;';
305
-		} else {
306
-			$titre = _T('info_racine_site');
307
-		}
308
-	}
300
+    if ($id_rubrique) {
301
+        $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
302
+    } else {
303
+        if ($type == 'auteur') {
304
+            $titre = '&nbsp;';
305
+        } else {
306
+            $titre = _T('info_racine_site');
307
+        }
308
+    }
309 309
 
310
-	$titre = str_replace('&amp;', '&', entites_html(textebrut(typo($titre))));
311
-	$init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'";
310
+    $titre = str_replace('&amp;', '&', entites_html(textebrut(typo($titre))));
311
+    $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'";
312 312
 
313
-	$url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do"
314
-		. (!$idem ? '' : "&exclus=$idem")
315
-		. ($restreint ? '' : '&racine=oui')
316
-		. (isset($GLOBALS['var_profile']) ? '&var_profile=1' : ''));
313
+    $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do"
314
+        . (!$idem ? '' : "&exclus=$idem")
315
+        . ($restreint ? '' : '&racine=oui')
316
+        . (isset($GLOBALS['var_profile']) ? '&var_profile=1' : ''));
317 317
 
318 318
 
319
-	return construire_selecteur($url, '', 'selection_rubrique', 'id_parent', $init, $id_rubrique);
319
+    return construire_selecteur($url, '', 'selection_rubrique', 'id_parent', $init, $id_rubrique);
320 320
 }
321 321
 
322 322
 /**
@@ -346,30 +346,30 @@  discard block
 block discarded – undo
346 346
  *     Code HTML du sélecteur de rubrique AJAX
347 347
  **/
348 348
 function construire_selecteur($url, $js, $idom, $name, $init = '', $id = 0) {
349
-	$icone = (strpos($idom, 'auteur') !== false) ? 'auteur-24.png' : 'rechercher-20.png';
350
-	// si icone de recherche on embed le svg
351
-	$balise = ($icone === 'rechercher-20.png' ? chercher_filtre('balise_svg') : chercher_filtre('balise_img'));
352
-	$img_icone = $balise(chemin_image($icone), _T('titre_image_selecteur'));
353
-
354
-	return
355
-		"<div class='rubrique_actuelle'><a href='#' class='rubrique-search' role='button' style='display:inline-flex;vertical-align:middle;' onclick=\""
356
-		. $js
357
-		. " jQuery(this).toggleClass('toggled'); "
358
-		. "return charger_node_url_si_vide('"
359
-		. $url
360
-		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>"
361
-		. $img_icone
362
-		. "</a><img src='"
363
-		. chemin_image('loader.svg')
364
-		. "' class='loader' id='img_"
365
-		. $idom
366
-		. "'\nstyle='visibility: hidden;' alt='*' />"
367
-		. "<input id='titreparent' name='titreparent' class='text'"
368
-		. $init
369
-		. ' />'
370
-		. "<input type='hidden' id='$name' name='$name' value='"
371
-		. $id
372
-		. "' /><div class='nettoyeur'></div></div><div id='"
373
-		. $idom
374
-		. "'\nstyle='display: none;'></div>";
349
+    $icone = (strpos($idom, 'auteur') !== false) ? 'auteur-24.png' : 'rechercher-20.png';
350
+    // si icone de recherche on embed le svg
351
+    $balise = ($icone === 'rechercher-20.png' ? chercher_filtre('balise_svg') : chercher_filtre('balise_img'));
352
+    $img_icone = $balise(chemin_image($icone), _T('titre_image_selecteur'));
353
+
354
+    return
355
+        "<div class='rubrique_actuelle'><a href='#' class='rubrique-search' role='button' style='display:inline-flex;vertical-align:middle;' onclick=\""
356
+        . $js
357
+        . " jQuery(this).toggleClass('toggled'); "
358
+        . "return charger_node_url_si_vide('"
359
+        . $url
360
+        . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>"
361
+        . $img_icone
362
+        . "</a><img src='"
363
+        . chemin_image('loader.svg')
364
+        . "' class='loader' id='img_"
365
+        . $idom
366
+        . "'\nstyle='visibility: hidden;' alt='*' />"
367
+        . "<input id='titreparent' name='titreparent' class='text'"
368
+        . $init
369
+        . ' />'
370
+        . "<input type='hidden' id='$name' name='$name' value='"
371
+        . $id
372
+        . "' /><div class='nettoyeur'></div></div><div id='"
373
+        . $idom
374
+        . "'\nstyle='display: none;'></div>";
375 375
 }
Please login to merge, or discard this patch.
ecrire/inc/meta.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			renouvelle_alea();
66 66
 			$new = false;
67 67
 		} else {
68
-			spip_log("impossible d'ecrire dans " . $cache);
68
+			spip_log("impossible d'ecrire dans ".$cache);
69 69
 		}
70 70
 	}
71 71
 	// et refaire le cache si on a du lire en base
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	if (!isset($touch[$table])) {
167 167
 		touch_meta($antidate, $table);
168 168
 	}
169
-	sql_delete('spip_' . $table, "nom='$nom'", '', 'continue');
169
+	sql_delete('spip_'.$table, "nom='$nom'", '', 'continue');
170 170
 	unset($GLOBALS[$table][$nom]);
171 171
 	if (!isset($touch[$table])) {
172 172
 		touch_meta($antidate, $table);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		return;
198 198
 	}
199 199
 	include_spip('base/abstract_sql');
200
-	$res = sql_select('*', 'spip_' . $table, 'nom=' . sql_quote($nom), '', '', '', '', '', 'continue');
200
+	$res = sql_select('*', 'spip_'.$table, 'nom='.sql_quote($nom), '', '', '', '', '', 'continue');
201 201
 	// table pas encore installee, travailler en php seulement
202 202
 	if (!$res) {
203 203
 		$GLOBALS[$table][$nom] = $valeur;
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 		$r['impt'] = sql_quote($importable, '', 'text');
232 232
 	}
233 233
 	if ($row) {
234
-		sql_update('spip_' . $table, $r, 'nom=' . sql_quote($nom));
234
+		sql_update('spip_'.$table, $r, 'nom='.sql_quote($nom));
235 235
 	} else {
236
-		sql_insert('spip_' . $table, '(' . join(',', array_keys($r)) . ')', '(' . join(',', array_values($r)) . ')');
236
+		sql_insert('spip_'.$table, '('.join(',', array_keys($r)).')', '('.join(',', array_values($r)).')');
237 237
 	}
238 238
 	if (!isset($touch[$table])) {
239 239
 		touch_meta($antidate, $table);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
  *     Nom du fichier cache
251 251
  **/
252 252
 function cache_meta($table = 'meta') {
253
-	return ($table == 'meta') ? _FILE_META : (_DIR_CACHE . $table . '.php');
253
+	return ($table == 'meta') ? _FILE_META : (_DIR_CACHE.$table.'.php');
254 254
 }
255 255
 
256 256
 /**
Please login to merge, or discard this patch.
Indentation   +197 added lines, -197 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 // Les parametres generaux du site sont dans une table SQL;
@@ -27,51 +27,51 @@  discard block
 block discarded – undo
27 27
 define('_META_CACHE_TIME', 1 << 24);
28 28
 
29 29
 function inc_meta_dist($table = 'meta') {
30
-	$new = null;
31
-	// Lire les meta, en cache si present, valide et lisible
32
-	// en cas d'install ne pas faire confiance au meta_cache eventuel
33
-	$cache = cache_meta($table);
30
+    $new = null;
31
+    // Lire les meta, en cache si present, valide et lisible
32
+    // en cas d'install ne pas faire confiance au meta_cache eventuel
33
+    $cache = cache_meta($table);
34 34
 
35
-	if (
36
-		(!$exec = _request('exec') or !autoriser_sans_cookie($exec))
37
-		and $new = jeune_fichier($cache, _META_CACHE_TIME)
38
-		and lire_fichier_securise($cache, $meta)
39
-		and $meta = @unserialize($meta)
40
-	) {
41
-		$GLOBALS[$table] = $meta;
42
-	}
35
+    if (
36
+        (!$exec = _request('exec') or !autoriser_sans_cookie($exec))
37
+        and $new = jeune_fichier($cache, _META_CACHE_TIME)
38
+        and lire_fichier_securise($cache, $meta)
39
+        and $meta = @unserialize($meta)
40
+    ) {
41
+        $GLOBALS[$table] = $meta;
42
+    }
43 43
 
44
-	if (
45
-		isset($GLOBALS[$table]['touch'])
46
-		and ($GLOBALS[$table]['touch'] < time() - _META_CACHE_TIME)
47
-	) {
48
-		$GLOBALS[$table] = [];
49
-	}
50
-	// sinon lire en base
51
-	if (!$GLOBALS[$table]) {
52
-		$new = !lire_metas($table);
53
-	}
44
+    if (
45
+        isset($GLOBALS[$table]['touch'])
46
+        and ($GLOBALS[$table]['touch'] < time() - _META_CACHE_TIME)
47
+    ) {
48
+        $GLOBALS[$table] = [];
49
+    }
50
+    // sinon lire en base
51
+    if (!$GLOBALS[$table]) {
52
+        $new = !lire_metas($table);
53
+    }
54 54
 
55
-	// renouveller l'alea general si trop vieux ou sur demande explicite
56
-	if (
57
-		(test_espace_prive() || isset($_GET['renouvelle_alea']))
58
-		and $GLOBALS[$table]
59
-		and (time() > _RENOUVELLE_ALEA + ($GLOBALS['meta']['alea_ephemere_date'] ?? 0))
60
-	) {
61
-		// si on n'a pas l'acces en ecriture sur le cache,
62
-		// ne pas renouveller l'alea sinon le cache devient faux
63
-		if (supprimer_fichier($cache)) {
64
-			include_spip('inc/acces');
65
-			renouvelle_alea();
66
-			$new = false;
67
-		} else {
68
-			spip_log("impossible d'ecrire dans " . $cache);
69
-		}
70
-	}
71
-	// et refaire le cache si on a du lire en base
72
-	if (!$new) {
73
-		touch_meta(false, $table);
74
-	}
55
+    // renouveller l'alea general si trop vieux ou sur demande explicite
56
+    if (
57
+        (test_espace_prive() || isset($_GET['renouvelle_alea']))
58
+        and $GLOBALS[$table]
59
+        and (time() > _RENOUVELLE_ALEA + ($GLOBALS['meta']['alea_ephemere_date'] ?? 0))
60
+    ) {
61
+        // si on n'a pas l'acces en ecriture sur le cache,
62
+        // ne pas renouveller l'alea sinon le cache devient faux
63
+        if (supprimer_fichier($cache)) {
64
+            include_spip('inc/acces');
65
+            renouvelle_alea();
66
+            $new = false;
67
+        } else {
68
+            spip_log("impossible d'ecrire dans " . $cache);
69
+        }
70
+    }
71
+    // et refaire le cache si on a du lire en base
72
+    if (!$new) {
73
+        touch_meta(false, $table);
74
+    }
75 75
 }
76 76
 
77 77
 // fonctions aussi appelees a l'install ==> spip_query en premiere requete
@@ -79,39 +79,39 @@  discard block
 block discarded – undo
79 79
 
80 80
 function lire_metas($table = 'meta') {
81 81
 
82
-	if ($result = spip_query("SELECT nom,valeur FROM spip_$table")) {
83
-		include_spip('base/abstract_sql');
84
-		$GLOBALS[$table] = [];
85
-		while ($row = sql_fetch($result)) {
86
-			$GLOBALS[$table][$row['nom']] = $row['valeur'];
87
-		}
88
-		sql_free($result);
82
+    if ($result = spip_query("SELECT nom,valeur FROM spip_$table")) {
83
+        include_spip('base/abstract_sql');
84
+        $GLOBALS[$table] = [];
85
+        while ($row = sql_fetch($result)) {
86
+            $GLOBALS[$table][$row['nom']] = $row['valeur'];
87
+        }
88
+        sql_free($result);
89 89
 
90
-		if (
91
-			!isset($GLOBALS[$table]['charset'])
92
-			or !$GLOBALS[$table]['charset']
93
-			or $GLOBALS[$table]['charset'] == '_DEFAULT_CHARSET' // hum, correction d'un bug ayant abime quelques install
94
-		) {
95
-			ecrire_meta('charset', _DEFAULT_CHARSET, null, $table);
96
-		}
90
+        if (
91
+            !isset($GLOBALS[$table]['charset'])
92
+            or !$GLOBALS[$table]['charset']
93
+            or $GLOBALS[$table]['charset'] == '_DEFAULT_CHARSET' // hum, correction d'un bug ayant abime quelques install
94
+        ) {
95
+            ecrire_meta('charset', _DEFAULT_CHARSET, null, $table);
96
+        }
97 97
 
98
-		// noter cette table de configuration dans les meta de SPIP
99
-		if ($table !== 'meta') {
100
-			$liste = [];
101
-			if (isset($GLOBALS['meta']['tables_config'])) {
102
-				$liste = unserialize($GLOBALS['meta']['tables_config']);
103
-			}
104
-			if (!$liste) {
105
-				$liste = [];
106
-			}
107
-			if (!in_array($table, $liste)) {
108
-				$liste[] = $table;
109
-				ecrire_meta('tables_config', serialize($liste));
110
-			}
111
-		}
112
-	}
98
+        // noter cette table de configuration dans les meta de SPIP
99
+        if ($table !== 'meta') {
100
+            $liste = [];
101
+            if (isset($GLOBALS['meta']['tables_config'])) {
102
+                $liste = unserialize($GLOBALS['meta']['tables_config']);
103
+            }
104
+            if (!$liste) {
105
+                $liste = [];
106
+            }
107
+            if (!in_array($table, $liste)) {
108
+                $liste[] = $table;
109
+                ecrire_meta('tables_config', serialize($liste));
110
+            }
111
+        }
112
+    }
113 113
 
114
-	return $GLOBALS[$table] ?? null;
114
+    return $GLOBALS[$table] ?? null;
115 115
 }
116 116
 
117 117
 
@@ -125,22 +125,22 @@  discard block
 block discarded – undo
125 125
  *      Table SQL d'enregistrement des meta.
126 126
  **/
127 127
 function touch_meta($antidate = false, $table = 'meta') {
128
-	$file = cache_meta($table);
129
-	if (!$antidate or !@touch($file, $antidate)) {
130
-		$r = $GLOBALS[$table] ?? [];
131
-		if ($table == 'meta') {
132
-			unset($r['alea_ephemere']);
133
-			unset($r['alea_ephemere_ancien']);
134
-			// le secret du site est utilise pour encoder les contextes ajax que l'on considere fiables
135
-			// mais le sortir deu cache meta implique une requete sql des qu'on a un form dynamique
136
-			// meme si son squelette est en cache
137
-			//unset($r['secret_du_site']);
138
-			if ($antidate) {
139
-				$r['touch'] = $antidate;
140
-			}
141
-		}
142
-		ecrire_fichier_securise($file, serialize($r));
143
-	}
128
+    $file = cache_meta($table);
129
+    if (!$antidate or !@touch($file, $antidate)) {
130
+        $r = $GLOBALS[$table] ?? [];
131
+        if ($table == 'meta') {
132
+            unset($r['alea_ephemere']);
133
+            unset($r['alea_ephemere_ancien']);
134
+            // le secret du site est utilise pour encoder les contextes ajax que l'on considere fiables
135
+            // mais le sortir deu cache meta implique une requete sql des qu'on a un form dynamique
136
+            // meme si son squelette est en cache
137
+            //unset($r['secret_du_site']);
138
+            if ($antidate) {
139
+                $r['touch'] = $antidate;
140
+            }
141
+        }
142
+        ecrire_fichier_securise($file, serialize($r));
143
+    }
144 144
 }
145 145
 
146 146
 /**
@@ -156,21 +156,21 @@  discard block
 block discarded – undo
156 156
  *     Table SQL d'enregistrement de la meta.
157 157
  **/
158 158
 function effacer_meta($nom, $table = 'meta') {
159
-	// section critique sur le cache:
160
-	// l'invalider avant et apres la MAJ de la BD
161
-	// c'est un peu moins bien qu'un vrai verrou mais ca suffira
162
-	// et utiliser une statique pour eviter des acces disques a repetition
163
-	static $touch = [];
164
-	$antidate = time() - (_META_CACHE_TIME << 4);
165
-	if (!isset($touch[$table])) {
166
-		touch_meta($antidate, $table);
167
-	}
168
-	sql_delete('spip_' . $table, "nom='$nom'", '', 'continue');
169
-	unset($GLOBALS[$table][$nom]);
170
-	if (!isset($touch[$table])) {
171
-		touch_meta($antidate, $table);
172
-		$touch[$table] = false;
173
-	}
159
+    // section critique sur le cache:
160
+    // l'invalider avant et apres la MAJ de la BD
161
+    // c'est un peu moins bien qu'un vrai verrou mais ca suffira
162
+    // et utiliser une statique pour eviter des acces disques a repetition
163
+    static $touch = [];
164
+    $antidate = time() - (_META_CACHE_TIME << 4);
165
+    if (!isset($touch[$table])) {
166
+        touch_meta($antidate, $table);
167
+    }
168
+    sql_delete('spip_' . $table, "nom='$nom'", '', 'continue');
169
+    unset($GLOBALS[$table][$nom]);
170
+    if (!isset($touch[$table])) {
171
+        touch_meta($antidate, $table);
172
+        $touch[$table] = false;
173
+    }
174 174
 }
175 175
 
176 176
 /**
@@ -191,53 +191,53 @@  discard block
 block discarded – undo
191 191
  **/
192 192
 function ecrire_meta($nom, $valeur, $importable = null, $table = 'meta') {
193 193
 
194
-	static $touch = [];
195
-	if (!$nom) {
196
-		return;
197
-	}
198
-	include_spip('base/abstract_sql');
199
-	$res = sql_select('*', 'spip_' . $table, 'nom=' . sql_quote($nom), '', '', '', '', '', 'continue');
200
-	// table pas encore installee, travailler en php seulement
201
-	if (!$res) {
202
-		$GLOBALS[$table][$nom] = $valeur;
194
+    static $touch = [];
195
+    if (!$nom) {
196
+        return;
197
+    }
198
+    include_spip('base/abstract_sql');
199
+    $res = sql_select('*', 'spip_' . $table, 'nom=' . sql_quote($nom), '', '', '', '', '', 'continue');
200
+    // table pas encore installee, travailler en php seulement
201
+    if (!$res) {
202
+        $GLOBALS[$table][$nom] = $valeur;
203 203
 
204
-		return;
205
-	}
206
-	$row = sql_fetch($res);
207
-	sql_free($res);
204
+        return;
205
+    }
206
+    $row = sql_fetch($res);
207
+    sql_free($res);
208 208
 
209
-	// ne pas invalider le cache si affectation a l'identique
210
-	// (tant pis si impt aurait du changer)
211
-	if (
212
-		$row and $valeur == $row['valeur']
213
-		and isset($GLOBALS[$table][$nom])
214
-		and $GLOBALS[$table][$nom] == $valeur
215
-	) {
216
-		return;
217
-	}
209
+    // ne pas invalider le cache si affectation a l'identique
210
+    // (tant pis si impt aurait du changer)
211
+    if (
212
+        $row and $valeur == $row['valeur']
213
+        and isset($GLOBALS[$table][$nom])
214
+        and $GLOBALS[$table][$nom] == $valeur
215
+    ) {
216
+        return;
217
+    }
218 218
 
219
-	$GLOBALS[$table][$nom] = $valeur;
220
-	// cf effacer pour comprendre le double touch
221
-	$antidate = time() - (_META_CACHE_TIME << 1);
222
-	if (!isset($touch[$table])) {
223
-		touch_meta($antidate, $table);
224
-	}
225
-	$r = ['nom' => sql_quote($nom, '', 'text'), 'valeur' => sql_quote($valeur, '', 'text')];
226
-	// Gaffe aux tables sans impt (vieilles versions de SPIP notamment)
227
-	// ici on utilise pas sql_updateq et sql_insertq pour ne pas provoquer trop tot
228
-	// de lecture des descriptions des tables
229
-	if ($importable and isset($row['impt'])) {
230
-		$r['impt'] = sql_quote($importable, '', 'text');
231
-	}
232
-	if ($row) {
233
-		sql_update('spip_' . $table, $r, 'nom=' . sql_quote($nom));
234
-	} else {
235
-		sql_insert('spip_' . $table, '(' . join(',', array_keys($r)) . ')', '(' . join(',', array_values($r)) . ')');
236
-	}
237
-	if (!isset($touch[$table])) {
238
-		touch_meta($antidate, $table);
239
-		$touch[$table] = false;
240
-	}
219
+    $GLOBALS[$table][$nom] = $valeur;
220
+    // cf effacer pour comprendre le double touch
221
+    $antidate = time() - (_META_CACHE_TIME << 1);
222
+    if (!isset($touch[$table])) {
223
+        touch_meta($antidate, $table);
224
+    }
225
+    $r = ['nom' => sql_quote($nom, '', 'text'), 'valeur' => sql_quote($valeur, '', 'text')];
226
+    // Gaffe aux tables sans impt (vieilles versions de SPIP notamment)
227
+    // ici on utilise pas sql_updateq et sql_insertq pour ne pas provoquer trop tot
228
+    // de lecture des descriptions des tables
229
+    if ($importable and isset($row['impt'])) {
230
+        $r['impt'] = sql_quote($importable, '', 'text');
231
+    }
232
+    if ($row) {
233
+        sql_update('spip_' . $table, $r, 'nom=' . sql_quote($nom));
234
+    } else {
235
+        sql_insert('spip_' . $table, '(' . join(',', array_keys($r)) . ')', '(' . join(',', array_values($r)) . ')');
236
+    }
237
+    if (!isset($touch[$table])) {
238
+        touch_meta($antidate, $table);
239
+        $touch[$table] = false;
240
+    }
241 241
 }
242 242
 
243 243
 /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
  *     Nom du fichier cache
250 250
  **/
251 251
 function cache_meta($table = 'meta') {
252
-	return ($table == 'meta') ? _FILE_META : (_DIR_CACHE . $table . '.php');
252
+    return ($table == 'meta') ? _FILE_META : (_DIR_CACHE . $table . '.php');
253 253
 }
254 254
 
255 255
 /**
@@ -258,14 +258,14 @@  discard block
 block discarded – undo
258 258
  * @param string $table
259 259
  */
260 260
 function installer_table_meta($table) {
261
-	$trouver_table = charger_fonction('trouver_table', 'base');
262
-	if (!$trouver_table("spip_$table")) {
263
-		include_spip('base/auxiliaires');
264
-		include_spip('base/create');
265
-		creer_ou_upgrader_table("spip_$table", $GLOBALS['tables_auxiliaires']['spip_meta'], false, false);
266
-		$trouver_table('');
267
-	}
268
-	lire_metas($table);
261
+    $trouver_table = charger_fonction('trouver_table', 'base');
262
+    if (!$trouver_table("spip_$table")) {
263
+        include_spip('base/auxiliaires');
264
+        include_spip('base/create');
265
+        creer_ou_upgrader_table("spip_$table", $GLOBALS['tables_auxiliaires']['spip_meta'], false, false);
266
+        $trouver_table('');
267
+    }
268
+    lire_metas($table);
269 269
 }
270 270
 
271 271
 /**
@@ -277,47 +277,47 @@  discard block
 block discarded – undo
277 277
  * @param bool $force
278 278
  */
279 279
 function supprimer_table_meta($table, $force = false) {
280
-	if ($table !== 'meta') {
281
-		// Vérifier le contenu restant de la table
282
-		$nb_variables = sql_countsel("spip_$table");
280
+    if ($table !== 'meta') {
281
+        // Vérifier le contenu restant de la table
282
+        $nb_variables = sql_countsel("spip_$table");
283 283
 
284
-		// Supprimer si :
285
-		// - la table est vide
286
-		// - ou limitée à la variable charset
287
-		// - ou qu'on force la suppression
288
-		if (
289
-			$force
290
-			or !$nb_variables
291
-			or (
292
-				($nb_variables == 1)
293
-				and isset($GLOBALS[$table]['charset'])
294
-			)
295
-		) {
296
-			// Supprimer la table des globaleset de la base
297
-			unset($GLOBALS[$table]);
298
-			sql_drop_table("spip_$table");
299
-			// Supprimer le fichier cache
300
-			include_spip('inc/flock');
301
-			$cache = cache_meta($table);
302
-			supprimer_fichier($cache);
284
+        // Supprimer si :
285
+        // - la table est vide
286
+        // - ou limitée à la variable charset
287
+        // - ou qu'on force la suppression
288
+        if (
289
+            $force
290
+            or !$nb_variables
291
+            or (
292
+                ($nb_variables == 1)
293
+                and isset($GLOBALS[$table]['charset'])
294
+            )
295
+        ) {
296
+            // Supprimer la table des globaleset de la base
297
+            unset($GLOBALS[$table]);
298
+            sql_drop_table("spip_$table");
299
+            // Supprimer le fichier cache
300
+            include_spip('inc/flock');
301
+            $cache = cache_meta($table);
302
+            supprimer_fichier($cache);
303 303
 
304
-			// vider le cache des tables
305
-			$trouver_table = charger_fonction('trouver_table', 'base');
306
-			$trouver_table('');
304
+            // vider le cache des tables
305
+            $trouver_table = charger_fonction('trouver_table', 'base');
306
+            $trouver_table('');
307 307
 
308
-			// Supprimer la table de la liste des tables de configuration autres que spip_meta
309
-			if (isset($GLOBALS['meta']['tables_config'])) {
310
-				$liste = unserialize($GLOBALS['meta']['tables_config']);
311
-				$cle = array_search($table, $liste);
312
-				if ($cle !== false) {
313
-					unset($liste[$cle]);
314
-					if ($liste) {
315
-						ecrire_meta('tables_config', serialize($liste));
316
-					} else {
317
-						effacer_meta('tables_config');
318
-					}
319
-				}
320
-			}
321
-		}
322
-	}
308
+            // Supprimer la table de la liste des tables de configuration autres que spip_meta
309
+            if (isset($GLOBALS['meta']['tables_config'])) {
310
+                $liste = unserialize($GLOBALS['meta']['tables_config']);
311
+                $cle = array_search($table, $liste);
312
+                if ($cle !== false) {
313
+                    unset($liste[$cle]);
314
+                    if ($liste) {
315
+                        ecrire_meta('tables_config', serialize($liste));
316
+                    } else {
317
+                        effacer_meta('tables_config');
318
+                    }
319
+                }
320
+            }
321
+        }
322
+    }
323 323
 }
Please login to merge, or discard this patch.
ecrire/balise/url_.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 function generer_generer_url_arg($type, $p, $_id) {
76 76
 	if ($s = trouver_nom_serveur_distant($p)) {
77 77
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
78
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
79 79
 			return $f($type, $_id, $s);
80 80
 		}
81 81
 		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 		# exception des urls de documents sur un serveur distant...
86 86
 		if ($type == 'document') {
87 87
 			return
88
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
89
-				"quete_meta('dir_img', $s) . \n\t" .
88
+				"quete_meta('adresse_site', $s) . '/' .\n\t".
89
+				"quete_meta('dir_img', $s) . \n\t".
90 90
 				"quete_fichier($_id,$s)";
91 91
 		}
92 92
 		$s = ", '', '', $s, quete_meta('type_urls', $s)";
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
  */
231 231
 function balise_URL_SITE_SPIP_dist($p) {
232 232
 	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
-	$p->code = 'spip_htmlspecialchars(' . $p->code . ')';
233
+	$p->code = 'spip_htmlspecialchars('.$p->code.')';
234 234
 	$p->interdire_scripts = false;
235 235
 
236 236
 	return $p;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	if ($s = trouver_nom_serveur_distant($p)) {
272 272
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
273 273
 		// elle devra aussi traiter le cas derogatoire type=page
274
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
274
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
275 275
 			if ($args and $args !== "''") {
276 276
 				$code .= ", $args";
277 277
 			}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			$p->code = $code;
280 280
 			return $p;
281 281
 		}
282
-		$s = 'connect=' . addslashes($s);
282
+		$s = 'connect='.addslashes($s);
283 283
 		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284 284
 	}
285 285
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		$code = "generer_url_public($code, $args$noentities)";
295 295
 	}
296 296
 	$p->code = $code;
297
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
297
+	spip_log("Calcul url page : connect vaut $s ca donne :".$p->code." args $args", _LOG_INFO);
298 298
 
299 299
 	#$p->interdire_scripts = true;
300 300
 	return $p;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			$fonc .= ",$args$noentities";
339 339
 		}
340 340
 	}
341
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
341
+	$p->code = 'generer_url_ecrire('.$fonc.')';
342 342
 	$p->interdire_scripts = false;
343 343
 
344 344
 	return $p;
@@ -373,17 +373,17 @@  discard block
 block discarded – undo
373 373
 
374 374
 	$args = interprete_argument_balise(2, $p);
375 375
 	if ($args != "''" && $args !== null) {
376
-		$p->code .= ',' . $args;
376
+		$p->code .= ','.$args;
377 377
 	}
378 378
 	$redirect = interprete_argument_balise(3, $p);
379 379
 	if ($redirect != "''" && $redirect !== null) {
380 380
 		if ($args == "''" || $args === null) {
381 381
 			$p->code .= ",''";
382 382
 		}
383
-		$p->code .= ',' . $redirect;
383
+		$p->code .= ','.$redirect;
384 384
 	}
385 385
 
386
-	$p->code = 'generer_action_auteur(' . $p->code . ')';
386
+	$p->code = 'generer_action_auteur('.$p->code.')';
387 387
 	$p->interdire_scripts = false;
388 388
 
389 389
 	return $p;
Please login to merge, or discard this patch.
Indentation   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  **/
20 20
 
21 21
 if (!defined('_ECRIRE_INC_VERSION')) {
22
-	return;
22
+    return;
23 23
 }
24 24
 
25 25
 /**
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
  *     Code compilé
38 38
  **/
39 39
 function generer_generer_url($type, $p) {
40
-	$_id = interprete_argument_balise(1, $p);
40
+    $_id = interprete_argument_balise(1, $p);
41 41
 
42
-	if (!$_id) {
43
-		$primary = id_table_objet($type);
44
-		$_id = champ_sql($primary, $p);
45
-	}
42
+    if (!$_id) {
43
+        $primary = id_table_objet($type);
44
+        $_id = champ_sql($primary, $p);
45
+    }
46 46
 
47
-	return generer_generer_url_arg($type, $p, $_id);
47
+    return generer_generer_url_arg($type, $p, $_id);
48 48
 }
49 49
 
50 50
 /**
@@ -73,28 +73,28 @@  discard block
 block discarded – undo
73 73
  *     Code compilé
74 74
  **/
75 75
 function generer_generer_url_arg($type, $p, $_id) {
76
-	if ($s = trouver_nom_serveur_distant($p)) {
77
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
79
-			return $f($type, $_id, $s);
80
-		}
81
-		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
82
-			return null;
83
-		}
84
-		$s = _q($s);
85
-		# exception des urls de documents sur un serveur distant...
86
-		if ($type == 'document') {
87
-			return
88
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
89
-				"quete_meta('dir_img', $s) . \n\t" .
90
-				"quete_fichier($_id,$s)";
91
-		}
92
-		$s = ", '', '', $s, quete_meta('type_urls', $s)";
93
-	} else {
94
-		$s = ", '', '', true";
95
-	}
96
-
97
-	return "urlencode_1738(generer_objet_url($_id, '$type'$s))";
76
+    if ($s = trouver_nom_serveur_distant($p)) {
77
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
79
+            return $f($type, $_id, $s);
80
+        }
81
+        if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
82
+            return null;
83
+        }
84
+        $s = _q($s);
85
+        # exception des urls de documents sur un serveur distant...
86
+        if ($type == 'document') {
87
+            return
88
+                "quete_meta('adresse_site', $s) . '/' .\n\t" .
89
+                "quete_meta('dir_img', $s) . \n\t" .
90
+                "quete_fichier($_id,$s)";
91
+        }
92
+        $s = ", '', '', $s, quete_meta('type_urls', $s)";
93
+    } else {
94
+        $s = ", '', '', true";
95
+    }
96
+
97
+    return "urlencode_1738(generer_objet_url($_id, '$type'$s))";
98 98
 }
99 99
 
100 100
 
@@ -119,27 +119,27 @@  discard block
 block discarded – undo
119 119
  */
120 120
 function balise_URL__dist($p) {
121 121
 
122
-	$nom = $p->nom_champ;
123
-	if ($nom === 'URL_') {
124
-		$msg = ['zbug_balise_sans_argument', ['balise' => ' URL_']];
125
-		erreur_squelette($msg, $p);
126
-		$p->interdire_scripts = false;
127
-
128
-		return $p;
129
-	} elseif ($f = charger_fonction($nom, 'balise', true)) {
130
-		return $f($p);
131
-	} else {
132
-		$nom = strtolower($nom);
133
-		$code = generer_generer_url(substr($nom, 4), $p);
134
-		$code = champ_sql($nom, $p, $code);
135
-		$p->code = $code;
136
-		if (!$p->etoile) {
137
-			$p->code = "vider_url($code)";
138
-		}
139
-		$p->interdire_scripts = false;
140
-
141
-		return $p;
142
-	}
122
+    $nom = $p->nom_champ;
123
+    if ($nom === 'URL_') {
124
+        $msg = ['zbug_balise_sans_argument', ['balise' => ' URL_']];
125
+        erreur_squelette($msg, $p);
126
+        $p->interdire_scripts = false;
127
+
128
+        return $p;
129
+    } elseif ($f = charger_fonction($nom, 'balise', true)) {
130
+        return $f($p);
131
+    } else {
132
+        $nom = strtolower($nom);
133
+        $code = generer_generer_url(substr($nom, 4), $p);
134
+        $code = champ_sql($nom, $p, $code);
135
+        $p->code = $code;
136
+        if (!$p->etoile) {
137
+            $p->code = "vider_url($code)";
138
+        }
139
+        $p->interdire_scripts = false;
140
+
141
+        return $p;
142
+    }
143 143
 }
144 144
 
145 145
 /**
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
  */
164 164
 function balise_URL_ARTICLE_dist($p) {
165 165
 
166
-	// Cas particulier des boucles (SYNDIC_ARTICLES)
167
-	if ($p->type_requete == 'syndic_articles') {
168
-		$code = champ_sql('url', $p);
169
-	} else {
170
-		$code = generer_generer_url('article', $p);
171
-	}
166
+    // Cas particulier des boucles (SYNDIC_ARTICLES)
167
+    if ($p->type_requete == 'syndic_articles') {
168
+        $code = champ_sql('url', $p);
169
+    } else {
170
+        $code = generer_generer_url('article', $p);
171
+    }
172 172
 
173
-	$p->code = $code;
174
-	if (!$p->etoile) {
175
-		$p->code = "vider_url($code)";
176
-	}
177
-	$p->interdire_scripts = false;
173
+    $p->code = $code;
174
+    if (!$p->etoile) {
175
+        $p->code = "vider_url($code)";
176
+    }
177
+    $p->interdire_scripts = false;
178 178
 
179
-	return $p;
179
+    return $p;
180 180
 }
181 181
 
182 182
 /**
@@ -196,21 +196,21 @@  discard block
 block discarded – undo
196 196
  *     Pile complétée par le code à générer
197 197
  */
198 198
 function balise_URL_SITE_dist($p) {
199
-	$code = champ_sql('url_site', $p, '');
200
-	if (!$code) {
201
-		$code = generer_generer_url('site', $p);
202
-		if ($code === null) {
203
-			return null;
204
-		}
205
-	} else {
206
-		if (!$p->etoile) {
207
-			$code = "calculer_url($code,'','url', \$connect)";
208
-		}
209
-	}
210
-	$p->code = $code;
211
-	$p->interdire_scripts = false;
212
-
213
-	return $p;
199
+    $code = champ_sql('url_site', $p, '');
200
+    if (!$code) {
201
+        $code = generer_generer_url('site', $p);
202
+        if ($code === null) {
203
+            return null;
204
+        }
205
+    } else {
206
+        if (!$p->etoile) {
207
+            $code = "calculer_url($code,'','url', \$connect)";
208
+        }
209
+    }
210
+    $p->code = $code;
211
+    $p->interdire_scripts = false;
212
+
213
+    return $p;
214 214
 }
215 215
 
216 216
 // Autres balises URL_*, qui ne concernent pas une table
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
  *     Pile complétée par le code à générer
230 230
  */
231 231
 function balise_URL_SITE_SPIP_dist($p) {
232
-	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
-	$p->code = 'spip_htmlspecialchars(' . $p->code . ')';
234
-	$p->interdire_scripts = false;
232
+    $p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
+    $p->code = 'spip_htmlspecialchars(' . $p->code . ')';
234
+    $p->interdire_scripts = false;
235 235
 
236
-	return $p;
236
+    return $p;
237 237
 }
238 238
 
239 239
 
@@ -262,42 +262,42 @@  discard block
 block discarded – undo
262 262
  */
263 263
 function balise_URL_PAGE_dist($p) {
264 264
 
265
-	$code = interprete_argument_balise(1, $p);
266
-	$args = interprete_argument_balise(2, $p);
267
-	if ($args == null) {
268
-		$args = "''";
269
-	}
270
-
271
-	if ($s = trouver_nom_serveur_distant($p)) {
272
-		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
273
-		// elle devra aussi traiter le cas derogatoire type=page
274
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
275
-			if ($args and $args !== "''") {
276
-				$code .= ", $args";
277
-			}
278
-			$code = $f('page', $code, $s);
279
-			$p->code = $code;
280
-			return $p;
281
-		}
282
-		$s = 'connect=' . addslashes($s);
283
-		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284
-	}
285
-
286
-	if (!$code) {
287
-		$noentities = $p->etoile ? "'&'" : '';
288
-		$code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
289
-	} else {
290
-		if (!$args) {
291
-			$args = "''";
292
-		}
293
-		$noentities = $p->etoile ? ', true' : '';
294
-		$code = "generer_url_public($code, $args$noentities)";
295
-	}
296
-	$p->code = $code;
297
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
-
299
-	#$p->interdire_scripts = true;
300
-	return $p;
265
+    $code = interprete_argument_balise(1, $p);
266
+    $args = interprete_argument_balise(2, $p);
267
+    if ($args == null) {
268
+        $args = "''";
269
+    }
270
+
271
+    if ($s = trouver_nom_serveur_distant($p)) {
272
+        // si une fonction de generation des url a ete definie pour ce connect l'utiliser
273
+        // elle devra aussi traiter le cas derogatoire type=page
274
+        if (function_exists($f = 'generer_generer_url_' . $s)) {
275
+            if ($args and $args !== "''") {
276
+                $code .= ", $args";
277
+            }
278
+            $code = $f('page', $code, $s);
279
+            $p->code = $code;
280
+            return $p;
281
+        }
282
+        $s = 'connect=' . addslashes($s);
283
+        $args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284
+    }
285
+
286
+    if (!$code) {
287
+        $noentities = $p->etoile ? "'&'" : '';
288
+        $code = "url_de_base() . preg_replace(',^./,', '', self($noentities))";
289
+    } else {
290
+        if (!$args) {
291
+            $args = "''";
292
+        }
293
+        $noentities = $p->etoile ? ', true' : '';
294
+        $code = "generer_url_public($code, $args$noentities)";
295
+    }
296
+    $p->code = $code;
297
+    spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
+
299
+    #$p->interdire_scripts = true;
300
+    return $p;
301 301
 }
302 302
 
303 303
 
@@ -324,24 +324,24 @@  discard block
 block discarded – undo
324 324
  */
325 325
 function balise_URL_ECRIRE_dist($p) {
326 326
 
327
-	$code = interprete_argument_balise(1, $p);
328
-	if (!$code) {
329
-		$fonc = "''";
330
-	} else {
331
-		$fonc = $code;
332
-		$args = interprete_argument_balise(2, $p);
333
-		if ($args === null) {
334
-			$args = "''";
335
-		}
336
-		$noentities = $p->etoile ? ', true' : '';
337
-		if (($args != "''") or $noentities) {
338
-			$fonc .= ",$args$noentities";
339
-		}
340
-	}
341
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
342
-	$p->interdire_scripts = false;
343
-
344
-	return $p;
327
+    $code = interprete_argument_balise(1, $p);
328
+    if (!$code) {
329
+        $fonc = "''";
330
+    } else {
331
+        $fonc = $code;
332
+        $args = interprete_argument_balise(2, $p);
333
+        if ($args === null) {
334
+            $args = "''";
335
+        }
336
+        $noentities = $p->etoile ? ', true' : '';
337
+        if (($args != "''") or $noentities) {
338
+            $fonc .= ",$args$noentities";
339
+        }
340
+    }
341
+    $p->code = 'generer_url_ecrire(' . $fonc . ')';
342
+    $p->interdire_scripts = false;
343
+
344
+    return $p;
345 345
 }
346 346
 
347 347
 
@@ -367,24 +367,24 @@  discard block
 block discarded – undo
367 367
  *     Pile complétée par le code à générer
368 368
  */
369 369
 function balise_URL_ACTION_AUTEUR_dist($p) {
370
-	$p->descr['session'] = true;
371
-
372
-	$p->code = interprete_argument_balise(1, $p);
373
-
374
-	$args = interprete_argument_balise(2, $p);
375
-	if ($args != "''" && $args !== null) {
376
-		$p->code .= ',' . $args;
377
-	}
378
-	$redirect = interprete_argument_balise(3, $p);
379
-	if ($redirect != "''" && $redirect !== null) {
380
-		if ($args == "''" || $args === null) {
381
-			$p->code .= ",''";
382
-		}
383
-		$p->code .= ',' . $redirect;
384
-	}
385
-
386
-	$p->code = 'generer_action_auteur(' . $p->code . ')';
387
-	$p->interdire_scripts = false;
388
-
389
-	return $p;
370
+    $p->descr['session'] = true;
371
+
372
+    $p->code = interprete_argument_balise(1, $p);
373
+
374
+    $args = interprete_argument_balise(2, $p);
375
+    if ($args != "''" && $args !== null) {
376
+        $p->code .= ',' . $args;
377
+    }
378
+    $redirect = interprete_argument_balise(3, $p);
379
+    if ($redirect != "''" && $redirect !== null) {
380
+        if ($args == "''" || $args === null) {
381
+            $p->code .= ",''";
382
+        }
383
+        $p->code .= ',' . $redirect;
384
+    }
385
+
386
+    $p->code = 'generer_action_auteur(' . $p->code . ')';
387
+    $p->interdire_scripts = false;
388
+
389
+    return $p;
390 390
 }
Please login to merge, or discard this patch.
ecrire/balise/formulaire_ecrire_auteur.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  **/
18 18
 
19 19
 if (!defined('_ECRIRE_INC_VERSION')) {
20
-	return;
20
+    return;
21 21
 }
22 22
 
23 23
 include_spip('base/abstract_sql');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  *     Pile complétée du code compilé
42 42
  **/
43 43
 function balise_FORMULAIRE_ECRIRE_AUTEUR($p) {
44
-	return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', ['id_auteur', 'id_article', 'email']);
44
+    return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', ['id_auteur', 'id_article', 'email']);
45 45
 }
46 46
 
47 47
 /**
@@ -59,44 +59,44 @@  discard block
 block discarded – undo
59 59
  *   - chaîne vide sinon (erreur ou non affichage).
60 60
  */
61 61
 function balise_FORMULAIRE_ECRIRE_AUTEUR_stat($args, $context_compil) {
62
-	include_spip('inc/filtres');
63
-	// Pas d'id_auteur ni d'id_article ? Erreur de contexte
64
-	$id = intval($args[1]);
65
-	if (!$args[0] and !$id) {
66
-		$msg = [
67
-			'zbug_champ_hors_motif',
68
-			[
69
-				'champ' => 'FORMULAIRE_ECRIRE_AUTEUR',
70
-				'motif' => 'AUTEURS/ARTICLES'
71
-			]
72
-		];
62
+    include_spip('inc/filtres');
63
+    // Pas d'id_auteur ni d'id_article ? Erreur de contexte
64
+    $id = intval($args[1]);
65
+    if (!$args[0] and !$id) {
66
+        $msg = [
67
+            'zbug_champ_hors_motif',
68
+            [
69
+                'champ' => 'FORMULAIRE_ECRIRE_AUTEUR',
70
+                'motif' => 'AUTEURS/ARTICLES'
71
+            ]
72
+        ];
73 73
 
74
-		erreur_squelette($msg, $context_compil);
74
+        erreur_squelette($msg, $context_compil);
75 75
 
76
-		return '';
77
-	}
78
-	// Si on est dans un contexte article,
79
-	// sortir tous les mails des auteurs de l'article
80
-	if (!$args[0] and $id) {
81
-		$r = '';
82
-		$s = sql_allfetsel(
83
-			'email',
84
-			'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')',
85
-			"A.email != '' AND L.id_objet=$id"
86
-		);
87
-		foreach ($s as $row) {
88
-			if (email_valide($row['email'])) {
89
-				$r .= ', ' . $row['email'];
90
-			}
91
-		}
92
-		$args[2] = substr($r, 2);
93
-	}
76
+        return '';
77
+    }
78
+    // Si on est dans un contexte article,
79
+    // sortir tous les mails des auteurs de l'article
80
+    if (!$args[0] and $id) {
81
+        $r = '';
82
+        $s = sql_allfetsel(
83
+            'email',
84
+            'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')',
85
+            "A.email != '' AND L.id_objet=$id"
86
+        );
87
+        foreach ($s as $row) {
88
+            if (email_valide($row['email'])) {
89
+                $r .= ', ' . $row['email'];
90
+            }
91
+        }
92
+        $args[2] = substr($r, 2);
93
+    }
94 94
 
95
-	// On ne peut pas ecrire a un auteur dont le mail n'est pas valide
96
-	if (!$args[2] or !email_valide($args[2])) {
97
-		return '';
98
-	}
95
+    // On ne peut pas ecrire a un auteur dont le mail n'est pas valide
96
+    if (!$args[2] or !email_valide($args[2])) {
97
+        return '';
98
+    }
99 99
 
100
-	// OK
101
-	return $args;
100
+    // OK
101
+    return $args;
102 102
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		);
87 87
 		foreach ($s as $row) {
88 88
 			if (email_valide($row['email'])) {
89
-				$r .= ', ' . $row['email'];
89
+				$r .= ', '.$row['email'];
90 90
 			}
91 91
 		}
92 92
 		$args[2] = substr($r, 2);
Please login to merge, or discard this patch.
ecrire/charsets/iso-8859-1.php 1 patch
Indentation   +128 added lines, -128 removed lines patch added patch discarded remove patch
@@ -11,134 +11,134 @@
 block discarded – undo
11 11
 // plage invalide en iso-8859-1 mais souvent utilisee quand meme (windows)
12 12
 // cf. http://openweb.eu.org/articles/caracteres_illegaux/
13 13
 // voir aussi copie de ces valeurs dans inc/charsets.php
14
-	128 => 8364,
15
-	129 => 129 /* ?? */,
16
-	130 => 8218,
17
-	131 => 402,
18
-	132 => 8222,
19
-	133 => 8230,
20
-	134 => 8224,
21
-	135 => 8225,
22
-	136 => 710,
23
-	137 => 8240,
24
-	138 => 352,
25
-	139 => 8249,
26
-	140 => 338,
27
-	141 => 141 /* ?? */,
28
-	142 => 381,
29
-	143 => 143 /* ?? */,
30
-	144 => 144 /* ?? */,
31
-	145 => 8216,
32
-	146 => 8217,
33
-	147 => 8220,
34
-	148 => 8221,
35
-	149 => 8226,
36
-	150 => 8211,
37
-	151 => 8212,
38
-	152 => 732,
39
-	153 => 8482,
40
-	154 => 353,
41
-	155 => 8250,
42
-	156 => 339,
43
-	157 => 157 /* ?? */,
44
-	158 => 382,
45
-	159 => 376,
14
+    128 => 8364,
15
+    129 => 129 /* ?? */,
16
+    130 => 8218,
17
+    131 => 402,
18
+    132 => 8222,
19
+    133 => 8230,
20
+    134 => 8224,
21
+    135 => 8225,
22
+    136 => 710,
23
+    137 => 8240,
24
+    138 => 352,
25
+    139 => 8249,
26
+    140 => 338,
27
+    141 => 141 /* ?? */,
28
+    142 => 381,
29
+    143 => 143 /* ?? */,
30
+    144 => 144 /* ?? */,
31
+    145 => 8216,
32
+    146 => 8217,
33
+    147 => 8220,
34
+    148 => 8221,
35
+    149 => 8226,
36
+    150 => 8211,
37
+    151 => 8212,
38
+    152 => 732,
39
+    153 => 8482,
40
+    154 => 353,
41
+    155 => 8250,
42
+    156 => 339,
43
+    157 => 157 /* ?? */,
44
+    158 => 382,
45
+    159 => 376,
46 46
 
47
-	160 => 160,
48
-	161 => 161,
49
-	162 => 162,
50
-	163 => 163,
51
-	164 => 164,
52
-	165 => 165,
53
-	166 => 166,
54
-	167 => 167,
55
-	168 => 168,
56
-	169 => 169,
57
-	170 => 170,
58
-	171 => 171,
59
-	172 => 172,
60
-	173 => 173,
61
-	174 => 174,
62
-	175 => 175,
63
-	176 => 176,
64
-	177 => 177,
65
-	178 => 178,
66
-	179 => 179,
67
-	180 => 180,
68
-	181 => 181,
69
-	182 => 182,
70
-	183 => 183,
71
-	184 => 184,
72
-	185 => 185,
73
-	186 => 186,
74
-	187 => 187,
75
-	188 => 188,
76
-	189 => 189,
77
-	190 => 190,
78
-	191 => 191,
79
-	192 => 192,
80
-	193 => 193,
81
-	194 => 194,
82
-	195 => 195,
83
-	196 => 196,
84
-	197 => 197,
85
-	198 => 198,
86
-	199 => 199,
87
-	200 => 200,
88
-	201 => 201,
89
-	202 => 202,
90
-	203 => 203,
91
-	204 => 204,
92
-	205 => 205,
93
-	206 => 206,
94
-	207 => 207,
95
-	208 => 208,
96
-	209 => 209,
97
-	210 => 210,
98
-	211 => 211,
99
-	212 => 212,
100
-	213 => 213,
101
-	214 => 214,
102
-	215 => 215,
103
-	216 => 216,
104
-	217 => 217,
105
-	218 => 218,
106
-	219 => 219,
107
-	220 => 220,
108
-	221 => 221,
109
-	222 => 222,
110
-	223 => 223,
111
-	224 => 224,
112
-	225 => 225,
113
-	226 => 226,
114
-	227 => 227,
115
-	228 => 228,
116
-	229 => 229,
117
-	230 => 230,
118
-	231 => 231,
119
-	232 => 232,
120
-	233 => 233,
121
-	234 => 234,
122
-	235 => 235,
123
-	236 => 236,
124
-	237 => 237,
125
-	238 => 238,
126
-	239 => 239,
127
-	240 => 240,
128
-	241 => 241,
129
-	242 => 242,
130
-	243 => 243,
131
-	244 => 244,
132
-	245 => 245,
133
-	246 => 246,
134
-	247 => 247,
135
-	248 => 248,
136
-	249 => 249,
137
-	250 => 250,
138
-	251 => 251,
139
-	252 => 252,
140
-	253 => 253,
141
-	254 => 254,
142
-	255 => 255
47
+    160 => 160,
48
+    161 => 161,
49
+    162 => 162,
50
+    163 => 163,
51
+    164 => 164,
52
+    165 => 165,
53
+    166 => 166,
54
+    167 => 167,
55
+    168 => 168,
56
+    169 => 169,
57
+    170 => 170,
58
+    171 => 171,
59
+    172 => 172,
60
+    173 => 173,
61
+    174 => 174,
62
+    175 => 175,
63
+    176 => 176,
64
+    177 => 177,
65
+    178 => 178,
66
+    179 => 179,
67
+    180 => 180,
68
+    181 => 181,
69
+    182 => 182,
70
+    183 => 183,
71
+    184 => 184,
72
+    185 => 185,
73
+    186 => 186,
74
+    187 => 187,
75
+    188 => 188,
76
+    189 => 189,
77
+    190 => 190,
78
+    191 => 191,
79
+    192 => 192,
80
+    193 => 193,
81
+    194 => 194,
82
+    195 => 195,
83
+    196 => 196,
84
+    197 => 197,
85
+    198 => 198,
86
+    199 => 199,
87
+    200 => 200,
88
+    201 => 201,
89
+    202 => 202,
90
+    203 => 203,
91
+    204 => 204,
92
+    205 => 205,
93
+    206 => 206,
94
+    207 => 207,
95
+    208 => 208,
96
+    209 => 209,
97
+    210 => 210,
98
+    211 => 211,
99
+    212 => 212,
100
+    213 => 213,
101
+    214 => 214,
102
+    215 => 215,
103
+    216 => 216,
104
+    217 => 217,
105
+    218 => 218,
106
+    219 => 219,
107
+    220 => 220,
108
+    221 => 221,
109
+    222 => 222,
110
+    223 => 223,
111
+    224 => 224,
112
+    225 => 225,
113
+    226 => 226,
114
+    227 => 227,
115
+    228 => 228,
116
+    229 => 229,
117
+    230 => 230,
118
+    231 => 231,
119
+    232 => 232,
120
+    233 => 233,
121
+    234 => 234,
122
+    235 => 235,
123
+    236 => 236,
124
+    237 => 237,
125
+    238 => 238,
126
+    239 => 239,
127
+    240 => 240,
128
+    241 => 241,
129
+    242 => 242,
130
+    243 => 243,
131
+    244 => 244,
132
+    245 => 245,
133
+    246 => 246,
134
+    247 => 247,
135
+    248 => 248,
136
+    249 => 249,
137
+    250 => 250,
138
+    251 => 251,
139
+    252 => 252,
140
+    253 => 253,
141
+    254 => 254,
142
+    255 => 255
143 143
 
144 144
 ];
Please login to merge, or discard this patch.
ecrire/charsets/iso-8859-6.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  **/
20 20
 
21 21
 if (!defined('_ECRIRE_INC_VERSION')) {
22
-	return;
22
+    return;
23 23
 }
24 24
 
25 25
 load_charset('iso-8859-1');
@@ -27,61 +27,61 @@  discard block
 block discarded – undo
27 27
 $trans = $GLOBALS['CHARSET']['iso-8859-1'];
28 28
 
29 29
 $mod = [
30
-	0xA0 => 0x00A0,
31
-	0xA4 => 0x00A4,
32
-	0xAC => 0x060C,
33
-	0xAD => 0x00AD,
34
-	0xBB => 0x061B,
35
-	0xBF => 0x061F,
36
-	0xC1 => 0x0621,
37
-	0xC2 => 0x0622,
38
-	0xC3 => 0x0623,
39
-	0xC4 => 0x0624,
40
-	0xC5 => 0x0625,
41
-	0xC6 => 0x0626,
42
-	0xC7 => 0x0627,
43
-	0xC8 => 0x0628,
44
-	0xC9 => 0x0629,
45
-	0xCA => 0x062A,
46
-	0xCB => 0x062B,
47
-	0xCC => 0x062C,
48
-	0xCD => 0x062D,
49
-	0xCE => 0x062E,
50
-	0xCF => 0x062F,
51
-	0xD0 => 0x0630,
52
-	0xD1 => 0x0631,
53
-	0xD2 => 0x0632,
54
-	0xD3 => 0x0633,
55
-	0xD4 => 0x0634,
56
-	0xD5 => 0x0635,
57
-	0xD6 => 0x0636,
58
-	0xD7 => 0x0637,
59
-	0xD8 => 0x0638,
60
-	0xD9 => 0x0639,
61
-	0xDA => 0x063A,
62
-	0xE0 => 0x0640,
63
-	0xE1 => 0x0641,
64
-	0xE2 => 0x0642,
65
-	0xE3 => 0x0643,
66
-	0xE4 => 0x0644,
67
-	0xE5 => 0x0645,
68
-	0xE6 => 0x0646,
69
-	0xE7 => 0x0647,
70
-	0xE8 => 0x0648,
71
-	0xE9 => 0x0649,
72
-	0xEA => 0x064A,
73
-	0xEB => 0x064B,
74
-	0xEC => 0x064C,
75
-	0xED => 0x064D,
76
-	0xEE => 0x064E,
77
-	0xEF => 0x064F,
78
-	0xF0 => 0x0650,
79
-	0xF1 => 0x0651,
80
-	0xF2 => 0x0652
30
+    0xA0 => 0x00A0,
31
+    0xA4 => 0x00A4,
32
+    0xAC => 0x060C,
33
+    0xAD => 0x00AD,
34
+    0xBB => 0x061B,
35
+    0xBF => 0x061F,
36
+    0xC1 => 0x0621,
37
+    0xC2 => 0x0622,
38
+    0xC3 => 0x0623,
39
+    0xC4 => 0x0624,
40
+    0xC5 => 0x0625,
41
+    0xC6 => 0x0626,
42
+    0xC7 => 0x0627,
43
+    0xC8 => 0x0628,
44
+    0xC9 => 0x0629,
45
+    0xCA => 0x062A,
46
+    0xCB => 0x062B,
47
+    0xCC => 0x062C,
48
+    0xCD => 0x062D,
49
+    0xCE => 0x062E,
50
+    0xCF => 0x062F,
51
+    0xD0 => 0x0630,
52
+    0xD1 => 0x0631,
53
+    0xD2 => 0x0632,
54
+    0xD3 => 0x0633,
55
+    0xD4 => 0x0634,
56
+    0xD5 => 0x0635,
57
+    0xD6 => 0x0636,
58
+    0xD7 => 0x0637,
59
+    0xD8 => 0x0638,
60
+    0xD9 => 0x0639,
61
+    0xDA => 0x063A,
62
+    0xE0 => 0x0640,
63
+    0xE1 => 0x0641,
64
+    0xE2 => 0x0642,
65
+    0xE3 => 0x0643,
66
+    0xE4 => 0x0644,
67
+    0xE5 => 0x0645,
68
+    0xE6 => 0x0646,
69
+    0xE7 => 0x0647,
70
+    0xE8 => 0x0648,
71
+    0xE9 => 0x0649,
72
+    0xEA => 0x064A,
73
+    0xEB => 0x064B,
74
+    0xEC => 0x064C,
75
+    0xED => 0x064D,
76
+    0xEE => 0x064E,
77
+    0xEF => 0x064F,
78
+    0xF0 => 0x0650,
79
+    0xF1 => 0x0651,
80
+    0xF2 => 0x0652
81 81
 ];
82 82
 
83 83
 foreach ($mod as $num => $val) {
84
-	$trans[$num] = $val;
84
+    $trans[$num] = $val;
85 85
 }
86 86
 
87 87
 $GLOBALS['CHARSET']['iso-8859-6'] = $trans;
Please login to merge, or discard this patch.
ecrire/charsets/translitcomplexe.php 1 patch
Indentation   +142 added lines, -142 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  **/
21 21
 
22 22
 if (!defined('_ECRIRE_INC_VERSION')) {
23
-	return;
23
+    return;
24 24
 }
25 25
 
26 26
 load_charset('translit');
@@ -28,151 +28,151 @@  discard block
 block discarded – undo
28 28
 
29 29
 $translit_c = [
30 30
 // vietnamien
31
-	225 => "a'",
32
-	224 => 'a`',
33
-	7843 => 'a?',
34
-	227 => 'a~',
35
-	7841 => 'a.',
36
-	226 => 'a^',
37
-	7845 => "a^'",
38
-	7847 => 'a^`',
39
-	7849 => 'a^?',
40
-	7851 => 'a^~',
41
-	7853 => 'a^.',
42
-	259 => 'a(',
43
-	7855 => "a('",
44
-	7857 => 'a(`',
45
-	7859 => 'a(?',
46
-	7861 => 'a(~',
47
-	7863 => 'a(.',
48
-	193 => "A'",
49
-	192 => 'A`',
50
-	7842 => 'A?',
51
-	195 => 'A~',
52
-	7840 => 'A.',
53
-	194 => 'A^',
54
-	7844 => "A^'",
55
-	7846 => 'A^`',
56
-	7848 => 'A^?',
57
-	7850 => 'A^~',
58
-	7852 => 'A^.',
59
-	258 => 'A(',
60
-	7854 => "A('",
61
-	7856 => 'A(`',
62
-	7858 => 'A(?',
63
-	7860 => 'A(~',
64
-	7862 => 'A(.',
65
-	233 => "e'",
66
-	232 => 'e`',
67
-	7867 => 'e?',
68
-	7869 => 'e~',
69
-	7865 => 'e.',
70
-	234 => 'e^',
71
-	7871 => "e^'",
72
-	7873 => 'e^`',
73
-	7875 => 'e^?',
74
-	7877 => 'e^~',
75
-	7879 => 'e^.',
76
-	201 => "E'",
77
-	200 => 'E`',
78
-	7866 => 'E?',
79
-	7868 => 'E~',
80
-	7864 => 'E.',
81
-	202 => 'E^',
82
-	7870 => "E^'",
83
-	7872 => 'E^`',
84
-	7874 => 'E^?',
85
-	7876 => 'E^~',
86
-	7878 => 'E^.',
87
-	237 => "i'",
88
-	236 => 'i`',
89
-	7881 => 'i?',
90
-	297 => 'i~',
91
-	7883 => 'i.',
92
-	205 => "I'",
93
-	204 => 'I`',
94
-	7880 => 'I?',
95
-	296 => 'I~',
96
-	7882 => 'I.',
97
-	243 => "o'",
98
-	242 => 'o`',
99
-	7887 => 'o?',
100
-	245 => 'o~',
101
-	7885 => 'o.',
102
-	244 => 'o^',
103
-	7889 => "o^'",
104
-	7891 => 'o^`',
105
-	7893 => 'o^?',
106
-	7895 => 'o^~',
107
-	7897 => 'o^.',
108
-	417 => 'o+',
109
-	7899 => "o+'",
110
-	7901 => 'o+`',
111
-	7903 => 'o+?',
112
-	7905 => 'o+~',
113
-	7907 => 'o+.',
114
-	211 => "O'",
115
-	210 => 'O`',
116
-	7886 => 'O?',
117
-	213 => 'O~',
118
-	7884 => 'O.',
119
-	212 => 'O^',
120
-	7888 => "O^'",
121
-	7890 => 'O^`',
122
-	7892 => 'O^?',
123
-	7894 => 'O^~',
124
-	7896 => 'O^.',
125
-	416 => 'O+',
126
-	7898 => "O+'",
127
-	7900 => 'O+`',
128
-	7902 => 'O+?',
129
-	7904 => 'O+~',
130
-	7906 => 'O+.',
131
-	250 => "u'",
132
-	249 => 'u`',
133
-	7911 => 'u?',
134
-	361 => 'u~',
135
-	7909 => 'u.',
136
-	432 => 'u+',
137
-	7913 => "u+'",
138
-	7915 => 'u+`',
139
-	7917 => 'u+?',
140
-	7919 => 'u+~',
141
-	7921 => 'u+.',
142
-	218 => "U'",
143
-	217 => 'U`',
144
-	7910 => 'U?',
145
-	360 => 'U~',
146
-	7908 => 'U.',
147
-	431 => 'U+',
148
-	7912 => "U+'",
149
-	7914 => 'U+`',
150
-	7916 => 'U+?',
151
-	7918 => 'U+~',
152
-	7920 => 'U+.',
153
-	253 => "y'",
154
-	7923 => 'y`',
155
-	7927 => 'y?',
156
-	7929 => 'y~',
157
-	7925 => 'y.',
158
-	221 => "Y'",
159
-	7922 => 'Y`',
160
-	7926 => 'Y?',
161
-	7928 => 'Y~',
162
-	7924 => 'Y.',
163
-	273 => 'd-',
164
-	208 => 'D-',
31
+    225 => "a'",
32
+    224 => 'a`',
33
+    7843 => 'a?',
34
+    227 => 'a~',
35
+    7841 => 'a.',
36
+    226 => 'a^',
37
+    7845 => "a^'",
38
+    7847 => 'a^`',
39
+    7849 => 'a^?',
40
+    7851 => 'a^~',
41
+    7853 => 'a^.',
42
+    259 => 'a(',
43
+    7855 => "a('",
44
+    7857 => 'a(`',
45
+    7859 => 'a(?',
46
+    7861 => 'a(~',
47
+    7863 => 'a(.',
48
+    193 => "A'",
49
+    192 => 'A`',
50
+    7842 => 'A?',
51
+    195 => 'A~',
52
+    7840 => 'A.',
53
+    194 => 'A^',
54
+    7844 => "A^'",
55
+    7846 => 'A^`',
56
+    7848 => 'A^?',
57
+    7850 => 'A^~',
58
+    7852 => 'A^.',
59
+    258 => 'A(',
60
+    7854 => "A('",
61
+    7856 => 'A(`',
62
+    7858 => 'A(?',
63
+    7860 => 'A(~',
64
+    7862 => 'A(.',
65
+    233 => "e'",
66
+    232 => 'e`',
67
+    7867 => 'e?',
68
+    7869 => 'e~',
69
+    7865 => 'e.',
70
+    234 => 'e^',
71
+    7871 => "e^'",
72
+    7873 => 'e^`',
73
+    7875 => 'e^?',
74
+    7877 => 'e^~',
75
+    7879 => 'e^.',
76
+    201 => "E'",
77
+    200 => 'E`',
78
+    7866 => 'E?',
79
+    7868 => 'E~',
80
+    7864 => 'E.',
81
+    202 => 'E^',
82
+    7870 => "E^'",
83
+    7872 => 'E^`',
84
+    7874 => 'E^?',
85
+    7876 => 'E^~',
86
+    7878 => 'E^.',
87
+    237 => "i'",
88
+    236 => 'i`',
89
+    7881 => 'i?',
90
+    297 => 'i~',
91
+    7883 => 'i.',
92
+    205 => "I'",
93
+    204 => 'I`',
94
+    7880 => 'I?',
95
+    296 => 'I~',
96
+    7882 => 'I.',
97
+    243 => "o'",
98
+    242 => 'o`',
99
+    7887 => 'o?',
100
+    245 => 'o~',
101
+    7885 => 'o.',
102
+    244 => 'o^',
103
+    7889 => "o^'",
104
+    7891 => 'o^`',
105
+    7893 => 'o^?',
106
+    7895 => 'o^~',
107
+    7897 => 'o^.',
108
+    417 => 'o+',
109
+    7899 => "o+'",
110
+    7901 => 'o+`',
111
+    7903 => 'o+?',
112
+    7905 => 'o+~',
113
+    7907 => 'o+.',
114
+    211 => "O'",
115
+    210 => 'O`',
116
+    7886 => 'O?',
117
+    213 => 'O~',
118
+    7884 => 'O.',
119
+    212 => 'O^',
120
+    7888 => "O^'",
121
+    7890 => 'O^`',
122
+    7892 => 'O^?',
123
+    7894 => 'O^~',
124
+    7896 => 'O^.',
125
+    416 => 'O+',
126
+    7898 => "O+'",
127
+    7900 => 'O+`',
128
+    7902 => 'O+?',
129
+    7904 => 'O+~',
130
+    7906 => 'O+.',
131
+    250 => "u'",
132
+    249 => 'u`',
133
+    7911 => 'u?',
134
+    361 => 'u~',
135
+    7909 => 'u.',
136
+    432 => 'u+',
137
+    7913 => "u+'",
138
+    7915 => 'u+`',
139
+    7917 => 'u+?',
140
+    7919 => 'u+~',
141
+    7921 => 'u+.',
142
+    218 => "U'",
143
+    217 => 'U`',
144
+    7910 => 'U?',
145
+    360 => 'U~',
146
+    7908 => 'U.',
147
+    431 => 'U+',
148
+    7912 => "U+'",
149
+    7914 => 'U+`',
150
+    7916 => 'U+?',
151
+    7918 => 'U+~',
152
+    7920 => 'U+.',
153
+    253 => "y'",
154
+    7923 => 'y`',
155
+    7927 => 'y?',
156
+    7929 => 'y~',
157
+    7925 => 'y.',
158
+    221 => "Y'",
159
+    7922 => 'Y`',
160
+    7926 => 'Y?',
161
+    7928 => 'Y~',
162
+    7924 => 'Y.',
163
+    273 => 'd-',
164
+    208 => 'D-',
165 165
 
166 166
 // allemand
167
-	228 => 'ae',
168
-	246 => 'oe',
169
-	252 => 'ue',
170
-	196 => 'Ae',
171
-	214 => 'Oe',
172
-	220 => 'Ue'
167
+    228 => 'ae',
168
+    246 => 'oe',
169
+    252 => 'ue',
170
+    196 => 'Ae',
171
+    214 => 'Oe',
172
+    220 => 'Ue'
173 173
 ];
174 174
 
175 175
 foreach ($translit_c as $u => $t) {
176
-	$trans[$u] = $t;
176
+    $trans[$u] = $t;
177 177
 }
178 178
 $GLOBALS['CHARSET']['translitcomplexe'] = $trans;
Please login to merge, or discard this patch.
ecrire/charsets/cp1251.php 1 patch
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -9,131 +9,131 @@
 block discarded – undo
9 9
  **/
10 10
 
11 11
 $GLOBALS['CHARSET']['cp1251'] = [
12
-	0x80 => 0x0402,
13
-	0x81 => 0x0403,
14
-	0x82 => 0x201A,
15
-	0x83 => 0x0453,
16
-	0x84 => 0x201E,
17
-	0x85 => 0x2026,
18
-	0x86 => 0x2020,
19
-	0x87 => 0x2021,
20
-	0x88 => 0x20AC,
21
-	0x89 => 0x2030,
22
-	0x8A => 0x0409,
23
-	0x8B => 0x2039,
24
-	0x8C => 0x040A,
25
-	0x8D => 0x040C,
26
-	0x8E => 0x040B,
27
-	0x8F => 0x040F,
28
-	0x90 => 0x0452,
29
-	0x91 => 0x2018,
30
-	0x92 => 0x2019,
31
-	0x93 => 0x201C,
32
-	0x94 => 0x201D,
33
-	0x95 => 0x2022,
34
-	0x96 => 0x2013,
35
-	0x97 => 0x2014,
36
-	0x99 => 0x2122,
37
-	0x9A => 0x0459,
38
-	0x9B => 0x203A,
39
-	0x9C => 0x045A,
40
-	0x9D => 0x045C,
41
-	0x9E => 0x045B,
42
-	0x9F => 0x045F,
43
-	0xA0 => 0x00A0,
44
-	0xA1 => 0x040E,
45
-	0xA2 => 0x045E,
46
-	0xA3 => 0x0408,
47
-	0xA4 => 0x00A4,
48
-	0xA5 => 0x0490,
49
-	0xA6 => 0x00A6,
50
-	0xA7 => 0x00A7,
51
-	0xA8 => 0x0401,
52
-	0xA9 => 0x00A9,
53
-	0xAA => 0x0404,
54
-	0xAB => 0x00AB,
55
-	0xAC => 0x00AC,
56
-	0xAD => 0x00AD,
57
-	0xAE => 0x00AE,
58
-	0xAF => 0x0407,
59
-	0xB0 => 0x00B0,
60
-	0xB1 => 0x00B1,
61
-	0xB2 => 0x0406,
62
-	0xB3 => 0x0456,
63
-	0xB4 => 0x0491,
64
-	0xB5 => 0x00B5,
65
-	0xB6 => 0x00B6,
66
-	0xB7 => 0x00B7,
67
-	0xB8 => 0x0451,
68
-	0xB9 => 0x2116,
69
-	0xBA => 0x0454,
70
-	0xBB => 0x00BB,
71
-	0xBC => 0x0458,
72
-	0xBD => 0x0405,
73
-	0xBE => 0x0455,
74
-	0xBF => 0x0457,
75
-	0xC0 => 0x0410,
76
-	0xC1 => 0x0411,
77
-	0xC2 => 0x0412,
78
-	0xC3 => 0x0413,
79
-	0xC4 => 0x0414,
80
-	0xC5 => 0x0415,
81
-	0xC6 => 0x0416,
82
-	0xC7 => 0x0417,
83
-	0xC8 => 0x0418,
84
-	0xC9 => 0x0419,
85
-	0xCA => 0x041A,
86
-	0xCB => 0x041B,
87
-	0xCC => 0x041C,
88
-	0xCD => 0x041D,
89
-	0xCE => 0x041E,
90
-	0xCF => 0x041F,
91
-	0xD0 => 0x0420,
92
-	0xD1 => 0x0421,
93
-	0xD2 => 0x0422,
94
-	0xD3 => 0x0423,
95
-	0xD4 => 0x0424,
96
-	0xD5 => 0x0425,
97
-	0xD6 => 0x0426,
98
-	0xD7 => 0x0427,
99
-	0xD8 => 0x0428,
100
-	0xD9 => 0x0429,
101
-	0xDA => 0x042A,
102
-	0xDB => 0x042B,
103
-	0xDC => 0x042C,
104
-	0xDD => 0x042D,
105
-	0xDE => 0x042E,
106
-	0xDF => 0x042F,
107
-	0xE0 => 0x0430,
108
-	0xE1 => 0x0431,
109
-	0xE2 => 0x0432,
110
-	0xE3 => 0x0433,
111
-	0xE4 => 0x0434,
112
-	0xE5 => 0x0435,
113
-	0xE6 => 0x0436,
114
-	0xE7 => 0x0437,
115
-	0xE8 => 0x0438,
116
-	0xE9 => 0x0439,
117
-	0xEA => 0x043A,
118
-	0xEB => 0x043B,
119
-	0xEC => 0x043C,
120
-	0xED => 0x043D,
121
-	0xEE => 0x043E,
122
-	0xEF => 0x043F,
123
-	0xF0 => 0x0440,
124
-	0xF1 => 0x0441,
125
-	0xF2 => 0x0442,
126
-	0xF3 => 0x0443,
127
-	0xF4 => 0x0444,
128
-	0xF5 => 0x0445,
129
-	0xF6 => 0x0446,
130
-	0xF7 => 0x0447,
131
-	0xF8 => 0x0448,
132
-	0xF9 => 0x0449,
133
-	0xFA => 0x044A,
134
-	0xFB => 0x044B,
135
-	0xFC => 0x044C,
136
-	0xFD => 0x044D,
137
-	0xFE => 0x044E,
138
-	0xFF => 0x044F
12
+    0x80 => 0x0402,
13
+    0x81 => 0x0403,
14
+    0x82 => 0x201A,
15
+    0x83 => 0x0453,
16
+    0x84 => 0x201E,
17
+    0x85 => 0x2026,
18
+    0x86 => 0x2020,
19
+    0x87 => 0x2021,
20
+    0x88 => 0x20AC,
21
+    0x89 => 0x2030,
22
+    0x8A => 0x0409,
23
+    0x8B => 0x2039,
24
+    0x8C => 0x040A,
25
+    0x8D => 0x040C,
26
+    0x8E => 0x040B,
27
+    0x8F => 0x040F,
28
+    0x90 => 0x0452,
29
+    0x91 => 0x2018,
30
+    0x92 => 0x2019,
31
+    0x93 => 0x201C,
32
+    0x94 => 0x201D,
33
+    0x95 => 0x2022,
34
+    0x96 => 0x2013,
35
+    0x97 => 0x2014,
36
+    0x99 => 0x2122,
37
+    0x9A => 0x0459,
38
+    0x9B => 0x203A,
39
+    0x9C => 0x045A,
40
+    0x9D => 0x045C,
41
+    0x9E => 0x045B,
42
+    0x9F => 0x045F,
43
+    0xA0 => 0x00A0,
44
+    0xA1 => 0x040E,
45
+    0xA2 => 0x045E,
46
+    0xA3 => 0x0408,
47
+    0xA4 => 0x00A4,
48
+    0xA5 => 0x0490,
49
+    0xA6 => 0x00A6,
50
+    0xA7 => 0x00A7,
51
+    0xA8 => 0x0401,
52
+    0xA9 => 0x00A9,
53
+    0xAA => 0x0404,
54
+    0xAB => 0x00AB,
55
+    0xAC => 0x00AC,
56
+    0xAD => 0x00AD,
57
+    0xAE => 0x00AE,
58
+    0xAF => 0x0407,
59
+    0xB0 => 0x00B0,
60
+    0xB1 => 0x00B1,
61
+    0xB2 => 0x0406,
62
+    0xB3 => 0x0456,
63
+    0xB4 => 0x0491,
64
+    0xB5 => 0x00B5,
65
+    0xB6 => 0x00B6,
66
+    0xB7 => 0x00B7,
67
+    0xB8 => 0x0451,
68
+    0xB9 => 0x2116,
69
+    0xBA => 0x0454,
70
+    0xBB => 0x00BB,
71
+    0xBC => 0x0458,
72
+    0xBD => 0x0405,
73
+    0xBE => 0x0455,
74
+    0xBF => 0x0457,
75
+    0xC0 => 0x0410,
76
+    0xC1 => 0x0411,
77
+    0xC2 => 0x0412,
78
+    0xC3 => 0x0413,
79
+    0xC4 => 0x0414,
80
+    0xC5 => 0x0415,
81
+    0xC6 => 0x0416,
82
+    0xC7 => 0x0417,
83
+    0xC8 => 0x0418,
84
+    0xC9 => 0x0419,
85
+    0xCA => 0x041A,
86
+    0xCB => 0x041B,
87
+    0xCC => 0x041C,
88
+    0xCD => 0x041D,
89
+    0xCE => 0x041E,
90
+    0xCF => 0x041F,
91
+    0xD0 => 0x0420,
92
+    0xD1 => 0x0421,
93
+    0xD2 => 0x0422,
94
+    0xD3 => 0x0423,
95
+    0xD4 => 0x0424,
96
+    0xD5 => 0x0425,
97
+    0xD6 => 0x0426,
98
+    0xD7 => 0x0427,
99
+    0xD8 => 0x0428,
100
+    0xD9 => 0x0429,
101
+    0xDA => 0x042A,
102
+    0xDB => 0x042B,
103
+    0xDC => 0x042C,
104
+    0xDD => 0x042D,
105
+    0xDE => 0x042E,
106
+    0xDF => 0x042F,
107
+    0xE0 => 0x0430,
108
+    0xE1 => 0x0431,
109
+    0xE2 => 0x0432,
110
+    0xE3 => 0x0433,
111
+    0xE4 => 0x0434,
112
+    0xE5 => 0x0435,
113
+    0xE6 => 0x0436,
114
+    0xE7 => 0x0437,
115
+    0xE8 => 0x0438,
116
+    0xE9 => 0x0439,
117
+    0xEA => 0x043A,
118
+    0xEB => 0x043B,
119
+    0xEC => 0x043C,
120
+    0xED => 0x043D,
121
+    0xEE => 0x043E,
122
+    0xEF => 0x043F,
123
+    0xF0 => 0x0440,
124
+    0xF1 => 0x0441,
125
+    0xF2 => 0x0442,
126
+    0xF3 => 0x0443,
127
+    0xF4 => 0x0444,
128
+    0xF5 => 0x0445,
129
+    0xF6 => 0x0446,
130
+    0xF7 => 0x0447,
131
+    0xF8 => 0x0448,
132
+    0xF9 => 0x0449,
133
+    0xFA => 0x044A,
134
+    0xFB => 0x044B,
135
+    0xFC => 0x044C,
136
+    0xFD => 0x044D,
137
+    0xFE => 0x044E,
138
+    0xFF => 0x044F
139 139
 ];
Please login to merge, or discard this patch.
ecrire/charsets/html.php 1 patch
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -8,120 +8,120 @@
 block discarded – undo
8 8
  **/
9 9
 
10 10
 $GLOBALS['CHARSET']['html'] = [
11
-	'ldquo' => '&#8220;',
12
-	'rdquo' => '&#8221;',
13
-	'bdquo' => '&#8222;',
14
-	'cent' => '&#162;',
15
-	'pound' => '&#163;',
16
-	'curren' => '&#164;',
17
-	'yen' => '&#165;',
18
-	'brvbar' => '&#166;',
19
-	'sect' => '&#167;',
20
-	'uml' => '&#168;',
21
-	'ordf' => '&#170;',
22
-	'laquo' => '&#171;',
23
-	'lsquo' => '&#8216;',
24
-	'rsquo' => '&#8217;',
25
-	'not' => '&#172;',
26
-	'shy' => '&#173;',
27
-	'macr' => '&#175;',
28
-	'deg' => '&#176;',
29
-	'plusmn' => '&#177;',
30
-	'sup2' => '&#178;',
31
-	'sup3' => '&#179;',
32
-	'acute' => '&#180;',
33
-	'micro' => '&#181;',
34
-	'para' => '&#182;',
35
-	'middot' => '&#183;',
36
-	'cedil' => '&#184;',
37
-	'sup1' => '&#185;',
38
-	'ordm' => '&#186;',
39
-	'raquo' => '&#187;',
40
-	'iquest' => '&#191;',
41
-	'Agrave' => '&#192;',
42
-	'Aacute' => '&#193;',
43
-	'Acirc' => '&#194;',
44
-	'Atilde' => '&#195;',
45
-	'Auml' => '&#196;',
46
-	'Aring' => '&#197;',
47
-	'AElig' => '&#198;',
48
-	'Ccedil' => '&#199;',
49
-	'Egrave' => '&#200;',
50
-	'Eacute' => '&#201;',
51
-	'Ecirc' => '&#202;',
52
-	'Euml' => '&#203;',
53
-	'Igrave' => '&#204;',
54
-	'Iacute' => '&#205;',
55
-	'Icirc' => '&#206;',
56
-	'Iuml' => '&#207;',
57
-	'ETH' => '&#208;',
58
-	'Ntilde' => '&#209;',
59
-	'Ograve' => '&#210;',
60
-	'Oacute' => '&#211;',
61
-	'Ocirc' => '&#212;',
62
-	'Otilde' => '&#213;',
63
-	'Ouml' => '&#214;',
64
-	'times' => '&#215;',
65
-	'Oslash' => '&#216;',
66
-	'Ugrave' => '&#217;',
67
-	'Uacute' => '&#218;',
68
-	'Ucirc' => '&#219;',
69
-	'Uuml' => '&#220;',
70
-	'Yacute' => '&#221;',
71
-	'THORN' => '&#222;',
72
-	'szlig' => '&#223;',
73
-	'agrave' => '&#224;',
74
-	'Scaron' => '&#352;',
75
-	'scaron' => '&#353;',
76
-	'zcaron' => '&#x17E;',
77
-	'Zcaron' => '&#x17D;',
78
-	'aacute' => '&#225;',
79
-	'acirc' => '&#226;',
80
-	'atilde' => '&#227;',
81
-	'auml' => '&#228;',
82
-	'aring' => '&#229;',
83
-	'aelig' => '&#230;',
84
-	'ccedil' => '&#231;',
85
-	'egrave' => '&#232;',
86
-	'eacute' => '&#233;',
87
-	'ecirc' => '&#234;',
88
-	'euml' => '&#235;',
89
-	'igrave' => '&#236;',
90
-	'iacute' => '&#237;',
91
-	'icirc' => '&#238;',
92
-	'iuml' => '&#239;',
93
-	'eth' => '&#240;',
94
-	'ntilde' => '&#241;',
95
-	'ograve' => '&#242;',
96
-	'oacute' => '&#243;',
97
-	'ocirc' => '&#244;',
98
-	'otilde' => '&#245;',
99
-	'ouml' => '&#246;',
100
-	'divide' => '&#247;',
101
-	'oslash' => '&#248;',
102
-	'ugrave' => '&#249;',
103
-	'uacute' => '&#250;',
104
-	'ucirc' => '&#251;',
105
-	'uuml' => '&#252;',
106
-	'yacute' => '&#253;',
107
-	'thorn' => '&#254;',
108
-	'nbsp' => ' ',
109
-	'thinsp' => '&#8201;',
110
-	'ensp' => '&#8194;',
111
-	'emsp' => '&#8195;',
112
-	'copy' => '(c)',
113
-	'reg' => '(r)',
114
-	'frac14' => '1/4',
115
-	'frac12' => '1/2',
116
-	'frac34' => '3/4',
117
-	'apos' => "'",
118
-	'mdash' => '&#8212;',
119
-	'ndash' => '&#8211;',
120
-	'hellip' => '&#8230;',
121
-	'euro' => '&#8364;',
122
-	'OElig' => '&#338;',
123
-	'oelig' => '&#339;',
124
-	'iexcl' => '&#161;'
11
+    'ldquo' => '&#8220;',
12
+    'rdquo' => '&#8221;',
13
+    'bdquo' => '&#8222;',
14
+    'cent' => '&#162;',
15
+    'pound' => '&#163;',
16
+    'curren' => '&#164;',
17
+    'yen' => '&#165;',
18
+    'brvbar' => '&#166;',
19
+    'sect' => '&#167;',
20
+    'uml' => '&#168;',
21
+    'ordf' => '&#170;',
22
+    'laquo' => '&#171;',
23
+    'lsquo' => '&#8216;',
24
+    'rsquo' => '&#8217;',
25
+    'not' => '&#172;',
26
+    'shy' => '&#173;',
27
+    'macr' => '&#175;',
28
+    'deg' => '&#176;',
29
+    'plusmn' => '&#177;',
30
+    'sup2' => '&#178;',
31
+    'sup3' => '&#179;',
32
+    'acute' => '&#180;',
33
+    'micro' => '&#181;',
34
+    'para' => '&#182;',
35
+    'middot' => '&#183;',
36
+    'cedil' => '&#184;',
37
+    'sup1' => '&#185;',
38
+    'ordm' => '&#186;',
39
+    'raquo' => '&#187;',
40
+    'iquest' => '&#191;',
41
+    'Agrave' => '&#192;',
42
+    'Aacute' => '&#193;',
43
+    'Acirc' => '&#194;',
44
+    'Atilde' => '&#195;',
45
+    'Auml' => '&#196;',
46
+    'Aring' => '&#197;',
47
+    'AElig' => '&#198;',
48
+    'Ccedil' => '&#199;',
49
+    'Egrave' => '&#200;',
50
+    'Eacute' => '&#201;',
51
+    'Ecirc' => '&#202;',
52
+    'Euml' => '&#203;',
53
+    'Igrave' => '&#204;',
54
+    'Iacute' => '&#205;',
55
+    'Icirc' => '&#206;',
56
+    'Iuml' => '&#207;',
57
+    'ETH' => '&#208;',
58
+    'Ntilde' => '&#209;',
59
+    'Ograve' => '&#210;',
60
+    'Oacute' => '&#211;',
61
+    'Ocirc' => '&#212;',
62
+    'Otilde' => '&#213;',
63
+    'Ouml' => '&#214;',
64
+    'times' => '&#215;',
65
+    'Oslash' => '&#216;',
66
+    'Ugrave' => '&#217;',
67
+    'Uacute' => '&#218;',
68
+    'Ucirc' => '&#219;',
69
+    'Uuml' => '&#220;',
70
+    'Yacute' => '&#221;',
71
+    'THORN' => '&#222;',
72
+    'szlig' => '&#223;',
73
+    'agrave' => '&#224;',
74
+    'Scaron' => '&#352;',
75
+    'scaron' => '&#353;',
76
+    'zcaron' => '&#x17E;',
77
+    'Zcaron' => '&#x17D;',
78
+    'aacute' => '&#225;',
79
+    'acirc' => '&#226;',
80
+    'atilde' => '&#227;',
81
+    'auml' => '&#228;',
82
+    'aring' => '&#229;',
83
+    'aelig' => '&#230;',
84
+    'ccedil' => '&#231;',
85
+    'egrave' => '&#232;',
86
+    'eacute' => '&#233;',
87
+    'ecirc' => '&#234;',
88
+    'euml' => '&#235;',
89
+    'igrave' => '&#236;',
90
+    'iacute' => '&#237;',
91
+    'icirc' => '&#238;',
92
+    'iuml' => '&#239;',
93
+    'eth' => '&#240;',
94
+    'ntilde' => '&#241;',
95
+    'ograve' => '&#242;',
96
+    'oacute' => '&#243;',
97
+    'ocirc' => '&#244;',
98
+    'otilde' => '&#245;',
99
+    'ouml' => '&#246;',
100
+    'divide' => '&#247;',
101
+    'oslash' => '&#248;',
102
+    'ugrave' => '&#249;',
103
+    'uacute' => '&#250;',
104
+    'ucirc' => '&#251;',
105
+    'uuml' => '&#252;',
106
+    'yacute' => '&#253;',
107
+    'thorn' => '&#254;',
108
+    'nbsp' => ' ',
109
+    'thinsp' => '&#8201;',
110
+    'ensp' => '&#8194;',
111
+    'emsp' => '&#8195;',
112
+    'copy' => '(c)',
113
+    'reg' => '(r)',
114
+    'frac14' => '1/4',
115
+    'frac12' => '1/2',
116
+    'frac34' => '3/4',
117
+    'apos' => "'",
118
+    'mdash' => '&#8212;',
119
+    'ndash' => '&#8211;',
120
+    'hellip' => '&#8230;',
121
+    'euro' => '&#8364;',
122
+    'OElig' => '&#338;',
123
+    'oelig' => '&#339;',
124
+    'iexcl' => '&#161;'
125 125
 
126 126
 ];
127 127
 
Please login to merge, or discard this patch.