Completed
Push — master ( cc9c6b...2841c8 )
by cam
01:28
created
ecrire/inc/lister_objets.php 1 patch
Indentation   +21 added lines, -21 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
 
@@ -40,29 +40,29 @@  discard block
 block discarded – undo
40 40
  *     Code HTML de la liste
41 41
  */
42 42
 function inc_lister_objets_dist($vue, $contexte = [], $force = false) {
43
-	$res = ''; // debug
44
-	if (!is_array($contexte)) {
45
-		return _L('$contexte doit etre un tableau dans inc/lister_objets');
46
-	}
43
+    $res = ''; // debug
44
+    if (!is_array($contexte)) {
45
+        return _L('$contexte doit etre un tableau dans inc/lister_objets');
46
+    }
47 47
 
48
-	$fond = "prive/objets/liste/$vue";
49
-	if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) {
50
-		// traiter les cas particuliers
51
-		include_spip('base/connect_sql');
52
-		$vue = table_objet($vue);
53
-		$fond = "prive/objets/liste/$vue";
54
-		if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) {
55
-			return _L("vue $vue introuvable pour lister les objets");
56
-		}
57
-	}
48
+    $fond = "prive/objets/liste/$vue";
49
+    if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) {
50
+        // traiter les cas particuliers
51
+        include_spip('base/connect_sql');
52
+        $vue = table_objet($vue);
53
+        $fond = "prive/objets/liste/$vue";
54
+        if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) {
55
+            return _L("vue $vue introuvable pour lister les objets");
56
+        }
57
+    }
58 58
 
59 59
 
60
-	$contexte['sinon'] = ($force ? $contexte['titre'] : '');
60
+    $contexte['sinon'] = ($force ? $contexte['titre'] : '');
61 61
 
62
-	$res = recuperer_fond($fond, $contexte, ['ajax' => true]);
63
-	if (_request('var_liste')) {
64
-		echo var_export($contexte, true);
65
-	}
62
+    $res = recuperer_fond($fond, $contexte, ['ajax' => true]);
63
+    if (_request('var_liste')) {
64
+        echo var_export($contexte, true);
65
+    }
66 66
 
67
-	return $res;
67
+    return $res;
68 68
 }
Please login to merge, or discard this patch.
ecrire/inc/journal.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
  * @param array $opt
25 25
  */
26 26
 function inc_journal_dist($phrase, $opt = []) {
27
-	if (!strlen($phrase)) {
28
-		return;
29
-	}
30
-	if ($opt) {
31
-		$phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt));
32
-	}
33
-	spip_log($phrase, 'journal');
27
+    if (!strlen($phrase)) {
28
+        return;
29
+    }
30
+    if ($opt) {
31
+        $phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt));
32
+    }
33
+    spip_log($phrase, 'journal');
34 34
 }
Please login to merge, or discard this patch.
ecrire/inc/couleurs.php 1 patch
Indentation   +63 added lines, -63 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
 /**
@@ -38,70 +38,70 @@  discard block
 block discarded – undo
38 38
  * @return array|string
39 39
  */
40 40
 function inc_couleurs_dist($choix = null, $ajouter = false) {
41
-	static $couleurs_spip = [
42
-		// Violet soutenu
43
-		9 => ['couleur_theme' => '#9a6ef2'],
44
-		// Violet rosé
45
-		4 => ['couleur_theme' => '#c464cb'],
46
-		// Rose interface SPIP
47
-		2 => ['couleur_theme' =>  '#F02364'],
48
-		// Rouge
49
-		8 => ['couleur_theme' => '#ff4524'],
50
-		// Orange
51
-		3 => ['couleur_theme' => '#c97500'],
52
-		// Vert SPIP
53
-		1 => ['couleur_theme' => '#9dba00'],
54
-		// Vert Troglo
55
-		7 => ['couleur_theme' => '#419a2c'],
56
-		// Bleu-vert
57
-		12 => ['couleur_theme' => '#269681'],
58
-		//  Bleu pastel
59
-		5 => ['couleur_theme' => '#3190ae'],
60
-		//  Bleu Kermesse
61
-		11 => ['couleur_theme' => '#288bdd'],
62
-		//  Gris bleuté
63
-		6 => ['couleur_theme' => '#7d90a2'],
64
-		//  Gris
65
-		10 => ['couleur_theme' => '#909090'],
66
-	];
41
+    static $couleurs_spip = [
42
+        // Violet soutenu
43
+        9 => ['couleur_theme' => '#9a6ef2'],
44
+        // Violet rosé
45
+        4 => ['couleur_theme' => '#c464cb'],
46
+        // Rose interface SPIP
47
+        2 => ['couleur_theme' =>  '#F02364'],
48
+        // Rouge
49
+        8 => ['couleur_theme' => '#ff4524'],
50
+        // Orange
51
+        3 => ['couleur_theme' => '#c97500'],
52
+        // Vert SPIP
53
+        1 => ['couleur_theme' => '#9dba00'],
54
+        // Vert Troglo
55
+        7 => ['couleur_theme' => '#419a2c'],
56
+        // Bleu-vert
57
+        12 => ['couleur_theme' => '#269681'],
58
+        //  Bleu pastel
59
+        5 => ['couleur_theme' => '#3190ae'],
60
+        //  Bleu Kermesse
61
+        11 => ['couleur_theme' => '#288bdd'],
62
+        //  Gris bleuté
63
+        6 => ['couleur_theme' => '#7d90a2'],
64
+        //  Gris
65
+        10 => ['couleur_theme' => '#909090'],
66
+    ];
67 67
 
68
-	if (is_numeric($choix)) {
69
-		$c = $couleurs_spip[$choix];
70
-		// compat < SPIP 3.3
71
-		include_spip('inc/filtres_images_mini');
72
-		$c['couleur_foncee'] = $c['couleur_theme'];
73
-		$c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5);
68
+    if (is_numeric($choix)) {
69
+        $c = $couleurs_spip[$choix];
70
+        // compat < SPIP 3.3
71
+        include_spip('inc/filtres_images_mini');
72
+        $c['couleur_foncee'] = $c['couleur_theme'];
73
+        $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5);
74 74
 
75
-		return
76
-			'couleur_theme=' . substr($c['couleur_theme'], 1)
77
-			// compat < SPIP 3.3
78
-			. '&couleur_claire=' . substr($c['couleur_claire'], 1)
79
-			. '&couleur_foncee=' . substr($c['couleur_foncee'], 1);
80
-	} else {
81
-		if (is_array($choix)) {
82
-			// compat < SPIP 3.3
83
-			$compat_spip_33 = function ($c) {
84
-				if (!isset($c['couleur_theme'])) {
85
-					$c['couleur_theme'] = $c['couleur_foncee'];
86
-					unset($c['couleur_foncee']);
87
-					unset($c['couleur_claire']);
88
-					unset($c['couleur_lien']);
89
-					unset($c['couleur_lien_off']);
90
-				}
91
-				return $c;
92
-			};
93
-			if ($ajouter) {
94
-				foreach ($choix as $c) {
95
-					$couleurs_spip[] = $compat_spip_33($c);
96
-				}
75
+        return
76
+            'couleur_theme=' . substr($c['couleur_theme'], 1)
77
+            // compat < SPIP 3.3
78
+            . '&couleur_claire=' . substr($c['couleur_claire'], 1)
79
+            . '&couleur_foncee=' . substr($c['couleur_foncee'], 1);
80
+    } else {
81
+        if (is_array($choix)) {
82
+            // compat < SPIP 3.3
83
+            $compat_spip_33 = function ($c) {
84
+                if (!isset($c['couleur_theme'])) {
85
+                    $c['couleur_theme'] = $c['couleur_foncee'];
86
+                    unset($c['couleur_foncee']);
87
+                    unset($c['couleur_claire']);
88
+                    unset($c['couleur_lien']);
89
+                    unset($c['couleur_lien_off']);
90
+                }
91
+                return $c;
92
+            };
93
+            if ($ajouter) {
94
+                foreach ($choix as $c) {
95
+                    $couleurs_spip[] = $compat_spip_33($c);
96
+                }
97 97
 
98
-				return $couleurs_spip;
99
-			} else {
100
-				$choix = array_map($compat_spip_33, $choix);
101
-				return $couleurs_spip = $choix;
102
-			}
103
-		}
104
-	}
98
+                return $couleurs_spip;
99
+            } else {
100
+                $choix = array_map($compat_spip_33, $choix);
101
+                return $couleurs_spip = $choix;
102
+            }
103
+        }
104
+    }
105 105
 
106
-	return $couleurs_spip;
106
+    return $couleurs_spip;
107 107
 }
Please login to merge, or discard this patch.
ecrire/inc/iconifier.php 1 patch
Indentation   +7 added lines, -7 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('inc/actions');
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
  *     - ou tableau d'information sur le squelette.
37 37
  */
38 38
 function inc_iconifier_dist($objet, $id, $script, $visible = false, $flag_modif = true) {
39
-	// compat avec anciens appels
40
-	$objet = objet_type($objet);
39
+    // compat avec anciens appels
40
+    $objet = objet_type($objet);
41 41
 
42
-	return recuperer_fond(
43
-		'prive/objets/editer/logo',
44
-		['objet' => $objet, 'id_objet' => $id, 'editable' => $flag_modif]
45
-	);
42
+    return recuperer_fond(
43
+        'prive/objets/editer/logo',
44
+        ['objet' => $objet, 'id_objet' => $id, 'editable' => $flag_modif]
45
+    );
46 46
 }
Please login to merge, or discard this patch.
ecrire/inc/preselectionner_parent_nouvel_objet.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 if (!defined('_AUTO_SELECTION_RUBRIQUE')) {
17
-	define('_AUTO_SELECTION_RUBRIQUE', false);
17
+    define('_AUTO_SELECTION_RUBRIQUE', false);
18 18
 }
19 19
 
20 20
 
@@ -28,39 +28,39 @@  discard block
 block discarded – undo
28 28
  * @return string
29 29
  */
30 30
 function inc_preselectionner_parent_nouvel_objet_dist($objet, $row) {
31
-	if (!_AUTO_SELECTION_RUBRIQUE) {
32
-		return '';
33
-	}
31
+    if (!_AUTO_SELECTION_RUBRIQUE) {
32
+        return '';
33
+    }
34 34
 
35
-	if (!isset($row['id_rubrique'])) {
36
-		return '';
37
-	}
35
+    if (!isset($row['id_rubrique'])) {
36
+        return '';
37
+    }
38 38
 
39
-	$id_rubrique = '';
40
-	if ($GLOBALS['connect_id_rubrique']) {
41
-		// si admin restreint : sa rubrique
42
-		$id_rubrique = $GLOBALS['connect_id_rubrique'][0];
43
-	} elseif (
44
-		is_int(_AUTO_SELECTION_RUBRIQUE)
45
-		and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . intval(_AUTO_SELECTION_RUBRIQUE))
46
-	) {
47
-		$id_rubrique = _AUTO_SELECTION_RUBRIQUE;
48
-	} else {
49
-		// sinon la derniere rubrique cree
50
-		$row_rub = sql_fetsel('id_rubrique', 'spip_rubriques', '', '', 'id_rubrique DESC', '0,1');
51
-		$id_rubrique = $row_rub['id_rubrique'];
52
-	}
53
-	// si le choix ne convient pas, on cherche dans un secteur
54
-	if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) {
55
-		$id_rubrique = '';
56
-		// manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
57
-		$res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0');
58
-		while (!$id_rubrique and $row_rub = sql_fetch($res)) {
59
-			if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) {
60
-				$id_rubrique = $row_rub['id_rubrique'];
61
-			}
62
-		}
63
-	}
39
+    $id_rubrique = '';
40
+    if ($GLOBALS['connect_id_rubrique']) {
41
+        // si admin restreint : sa rubrique
42
+        $id_rubrique = $GLOBALS['connect_id_rubrique'][0];
43
+    } elseif (
44
+        is_int(_AUTO_SELECTION_RUBRIQUE)
45
+        and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . intval(_AUTO_SELECTION_RUBRIQUE))
46
+    ) {
47
+        $id_rubrique = _AUTO_SELECTION_RUBRIQUE;
48
+    } else {
49
+        // sinon la derniere rubrique cree
50
+        $row_rub = sql_fetsel('id_rubrique', 'spip_rubriques', '', '', 'id_rubrique DESC', '0,1');
51
+        $id_rubrique = $row_rub['id_rubrique'];
52
+    }
53
+    // si le choix ne convient pas, on cherche dans un secteur
54
+    if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) {
55
+        $id_rubrique = '';
56
+        // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
57
+        $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0');
58
+        while (!$id_rubrique and $row_rub = sql_fetch($res)) {
59
+            if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) {
60
+                $id_rubrique = $row_rub['id_rubrique'];
61
+            }
62
+        }
63
+    }
64 64
 
65
-	return $id_rubrique;
65
+    return $id_rubrique;
66 66
 }
Please login to merge, or discard this patch.
ecrire/inc/lang_liste.php 1 patch
Indentation   +198 added lines, -198 removed lines patch added patch discarded remove patch
@@ -18,206 +18,206 @@
 block discarded – undo
18 18
 */
19 19
 
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	return;
21
+    return;
22 22
 }
23 23
 
24 24
 $GLOBALS['codes_langues'] = [
25
-	'aa' => 'Afar',
26
-	'ab' => 'Abkhazian',
27
-	'af' => 'Afrikaans',
28
-	'am' => 'Amharic',
29
-	'an' => 'Aragon&#233;s',
30
-	'ar' => '&#1593;&#1585;&#1576;&#1610;',
31
-	'as' => 'Assamese',
32
-	'ast' => 'asturianu',
33
-	'ay' => 'Aymara',
34
-	'az' => 'Az&#601;rbaycan dili',
35
-	'ba' => 'Bashkir',
36
-	'be' => '&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1072;&#1103;',
37
-	'ber_tam' => 'Tamazigh',
38
-	'ber_tam_tfng' => 'Tamazigh tifinagh',
39
-	'bg' => '&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;',
40
-	'bh' => 'Bihari',
41
-	'bi' => 'Bislama',
42
-	'bm' => 'Bambara',
43
-	'bn' => 'Bengali; Bangla',
44
-	'bo' => 'Tibetan',
45
-	'br' => 'brezhoneg',
46
-	'bs' => 'bosanski',
47
-	'ca' => 'catal&#224;',
48
-	'co' => 'corsu',
49
-	'cpf' => 'Kr&eacute;ol r&eacute;yon&eacute;',
50
-	'cpf_dom' => 'Krey&ograve;l',
51
-	'cpf_hat' => 'Krey&ograve;l (Peyi Dayiti)',
52
-	'cs' => '&#269;e&#353;tina',
53
-	'cy' => 'Cymraeg',  # welsh, gallois
54
-	'da' => 'dansk',
55
-	'de' => 'Deutsch',
56
-	'dz' => 'Bhutani',
57
-	'el' => '&#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940;',
58
-	'en' => 'English',
59
-	'en_hx' => 'H4ck3R',
60
-	'en_sm' => 'Smurf',
61
-	'eo' => 'Esperanto',
62
-	'es' => 'Espa&#241;ol',
63
-	'es_co' => 'Colombiano',
64
-	'es_mx_pop' => 'Mexicano a lo g&#252;ey',
65
-	'et' => 'eesti',
66
-	'eu' => 'euskara',
67
-	'fa' => '&#1601;&#1575;&#1585;&#1587;&#1609;',
68
-	'ff' => 'Fulah', // peul
69
-	'fi' => 'suomi',
70
-	'fj' => 'Fiji',
71
-	'fo' => 'f&#248;royskt',
72
-	'fon' => 'fongb&egrave;',
73
-	'fr' => 'fran&#231;ais',
74
-	'fr_fem' => 'fran&#231;ais f&#233;minin',
75
-	'fr_sc' => 'schtroumpf',
76
-	'fr_lpc' => 'langue parl&#233;e compl&#233;t&#233;e',
77
-	'fr_lsf' => 'langue des signes fran&#231;aise',
78
-	'fr_spl' => 'fran&#231;ais simplifi&#233;',
79
-	'fr_tu' => 'fran&#231;ais copain',
80
-	'fy' => 'Frisian',
81
-	'ga' => 'Irish',
82
-	'gd' => 'Scots Gaelic',
83
-	'gl' => 'galego',
84
-	'gn' => 'Guarani',
85
-	'grc' => '&#7944;&#961;&#967;&#945;&#943;&#945; &#7961;&#955;&#955;&#951;&#957;&#953;&#954;&#942;', // grec ancien
86
-	'gu' => 'Gujarati',
87
-	'ha' => 'Hausa',
88
-	'hac' => '&#1705;-&#1607;&#1734;&#1585;&#1575;&#1605;&#1740;', //"Kurdish-Horami"
89
-	'hbo' => '&#1506;&#1489;&#1512;&#1497;&#1514;&#1470;&#1492;&#1514;&#1504;&#1498;', // hebreu classique ou biblique
90
-	'haz' => '&#x647;&#x632;&#x627;&#x631;&#x647; &#x6AF;&#x6CC;',
91
-	'he' => '&#1506;&#1489;&#1512;&#1497;&#1514;',
92
-	'hi' => '&#2361;&#2367;&#2306;&#2342;&#2368;',
93
-	'hr' => 'hrvatski',
94
-	'hu' => 'magyar',
95
-	'hy' => '&#1344;&#1377;&#1397;&#1381;&#1408;&#1381;&#1398;',// Arménien
96
-	'ia' => 'Interlingua',
97
-	'id' => 'Indonesia',
98
-	'ie' => 'Interlingue',
99
-	'ik' => 'Inupiak',
100
-	'is' => '&#237;slenska',
101
-	'it' => 'italiano',
102
-	'it_fem' => 'italiana',
103
-	'iu' => 'Inuktitut',
104
-	'ja' => '&#26085;&#26412;&#35486;',
105
-	'jv' => 'Javanese',
106
-	'ka' => '&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;',
107
-	'kk' => '&#1179;&#1072;&#1079;&#1072;&#1179;&#32;&#1090;&#1110;&#1083;&#1110;', // Kazakh
108
-	'kl' => 'kalaallisut',
109
-	'km' => '&#6039;&#6070;&#6047;&#6070;&#6017;&#6098;&#6040;&#6082;&#6042;',// Khmer
110
-	'kn' => 'Kannada',
111
-	'ko' => '&#54620;&#44397;&#50612;',
112
-	'kok' => '&#2325;&#2379;&#2306;&#2325;&#2339;&#2368;',
113
-	'ks' => 'Kashmiri',
114
-	'ku' => '&#1705;&#1608;&#1585;&#1583;&#1740;',
115
-	'ky' => 'Kirghiz',
116
-	'la' => 'lingua latina',
117
-	'lb' => 'L&euml;tzebuergesch',
118
-	'ln' => 'Lingala',
119
-	'lo' => '&#3742;&#3762;&#3754;&#3762;&#3749;&#3762;&#3751;', # lao
120
-	'lt' => 'lietuvi&#371;',
121
-	'lu' => 'luba-katanga',
122
-	'lv' => 'latvie&#353;u',
123
-	'man' => 'mandingue', # a traduire en mandingue
124
-	'mfv' => 'manjak', # ISO-639-3
125
-	'mg' => 'Malagasy',
126
-	'mi' => 'Maori',
127
-	'mk' => '&#1084;&#1072;&#1082;&#1077;&#1076;&#1086;&#1085;&#1089;&#1082;&#1080; &#1112;&#1072;&#1079;&#1080;&#1082;',
128
-	'ml' => 'Malayalam',
129
-	'mn' => 'Монгол хэл',
130
-	'mo' => 'Moldavian',
131
-	'mos' => 'Mor&eacute;',
132
-	'mr' => '&#2350;&#2352;&#2366;&#2336;&#2368;',
133
-	'ms' => 'Bahasa Malaysia',
134
-	'mt' => 'Maltese',
135
-	'my' => 'Burmese',
136
-	'na' => 'Nauru',
137
-	'nap' => 'napulitano',
138
-	'ne' => 'Nepali',
139
-	'nqo' => "N'ko", // www.manden.org
140
-	'nl' => 'Nederlands',
141
-	'no' => 'norsk',
142
-	'nb' => 'norsk bokm&aring;l',
143
-	'nn' => 'norsk nynorsk',
144
-	'oc' => '&ograve;c',
145
-	'oc_lnc' => '&ograve;c lengadocian',
146
-	'oc_ni' => '&ograve;c ni&ccedil;ard',
147
-	'oc_ni_la' => '&ograve;c ni&ccedil;ard (larg)',
148
-	'oc_ni_mis' => '&ograve;c nissart (mistralenc)',
149
-	'oc_prv' => '&ograve;c proven&ccedil;au',
150
-	'oc_gsc' => '&ograve;c gascon',
151
-	'oc_lms' => '&ograve;c lemosin',
152
-	'oc_auv' => '&ograve;c auvernhat',
153
-	'oc_va' => '&ograve;c vivaroaupenc',
154
-	'om' => '(Afan) Oromo',
155
-	'or' => 'Oriya',
156
-	'pa' => 'Punjabi',
157
-	'pbb' => 'Nasa Yuwe',
158
-	'pl' => 'polski',
159
-	'prs' => '&#1583;&#1585;&#1740;', // ISO-639-3 Dari (Afghanistan)
160
-	'ps' => '&#1662;&#1690;&#1578;&#1608;',
161
-	'pt' => 'Portugu&#234;s',
162
-	'pt_br' => 'Portugu&#234;s do Brasil',
163
-	'qu' => 'Quechua',
164
-	'rm' => 'Rhaeto-Romance',
165
-	'rn' => 'Kirundi',
166
-	'ro' => 'rom&#226;n&#259;',
167
-	'roa' => "ch'ti",
168
-	'ru' => '&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;',
169
-	'rw' => 'Kinyarwanda',
170
-	'sa' => '&#2360;&#2306;&#2360;&#2381;&#2325;&#2371;&#2340;',
171
-	'sc' => 'sardu',
172
-	'scn' => 'sicilianu',
173
-	'sd' => 'Sindhi',
174
-	'sg' => 'Sangho',
175
-	'sh' => 'srpskohrvastski',
176
-	'sh_latn' => 'srpskohrvastski',
177
-	'sh_cyrl' => '&#1057;&#1088;&#1087;&#1089;&#1082;&#1086;&#1093;&#1088;&#1074;&#1072;&#1090;&#1089;&#1082;&#1080;',
178
-	'si' => 'Sinhalese',
179
-	'sk' => 'sloven&#269;ina',  // (Slovakia)
180
-	'sl' => 'sloven&#353;&#269;ina',  // (Slovenia)
181
-	'sm' => 'Samoan',
182
-	'sn' => 'Shona',
183
-	'so' => 'Somali',
184
-	'sq' => 'shqip',
185
-	'sr' => '&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;',
186
-	'src' => 'sardu logudor&#233;su', // sarde cf 'sc'
187
-	'sro' => 'sardu campidan&#233;su',
188
-	'ss' => 'Siswati',
189
-	'st' => 'Sesotho',
190
-	'su' => 'Sundanese',
191
-	'sv' => 'svenska',
192
-	'sw' => 'Kiswahili',
193
-	'ta' => '&#2980;&#2990;&#3007;&#2996;&#3021;', // Tamil
194
-	'te' => 'Telugu',
195
-	'tg' => 'Tajik',
196
-	'th' => '&#3652;&#3607;&#3618;',
197
-	'ti' => 'Tigrinya',
198
-	'tk' => 'Turkmen',
199
-	'tl' => 'Tagalog',
200
-	'tn' => 'Setswana',
201
-	'to' => 'Tonga',
202
-	'tr' => 'T&#252;rk&#231;e',
203
-	'ts' => 'Tsonga',
204
-	'tt' => '&#1058;&#1072;&#1090;&#1072;&#1088;',
205
-	'tw' => 'Twi',
206
-	'ty' => 'reo m&#257;`ohi', // tahitien
207
-	'ug' => 'Uighur',
208
-	'uk' => '&#1091;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;',
209
-	'ur' => '&#1649;&#1585;&#1583;&#1608;',
210
-	'uz' => "O'zbekcha",
211
-	'vi' => 'Ti&#7871;ng Vi&#7879;t',
212
-	'vo' => 'Volapuk',
213
-	'wa' => 'walon',
214
-	'wo' => 'Wolof',
215
-	'xh' => 'Xhosa',
216
-	'yi' => 'Yiddish',
217
-	'yo' => 'Yoruba',
218
-	'za' => 'Zhuang',
219
-	'zh' => '&#20013;&#25991;', // chinois (ecriture simplifiee)
220
-	'zh_tw' => '&#21488;&#28771;&#20013;&#25991;', // chinois taiwan (ecr. traditionnelle)
221
-	'zu' => 'Zulu'
25
+    'aa' => 'Afar',
26
+    'ab' => 'Abkhazian',
27
+    'af' => 'Afrikaans',
28
+    'am' => 'Amharic',
29
+    'an' => 'Aragon&#233;s',
30
+    'ar' => '&#1593;&#1585;&#1576;&#1610;',
31
+    'as' => 'Assamese',
32
+    'ast' => 'asturianu',
33
+    'ay' => 'Aymara',
34
+    'az' => 'Az&#601;rbaycan dili',
35
+    'ba' => 'Bashkir',
36
+    'be' => '&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1072;&#1103;',
37
+    'ber_tam' => 'Tamazigh',
38
+    'ber_tam_tfng' => 'Tamazigh tifinagh',
39
+    'bg' => '&#1073;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;',
40
+    'bh' => 'Bihari',
41
+    'bi' => 'Bislama',
42
+    'bm' => 'Bambara',
43
+    'bn' => 'Bengali; Bangla',
44
+    'bo' => 'Tibetan',
45
+    'br' => 'brezhoneg',
46
+    'bs' => 'bosanski',
47
+    'ca' => 'catal&#224;',
48
+    'co' => 'corsu',
49
+    'cpf' => 'Kr&eacute;ol r&eacute;yon&eacute;',
50
+    'cpf_dom' => 'Krey&ograve;l',
51
+    'cpf_hat' => 'Krey&ograve;l (Peyi Dayiti)',
52
+    'cs' => '&#269;e&#353;tina',
53
+    'cy' => 'Cymraeg',  # welsh, gallois
54
+    'da' => 'dansk',
55
+    'de' => 'Deutsch',
56
+    'dz' => 'Bhutani',
57
+    'el' => '&#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940;',
58
+    'en' => 'English',
59
+    'en_hx' => 'H4ck3R',
60
+    'en_sm' => 'Smurf',
61
+    'eo' => 'Esperanto',
62
+    'es' => 'Espa&#241;ol',
63
+    'es_co' => 'Colombiano',
64
+    'es_mx_pop' => 'Mexicano a lo g&#252;ey',
65
+    'et' => 'eesti',
66
+    'eu' => 'euskara',
67
+    'fa' => '&#1601;&#1575;&#1585;&#1587;&#1609;',
68
+    'ff' => 'Fulah', // peul
69
+    'fi' => 'suomi',
70
+    'fj' => 'Fiji',
71
+    'fo' => 'f&#248;royskt',
72
+    'fon' => 'fongb&egrave;',
73
+    'fr' => 'fran&#231;ais',
74
+    'fr_fem' => 'fran&#231;ais f&#233;minin',
75
+    'fr_sc' => 'schtroumpf',
76
+    'fr_lpc' => 'langue parl&#233;e compl&#233;t&#233;e',
77
+    'fr_lsf' => 'langue des signes fran&#231;aise',
78
+    'fr_spl' => 'fran&#231;ais simplifi&#233;',
79
+    'fr_tu' => 'fran&#231;ais copain',
80
+    'fy' => 'Frisian',
81
+    'ga' => 'Irish',
82
+    'gd' => 'Scots Gaelic',
83
+    'gl' => 'galego',
84
+    'gn' => 'Guarani',
85
+    'grc' => '&#7944;&#961;&#967;&#945;&#943;&#945; &#7961;&#955;&#955;&#951;&#957;&#953;&#954;&#942;', // grec ancien
86
+    'gu' => 'Gujarati',
87
+    'ha' => 'Hausa',
88
+    'hac' => '&#1705;-&#1607;&#1734;&#1585;&#1575;&#1605;&#1740;', //"Kurdish-Horami"
89
+    'hbo' => '&#1506;&#1489;&#1512;&#1497;&#1514;&#1470;&#1492;&#1514;&#1504;&#1498;', // hebreu classique ou biblique
90
+    'haz' => '&#x647;&#x632;&#x627;&#x631;&#x647; &#x6AF;&#x6CC;',
91
+    'he' => '&#1506;&#1489;&#1512;&#1497;&#1514;',
92
+    'hi' => '&#2361;&#2367;&#2306;&#2342;&#2368;',
93
+    'hr' => 'hrvatski',
94
+    'hu' => 'magyar',
95
+    'hy' => '&#1344;&#1377;&#1397;&#1381;&#1408;&#1381;&#1398;',// Arménien
96
+    'ia' => 'Interlingua',
97
+    'id' => 'Indonesia',
98
+    'ie' => 'Interlingue',
99
+    'ik' => 'Inupiak',
100
+    'is' => '&#237;slenska',
101
+    'it' => 'italiano',
102
+    'it_fem' => 'italiana',
103
+    'iu' => 'Inuktitut',
104
+    'ja' => '&#26085;&#26412;&#35486;',
105
+    'jv' => 'Javanese',
106
+    'ka' => '&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;',
107
+    'kk' => '&#1179;&#1072;&#1079;&#1072;&#1179;&#32;&#1090;&#1110;&#1083;&#1110;', // Kazakh
108
+    'kl' => 'kalaallisut',
109
+    'km' => '&#6039;&#6070;&#6047;&#6070;&#6017;&#6098;&#6040;&#6082;&#6042;',// Khmer
110
+    'kn' => 'Kannada',
111
+    'ko' => '&#54620;&#44397;&#50612;',
112
+    'kok' => '&#2325;&#2379;&#2306;&#2325;&#2339;&#2368;',
113
+    'ks' => 'Kashmiri',
114
+    'ku' => '&#1705;&#1608;&#1585;&#1583;&#1740;',
115
+    'ky' => 'Kirghiz',
116
+    'la' => 'lingua latina',
117
+    'lb' => 'L&euml;tzebuergesch',
118
+    'ln' => 'Lingala',
119
+    'lo' => '&#3742;&#3762;&#3754;&#3762;&#3749;&#3762;&#3751;', # lao
120
+    'lt' => 'lietuvi&#371;',
121
+    'lu' => 'luba-katanga',
122
+    'lv' => 'latvie&#353;u',
123
+    'man' => 'mandingue', # a traduire en mandingue
124
+    'mfv' => 'manjak', # ISO-639-3
125
+    'mg' => 'Malagasy',
126
+    'mi' => 'Maori',
127
+    'mk' => '&#1084;&#1072;&#1082;&#1077;&#1076;&#1086;&#1085;&#1089;&#1082;&#1080; &#1112;&#1072;&#1079;&#1080;&#1082;',
128
+    'ml' => 'Malayalam',
129
+    'mn' => 'Монгол хэл',
130
+    'mo' => 'Moldavian',
131
+    'mos' => 'Mor&eacute;',
132
+    'mr' => '&#2350;&#2352;&#2366;&#2336;&#2368;',
133
+    'ms' => 'Bahasa Malaysia',
134
+    'mt' => 'Maltese',
135
+    'my' => 'Burmese',
136
+    'na' => 'Nauru',
137
+    'nap' => 'napulitano',
138
+    'ne' => 'Nepali',
139
+    'nqo' => "N'ko", // www.manden.org
140
+    'nl' => 'Nederlands',
141
+    'no' => 'norsk',
142
+    'nb' => 'norsk bokm&aring;l',
143
+    'nn' => 'norsk nynorsk',
144
+    'oc' => '&ograve;c',
145
+    'oc_lnc' => '&ograve;c lengadocian',
146
+    'oc_ni' => '&ograve;c ni&ccedil;ard',
147
+    'oc_ni_la' => '&ograve;c ni&ccedil;ard (larg)',
148
+    'oc_ni_mis' => '&ograve;c nissart (mistralenc)',
149
+    'oc_prv' => '&ograve;c proven&ccedil;au',
150
+    'oc_gsc' => '&ograve;c gascon',
151
+    'oc_lms' => '&ograve;c lemosin',
152
+    'oc_auv' => '&ograve;c auvernhat',
153
+    'oc_va' => '&ograve;c vivaroaupenc',
154
+    'om' => '(Afan) Oromo',
155
+    'or' => 'Oriya',
156
+    'pa' => 'Punjabi',
157
+    'pbb' => 'Nasa Yuwe',
158
+    'pl' => 'polski',
159
+    'prs' => '&#1583;&#1585;&#1740;', // ISO-639-3 Dari (Afghanistan)
160
+    'ps' => '&#1662;&#1690;&#1578;&#1608;',
161
+    'pt' => 'Portugu&#234;s',
162
+    'pt_br' => 'Portugu&#234;s do Brasil',
163
+    'qu' => 'Quechua',
164
+    'rm' => 'Rhaeto-Romance',
165
+    'rn' => 'Kirundi',
166
+    'ro' => 'rom&#226;n&#259;',
167
+    'roa' => "ch'ti",
168
+    'ru' => '&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;',
169
+    'rw' => 'Kinyarwanda',
170
+    'sa' => '&#2360;&#2306;&#2360;&#2381;&#2325;&#2371;&#2340;',
171
+    'sc' => 'sardu',
172
+    'scn' => 'sicilianu',
173
+    'sd' => 'Sindhi',
174
+    'sg' => 'Sangho',
175
+    'sh' => 'srpskohrvastski',
176
+    'sh_latn' => 'srpskohrvastski',
177
+    'sh_cyrl' => '&#1057;&#1088;&#1087;&#1089;&#1082;&#1086;&#1093;&#1088;&#1074;&#1072;&#1090;&#1089;&#1082;&#1080;',
178
+    'si' => 'Sinhalese',
179
+    'sk' => 'sloven&#269;ina',  // (Slovakia)
180
+    'sl' => 'sloven&#353;&#269;ina',  // (Slovenia)
181
+    'sm' => 'Samoan',
182
+    'sn' => 'Shona',
183
+    'so' => 'Somali',
184
+    'sq' => 'shqip',
185
+    'sr' => '&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;',
186
+    'src' => 'sardu logudor&#233;su', // sarde cf 'sc'
187
+    'sro' => 'sardu campidan&#233;su',
188
+    'ss' => 'Siswati',
189
+    'st' => 'Sesotho',
190
+    'su' => 'Sundanese',
191
+    'sv' => 'svenska',
192
+    'sw' => 'Kiswahili',
193
+    'ta' => '&#2980;&#2990;&#3007;&#2996;&#3021;', // Tamil
194
+    'te' => 'Telugu',
195
+    'tg' => 'Tajik',
196
+    'th' => '&#3652;&#3607;&#3618;',
197
+    'ti' => 'Tigrinya',
198
+    'tk' => 'Turkmen',
199
+    'tl' => 'Tagalog',
200
+    'tn' => 'Setswana',
201
+    'to' => 'Tonga',
202
+    'tr' => 'T&#252;rk&#231;e',
203
+    'ts' => 'Tsonga',
204
+    'tt' => '&#1058;&#1072;&#1090;&#1072;&#1088;',
205
+    'tw' => 'Twi',
206
+    'ty' => 'reo m&#257;`ohi', // tahitien
207
+    'ug' => 'Uighur',
208
+    'uk' => '&#1091;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;',
209
+    'ur' => '&#1649;&#1585;&#1583;&#1608;',
210
+    'uz' => "O'zbekcha",
211
+    'vi' => 'Ti&#7871;ng Vi&#7879;t',
212
+    'vo' => 'Volapuk',
213
+    'wa' => 'walon',
214
+    'wo' => 'Wolof',
215
+    'xh' => 'Xhosa',
216
+    'yi' => 'Yiddish',
217
+    'yo' => 'Yoruba',
218
+    'za' => 'Zhuang',
219
+    'zh' => '&#20013;&#25991;', // chinois (ecriture simplifiee)
220
+    'zh_tw' => '&#21488;&#28771;&#20013;&#25991;', // chinois taiwan (ecr. traditionnelle)
221
+    'zu' => 'Zulu'
222 222
 
223 223
 ];
Please login to merge, or discard this patch.
ecrire/inc/selectionner.php 1 patch
Indentation   +108 added lines, -108 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('inc/filtres');
@@ -46,56 +46,56 @@  discard block
 block discarded – undo
46 46
  **/
47 47
 function inc_selectionner_dist($sel, $idom = '', $exclus = 0, $aff_racine = false, $recur = true, $do = 'aff') {
48 48
 
49
-	if ($recur) {
50
-		$recur = mini_hier($sel);
51
-	} else {
52
-		$sel = 0;
53
-	}
54
-
55
-	if ($aff_racine) {
56
-		$info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
57
-		$idom3 = $idom . '_selection';
58
-
59
-		$onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;";
60
-
61
-		$ondbClick = strtr(
62
-			str_replace(
63
-				"'",
64
-				'&#8217;',
65
-				str_replace(
66
-					'"',
67
-					'&#34;',
68
-					textebrut(_T('info_racine_site'))
69
-				)
70
-			),
71
-			"\n\r",
72
-			'  '
73
-		);
74
-
75
-		$js_func = $do . '_selection_titre';
76
-		$ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');";
77
-
78
-		$aff_racine = "<div class='petit-item petite-racine item'>"
79
-			. "<a href='#'"
80
-			. 'onclick="'
81
-			. $onClick
82
-			. "\"\nondbclick=\""
83
-			. $ondbClick
84
-			. $onClick
85
-			. '">'
86
-			. _T('info_racine_site')
87
-			. '</a></div>';
88
-	}
89
-
90
-	$url_init = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclus&id=0&col=1&do=$do");
91
-
92
-	$plonger = charger_fonction('plonger', 'inc');
93
-	$plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do);
94
-
95
-	// url completee par la fonction JS onkeypress_rechercher
96
-	$url = generer_url_ecrire('rechercher', "exclus=$exclus&rac=$idom&do=$do&type=");
97
-
98
-	return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init);
49
+    if ($recur) {
50
+        $recur = mini_hier($sel);
51
+    } else {
52
+        $sel = 0;
53
+    }
54
+
55
+    if ($aff_racine) {
56
+        $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id=");
57
+        $idom3 = $idom . '_selection';
58
+
59
+        $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;";
60
+
61
+        $ondbClick = strtr(
62
+            str_replace(
63
+                "'",
64
+                '&#8217;',
65
+                str_replace(
66
+                    '"',
67
+                    '&#34;',
68
+                    textebrut(_T('info_racine_site'))
69
+                )
70
+            ),
71
+            "\n\r",
72
+            '  '
73
+        );
74
+
75
+        $js_func = $do . '_selection_titre';
76
+        $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');";
77
+
78
+        $aff_racine = "<div class='petit-item petite-racine item'>"
79
+            . "<a href='#'"
80
+            . 'onclick="'
81
+            . $onClick
82
+            . "\"\nondbclick=\""
83
+            . $ondbClick
84
+            . $onClick
85
+            . '">'
86
+            . _T('info_racine_site')
87
+            . '</a></div>';
88
+    }
89
+
90
+    $url_init = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclus&id=0&col=1&do=$do");
91
+
92
+    $plonger = charger_fonction('plonger', 'inc');
93
+    $plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do);
94
+
95
+    // url completee par la fonction JS onkeypress_rechercher
96
+    $url = generer_url_ecrire('rechercher', "exclus=$exclus&rac=$idom&do=$do&type=");
97
+
98
+    return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init);
99 99
 }
100 100
 
101 101
 /**
@@ -113,58 +113,58 @@  discard block
 block discarded – undo
113 113
  **/
114 114
 function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') {
115 115
 
116
-	$idom1 = $idom . '_champ_recherche';
117
-	$idom2 = $idom . '_principal';
118
-	$idom3 = $idom . '_selection';
119
-	$idom4 = $idom . '_col_1';
120
-	$idom5 = 'img_' . $idom4;
121
-	$idom6 = $idom . '_fonc';
122
-
123
-	return "<div id='$idom'>"
124
-	. "<a id='$idom6' style='visibility: hidden;'"
125
-	. ($url_init ? "\nhref='$url_init'" : '')
126
-	. '></a>'
127
-	. "<div class='recherche_rapide_parent formulaire_recherche'>"
128
-	. http_img_pack(
129
-		'loader.svg',
130
-		'',
131
-		"class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'"
132
-	)
133
-	. ''
134
-	. "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'"
135
-	// eliminer Return car il provoque la soumission (balise unique)
136
-	// et eliminer Tab pour la navigation au clavier
137
-	// ce serait encore mieux de ne le faire que s'il y a encore plusieurs
138
-	// resultats retournes par la recherche
139
-	. "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3 || k==9){return false;}\""
140
-	// lancer la recherche apres le filtrage ci-dessus sauf sur le tab (navigation au clavier)
141
-	. "\nonkeyup=\"if(event.keyCode==9){return false;};return onkey_rechercher(this.value,"
142
-	// la destination de la recherche
143
-	. "'$idom4'"
116
+    $idom1 = $idom . '_champ_recherche';
117
+    $idom2 = $idom . '_principal';
118
+    $idom3 = $idom . '_selection';
119
+    $idom4 = $idom . '_col_1';
120
+    $idom5 = 'img_' . $idom4;
121
+    $idom6 = $idom . '_fonc';
122
+
123
+    return "<div id='$idom'>"
124
+    . "<a id='$idom6' style='visibility: hidden;'"
125
+    . ($url_init ? "\nhref='$url_init'" : '')
126
+    . '></a>'
127
+    . "<div class='recherche_rapide_parent formulaire_recherche'>"
128
+    . http_img_pack(
129
+        'loader.svg',
130
+        '',
131
+        "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'"
132
+    )
133
+    . ''
134
+    . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'"
135
+    // eliminer Return car il provoque la soumission (balise unique)
136
+    // et eliminer Tab pour la navigation au clavier
137
+    // ce serait encore mieux de ne le faire que s'il y a encore plusieurs
138
+    // resultats retournes par la recherche
139
+    . "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3 || k==9){return false;}\""
140
+    // lancer la recherche apres le filtrage ci-dessus sauf sur le tab (navigation au clavier)
141
+    . "\nonkeyup=\"if(event.keyCode==9){return false;};return onkey_rechercher(this.value,"
142
+    // la destination de la recherche
143
+    . "'$idom4'"
144 144
 #	. "this.parentNode.parentNode.parentNode.parentNode.nextSibling.firstChild.id"
145
-	. ",'"
146
-	// l'url effectuant la recherche
147
-	. $url
148
-	. "',"
149
-	// le noeud contenant un gif anime
150
-	// . "'idom5'"
151
-	. 'this.parentNode.previousSibling.firstChild'
152
-	. ",'"
153
-	// la valeur de l'attribut Name a remplir
154
-	. $name
155
-	. "','"
156
-	// noeud invisible memorisant l'URL initiale (pour re-initialisation)
157
-	. $idom6
158
-	. "')\""
159
-	. ' />'
160
-	. "\n</div>"
161
-	. ($racine ? "<div>$racine</div>" : '')
162
-	. "<div id='"
163
-	. $idom2
164
-	. "'><div id='$idom4'"
165
-	. " class=''>"
166
-	. $liste
167
-	. "</div></div>\n<div id='$idom3'></div></div>\n";
145
+    . ",'"
146
+    // l'url effectuant la recherche
147
+    . $url
148
+    . "',"
149
+    // le noeud contenant un gif anime
150
+    // . "'idom5'"
151
+    . 'this.parentNode.previousSibling.firstChild'
152
+    . ",'"
153
+    // la valeur de l'attribut Name a remplir
154
+    . $name
155
+    . "','"
156
+    // noeud invisible memorisant l'URL initiale (pour re-initialisation)
157
+    . $idom6
158
+    . "')\""
159
+    . ' />'
160
+    . "\n</div>"
161
+    . ($racine ? "<div>$racine</div>" : '')
162
+    . "<div id='"
163
+    . $idom2
164
+    . "'><div id='$idom4'"
165
+    . " class=''>"
166
+    . $liste
167
+    . "</div></div>\n<div id='$idom3'></div></div>\n";
168 168
 }
169 169
 
170 170
 /**
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
  **/
177 177
 function mini_hier($id_rubrique) {
178 178
 
179
-	$liste = $id_rubrique;
180
-	$id_rubrique = intval($id_rubrique);
181
-	while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) {
182
-		$liste = $id_rubrique . ",$liste";
183
-	}
179
+    $liste = $id_rubrique;
180
+    $id_rubrique = intval($id_rubrique);
181
+    while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) {
182
+        $liste = $id_rubrique . ",$liste";
183
+    }
184 184
 
185
-	return explode(',', "0,$liste");
185
+    return explode(',', "0,$liste");
186 186
 }
Please login to merge, or discard this patch.
ecrire/inc/email_valide.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @package SPIP\Core\Mail
17 17
  **/
18 18
 if (!defined('_ECRIRE_INC_VERSION')) {
19
-	return;
19
+    return;
20 20
 }
21 21
 
22 22
 
@@ -31,27 +31,27 @@  discard block
 block discarded – undo
31 31
  *      - la normalisation de la dernière adresse donnée sinon
32 32
  **/
33 33
 function inc_email_valide_dist($adresses) {
34
-	// eviter d'injecter n'importe quoi dans preg_match
35
-	if (!is_string($adresses)) {
36
-		return false;
37
-	}
38
-
39
-	// Si c'est un spammeur autant arreter tout de suite
40
-	if (preg_match(",[\n\r].*(MIME|multipart|Content-),i", $adresses)) {
41
-		spip_log("Tentative d'injection de mail : $adresses");
42
-
43
-		return false;
44
-	}
45
-
46
-	foreach (explode(',', $adresses) as $v) {
47
-		// nettoyer certains formats
48
-		// "Marie Toto <[email protected]>"
49
-		$adresse = trim(preg_replace(',^[^<>"]*<([^<>"]+)>$,i', "\\1", $v));
50
-		// RFC 822
51
-		if (!preg_match('#^[^()<>@,;:\\"/[:space:]]+(@([-_0-9a-z]+\.)*[-_0-9a-z]+)$#i', $adresse)) {
52
-			return false;
53
-		}
54
-	}
55
-
56
-	return $adresse;
34
+    // eviter d'injecter n'importe quoi dans preg_match
35
+    if (!is_string($adresses)) {
36
+        return false;
37
+    }
38
+
39
+    // Si c'est un spammeur autant arreter tout de suite
40
+    if (preg_match(",[\n\r].*(MIME|multipart|Content-),i", $adresses)) {
41
+        spip_log("Tentative d'injection de mail : $adresses");
42
+
43
+        return false;
44
+    }
45
+
46
+    foreach (explode(',', $adresses) as $v) {
47
+        // nettoyer certains formats
48
+        // "Marie Toto <[email protected]>"
49
+        $adresse = trim(preg_replace(',^[^<>"]*<([^<>"]+)>$,i', "\\1", $v));
50
+        // RFC 822
51
+        if (!preg_match('#^[^()<>@,;:\\"/[:space:]]+(@([-_0-9a-z]+\.)*[-_0-9a-z]+)$#i', $adresse)) {
52
+            return false;
53
+        }
54
+    }
55
+
56
+    return $adresse;
57 57
 }
Please login to merge, or discard this patch.
ecrire/inc/completer_traduction.php 1 patch
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
 /**
@@ -29,51 +29,51 @@  discard block
 block discarded – undo
29 29
  * @return string Erreur éventuelle
30 30
  */
31 31
 function inc_completer_traduction_dist($objet, $id_objet, $id_trad) {
32
-	// dupliquer tous les liens sauf les auteurs : le nouvel auteur est celui qui traduit
33
-	// cf API editer_liens
34
-	include_spip('action/editer_liens');
35
-	objet_dupliquer_liens($objet, $id_trad, $id_objet, null, ['auteur']);
36
-	$_id_table = id_table_objet($objet);
32
+    // dupliquer tous les liens sauf les auteurs : le nouvel auteur est celui qui traduit
33
+    // cf API editer_liens
34
+    include_spip('action/editer_liens');
35
+    objet_dupliquer_liens($objet, $id_trad, $id_objet, null, ['auteur']);
36
+    $_id_table = id_table_objet($objet);
37 37
 
38
-	// recuperer le logo
39
-	$chercher_logo = charger_fonction('chercher_logo', 'inc');
40
-	include_spip('action/editer_logo');
41
-	foreach (['on', 'off'] as $etat) {
42
-		$logo = $chercher_logo($id_trad, $_id_table, $etat);
43
-		if ($logo and $file = reset($logo)) {
44
-			logo_modifier($objet, $id_objet, $etat, $file);
45
-		}
46
-	}
38
+    // recuperer le logo
39
+    $chercher_logo = charger_fonction('chercher_logo', 'inc');
40
+    include_spip('action/editer_logo');
41
+    foreach (['on', 'off'] as $etat) {
42
+        $logo = $chercher_logo($id_trad, $_id_table, $etat);
43
+        if ($logo and $file = reset($logo)) {
44
+            logo_modifier($objet, $id_objet, $etat, $file);
45
+        }
46
+    }
47 47
 
48
-	// dupliquer certains champs
49
-	$trouver_table = charger_fonction('trouver_table', 'base');
50
-	$desc = $trouver_table(table_objet_sql($objet));
51
-	$champs = $set = [];
48
+    // dupliquer certains champs
49
+    $trouver_table = charger_fonction('trouver_table', 'base');
50
+    $desc = $trouver_table(table_objet_sql($objet));
51
+    $champs = $set = [];
52 52
 
53
-	// un éventuel champ 'virtuel' (redirections)
54
-	if (!empty($desc['field']['virtuel'])) {
55
-		$champs[] = 'virtuel';
56
-	}
53
+    // un éventuel champ 'virtuel' (redirections)
54
+    if (!empty($desc['field']['virtuel'])) {
55
+        $champs[] = 'virtuel';
56
+    }
57 57
 
58
-	$data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad));
58
+    $data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad));
59 59
 
60
-	foreach ($champs as $c) {
61
-		$set[$c] = $data[$c];
62
-	}
60
+    foreach ($champs as $c) {
61
+        $set[$c] = $data[$c];
62
+    }
63 63
 
64
-	/*
64
+    /*
65 65
 	 * Le pipeline 'pre_edition' sera appelé avec l'action 'completer_traduction'.
66 66
 	 * Des plugins pourront ainsi compléter les champs d'un objet traduit lors d'une nouvelle traduction.
67 67
 	 */
68
-	$err = objet_modifier_champs(
69
-		$objet,
70
-		$id_objet,
71
-		[
72
-			'data' => $data,
73
-			'action' => 'completer_traduction',
74
-		],
75
-		$set
76
-	);
68
+    $err = objet_modifier_champs(
69
+        $objet,
70
+        $id_objet,
71
+        [
72
+            'data' => $data,
73
+            'action' => 'completer_traduction',
74
+        ],
75
+        $set
76
+    );
77 77
 
78
-	return $err;
78
+    return $err;
79 79
 }
Please login to merge, or discard this patch.