Completed
Push — master ( c12d0a...30a01b )
by cam
31:59
created
prive/formulaires/configurer_langue.php 2 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -11,59 +11,59 @@
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 
17 17
 function formulaires_configurer_langue_charger_dist() {
18
-	$valeurs = array();
18
+    $valeurs = array();
19 19
 
20
-	include_spip('inc/lang');
21
-	$l_site = $GLOBALS['meta']['langue_site'];
22
-	$langue_site = traduire_nom_langue($l_site);
20
+    include_spip('inc/lang');
21
+    $l_site = $GLOBALS['meta']['langue_site'];
22
+    $langue_site = traduire_nom_langue($l_site);
23 23
 
24
-	$langues = explode(',', $GLOBALS['meta']['langues_proposees']);
25
-	if (!in_array($l_site, $langues)) {
26
-		$langues[] = $l_site;
27
-	}
28
-	sort($langues);
24
+    $langues = explode(',', $GLOBALS['meta']['langues_proposees']);
25
+    if (!in_array($l_site, $langues)) {
26
+        $langues[] = $l_site;
27
+    }
28
+    sort($langues);
29 29
 
30
-	$res = '';
31
-	foreach ($langues as $l) {
32
-		$res .= "<option value='$l'"
33
-			. ($l == $l_site ? " selected='selected'" : '')
34
-			. '>' . traduire_nom_langue($l) . "</option>\n";
35
-	}
30
+    $res = '';
31
+    foreach ($langues as $l) {
32
+        $res .= "<option value='$l'"
33
+            . ($l == $l_site ? " selected='selected'" : '')
34
+            . '>' . traduire_nom_langue($l) . "</option>\n";
35
+    }
36 36
 
37
-	$valeurs = array(
38
-		'_langues' => $res,
39
-		'_langue_site' => $langue_site,
40
-		'changer_langue_site' => '',
41
-	);
37
+    $valeurs = array(
38
+        '_langues' => $res,
39
+        '_langue_site' => $langue_site,
40
+        'changer_langue_site' => '',
41
+    );
42 42
 
43
-	return $valeurs;
43
+    return $valeurs;
44 44
 }
45 45
 
46 46
 
47 47
 function formulaires_configurer_langue_traiter_dist() {
48
-	$res = array('editable' => true);
48
+    $res = array('editable' => true);
49 49
 
50
-	if ($lang = _request('changer_langue_site')) {
51
-		include_spip('inc/lang');
52
-		// verif que la langue demandee est licite
53
-		if (changer_langue($lang)) {
54
-			ecrire_meta('langue_site', $lang);
55
-			// le test a defait ca:
56
-			utiliser_langue_visiteur();
57
-			$res['message_ok'] = _T('config_info_enregistree');
58
-			include_spip('inc/rubriques');
59
-			calculer_langues_rubriques();
60
-		}
61
-		// le test a defait ca:
62
-		utiliser_langue_visiteur();
63
-	}
64
-	if (!$res['message_ok']) {
65
-		$res['message_erreur'] = _L('erreur');
66
-	}
50
+    if ($lang = _request('changer_langue_site')) {
51
+        include_spip('inc/lang');
52
+        // verif que la langue demandee est licite
53
+        if (changer_langue($lang)) {
54
+            ecrire_meta('langue_site', $lang);
55
+            // le test a defait ca:
56
+            utiliser_langue_visiteur();
57
+            $res['message_ok'] = _T('config_info_enregistree');
58
+            include_spip('inc/rubriques');
59
+            calculer_langues_rubriques();
60
+        }
61
+        // le test a defait ca:
62
+        utiliser_langue_visiteur();
63
+    }
64
+    if (!$res['message_ok']) {
65
+        $res['message_erreur'] = _L('erreur');
66
+    }
67 67
 
68
-	return $res;
68
+    return $res;
69 69
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	foreach ($langues as $l) {
32 32
 		$res .= "<option value='$l'"
33 33
 			. ($l == $l_site ? " selected='selected'" : '')
34
-			. '>' . traduire_nom_langue($l) . "</option>\n";
34
+			. '>'.traduire_nom_langue($l)."</option>\n";
35 35
 	}
36 36
 
37 37
 	$valeurs = array(
Please login to merge, or discard this patch.
prive/echafaudage/hierarchie/objet_fonctions.php 1 patch
Indentation   +16 added lines, -16 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,20 +24,20 @@  discard block
 block discarded – undo
24 24
  */
25 25
 function deplacement_restreint($objet, $statut) {
26 26
 
27
-	switch ($objet) {
28
-		case 'rubrique':
29
-			return (!$GLOBALS['connect_toutes_rubriques']);
30
-			break;
31
-		case 'article':
32
-		case 'site':
33
-		case 'syndic':
34
-		case 'breve':
35
-			return ($statut == 'publie');
36
-			break;
37
-		default:
38
-			return ($statut ? $statut == 'publie' : false);
39
-			break;
40
-	}
27
+    switch ($objet) {
28
+        case 'rubrique':
29
+            return (!$GLOBALS['connect_toutes_rubriques']);
30
+            break;
31
+        case 'article':
32
+        case 'site':
33
+        case 'syndic':
34
+        case 'breve':
35
+            return ($statut == 'publie');
36
+            break;
37
+        default:
38
+            return ($statut ? $statut == 'publie' : false);
39
+            break;
40
+    }
41 41
 
42
-	return false;
42
+    return false;
43 43
 }
Please login to merge, or discard this patch.
prive/squelettes/contenu/job_queue_fonctions.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 function job_queue_block_and_watch() {
8
-	// bloquer la queue sur ce hit
9
-	// pour avoir coherence entre l'affichage de la liste de jobs
10
-	// et les jobs en base en fin de hit
11
-	define('_DEBUG_BLOCK_QUEUE', true);
12
-	include_spip('inc/genie');
13
-	genie_queue_watch_dist();
8
+    // bloquer la queue sur ce hit
9
+    // pour avoir coherence entre l'affichage de la liste de jobs
10
+    // et les jobs en base en fin de hit
11
+    define('_DEBUG_BLOCK_QUEUE', true);
12
+    include_spip('inc/genie');
13
+    genie_queue_watch_dist();
14 14
 }
Please login to merge, or discard this patch.
prive/squelettes/contenu/recherche_fonctions.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 include_spip('inc/rechercher');
8 8
 include_spip('base/abstract_sql');
9 9
 
10 10
 function inclure_liste_recherche_par_id($table, $id, $statut, $env) {
11
-	if (is_string($env)) {
12
-		$env = unserialize($env);
13
-	}
14
-	$env[id_table_objet($table)] = $id;
15
-	if ($statut) {
16
-		$env['statut'] = $statut;
17
-	}
18
-	unset($env['recherche']);
11
+    if (is_string($env)) {
12
+        $env = unserialize($env);
13
+    }
14
+    $env[id_table_objet($table)] = $id;
15
+    if ($statut) {
16
+        $env['statut'] = $statut;
17
+    }
18
+    unset($env['recherche']);
19 19
 
20
-	return recuperer_fond("prive/objets/liste/$table", $env);
20
+    return recuperer_fond("prive/objets/liste/$table", $env);
21 21
 }
Please login to merge, or discard this patch.
prive/squelettes/contenu/navigation_fonctions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 include_spip('inc/bandeau');
Please login to merge, or discard this patch.
prive/squelettes/inclure/pied_fonctions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 include_spip('inc/presentation_mini');
Please login to merge, or discard this patch.
prive/squelettes/hierarchie/dist_fonctions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 include_spip('inc/pipelines_ecrire');
Please login to merge, or discard this patch.
prive/rss/a_suivre_fonctions.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if (!defined('_ECRIRE_INC_VERSION')) {
4
-	return;
4
+    return;
5 5
 }
6 6
 
7 7
 function trier_rss($texte) {
8
-	if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER)) {
9
-		$placeholder = '<!--REINSERT-->';
10
-		$items = array();
11
-		foreach ($matches as $match) {
12
-			if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) {
13
-				$items[strtotime($r[1])] = trim($match[0]);
14
-				$texte = str_replace($match[0], unique($placeholder), $texte);
15
-			}
16
-		}
17
-		krsort($items);
18
-		$texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
19
-	}
8
+    if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER)) {
9
+        $placeholder = '<!--REINSERT-->';
10
+        $items = array();
11
+        foreach ($matches as $match) {
12
+            if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) {
13
+                $items[strtotime($r[1])] = trim($match[0]);
14
+                $texte = str_replace($match[0], unique($placeholder), $texte);
15
+            }
16
+        }
17
+        krsort($items);
18
+        $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
19
+    }
20 20
 
21
-	return $texte;
21
+    return $texte;
22 22
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 			}
16 16
 		}
17 17
 		krsort($items);
18
-		$texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);
18
+		$texte = str_replace($placeholder, implode("\n\t", $items)."\n", $texte);
19 19
 	}
20 20
 
21 21
 	return $texte;
Please login to merge, or discard this patch.
ecrire/charsets/cp1256.php 1 patch
Indentation   +128 added lines, -128 removed lines patch added patch discarded remove patch
@@ -10,132 +10,132 @@
 block discarded – undo
10 10
  **/
11 11
 
12 12
 $GLOBALS['CHARSET']['cp1256'] = array(
13
-	0x80 => 0x20AC,
14
-	0x81 => 0x067E,
15
-	0x82 => 0x201A,
16
-	0x83 => 0x0192,
17
-	0x84 => 0x201E,
18
-	0x85 => 0x2026,
19
-	0x86 => 0x2020,
20
-	0x87 => 0x2021,
21
-	0x88 => 0x02C6,
22
-	0x89 => 0x2030,
23
-	0x8A => 0x0679,
24
-	0x8B => 0x2039,
25
-	0x8C => 0x0152,
26
-	0x8D => 0x0686,
27
-	0x8E => 0x0698,
28
-	0x8F => 0x0688,
29
-	0x90 => 0x06AF,
30
-	0x91 => 0x2018,
31
-	0x92 => 0x2019,
32
-	0x93 => 0x201C,
33
-	0x94 => 0x201D,
34
-	0x95 => 0x2022,
35
-	0x96 => 0x2013,
36
-	0x97 => 0x2014,
37
-	0x98 => 0x06A9,
38
-	0x99 => 0x2122,
39
-	0x9A => 0x0691,
40
-	0x9B => 0x203A,
41
-	0x9C => 0x0153,
42
-	0x9D => 0x200C,
43
-	0x9E => 0x200D,
44
-	0x9F => 0x06BA,
45
-	0xA0 => 0x00A0,
46
-	0xA1 => 0x060C,
47
-	0xA2 => 0x00A2,
48
-	0xA3 => 0x00A3,
49
-	0xA4 => 0x00A4,
50
-	0xA5 => 0x00A5,
51
-	0xA6 => 0x00A6,
52
-	0xA7 => 0x00A7,
53
-	0xA8 => 0x00A8,
54
-	0xA9 => 0x00A9,
55
-	0xAA => 0x06BE,
56
-	0xAB => 0x00AB,
57
-	0xAC => 0x00AC,
58
-	0xAD => 0x00AD,
59
-	0xAE => 0x00AE,
60
-	0xAF => 0x00AF,
61
-	0xB0 => 0x00B0,
62
-	0xB1 => 0x00B1,
63
-	0xB2 => 0x00B2,
64
-	0xB3 => 0x00B3,
65
-	0xB4 => 0x00B4,
66
-	0xB5 => 0x00B5,
67
-	0xB6 => 0x00B6,
68
-	0xB7 => 0x00B7,
69
-	0xB8 => 0x00B8,
70
-	0xB9 => 0x00B9,
71
-	0xBA => 0x061B,
72
-	0xBB => 0x00BB,
73
-	0xBC => 0x00BC,
74
-	0xBD => 0x00BD,
75
-	0xBE => 0x00BE,
76
-	0xBF => 0x061F,
77
-	0xC0 => 0x06C1,
78
-	0xC1 => 0x0621,
79
-	0xC2 => 0x0622,
80
-	0xC3 => 0x0623,
81
-	0xC4 => 0x0624,
82
-	0xC5 => 0x0625,
83
-	0xC6 => 0x0626,
84
-	0xC7 => 0x0627,
85
-	0xC8 => 0x0628,
86
-	0xC9 => 0x0629,
87
-	0xCA => 0x062A,
88
-	0xCB => 0x062B,
89
-	0xCC => 0x062C,
90
-	0xCD => 0x062D,
91
-	0xCE => 0x062E,
92
-	0xCF => 0x062F,
93
-	0xD0 => 0x0630,
94
-	0xD1 => 0x0631,
95
-	0xD2 => 0x0632,
96
-	0xD3 => 0x0633,
97
-	0xD4 => 0x0634,
98
-	0xD5 => 0x0635,
99
-	0xD6 => 0x0636,
100
-	0xD7 => 0x00D7,
101
-	0xD8 => 0x0637,
102
-	0xD9 => 0x0638,
103
-	0xDA => 0x0639,
104
-	0xDB => 0x063A,
105
-	0xDC => 0x0640,
106
-	0xDD => 0x0641,
107
-	0xDE => 0x0642,
108
-	0xDF => 0x0643,
109
-	0xE0 => 0x00E0,
110
-	0xE1 => 0x0644,
111
-	0xE2 => 0x00E2,
112
-	0xE3 => 0x0645,
113
-	0xE4 => 0x0646,
114
-	0xE5 => 0x0647,
115
-	0xE6 => 0x0648,
116
-	0xE7 => 0x00E7,
117
-	0xE8 => 0x00E8,
118
-	0xE9 => 0x00E9,
119
-	0xEA => 0x00EA,
120
-	0xEB => 0x00EB,
121
-	0xEC => 0x0649,
122
-	0xED => 0x064A,
123
-	0xEE => 0x00EE,
124
-	0xEF => 0x00EF,
125
-	0xF0 => 0x064B,
126
-	0xF1 => 0x064C,
127
-	0xF2 => 0x064D,
128
-	0xF3 => 0x064E,
129
-	0xF4 => 0x00F4,
130
-	0xF5 => 0x064F,
131
-	0xF6 => 0x0650,
132
-	0xF7 => 0x00F7,
133
-	0xF8 => 0x0651,
134
-	0xF9 => 0x00F9,
135
-	0xFA => 0x0652,
136
-	0xFB => 0x00FB,
137
-	0xFC => 0x00FC,
138
-	0xFD => 0x200E,
139
-	0xFE => 0x200F,
140
-	0xFF => 0x06D2
13
+    0x80 => 0x20AC,
14
+    0x81 => 0x067E,
15
+    0x82 => 0x201A,
16
+    0x83 => 0x0192,
17
+    0x84 => 0x201E,
18
+    0x85 => 0x2026,
19
+    0x86 => 0x2020,
20
+    0x87 => 0x2021,
21
+    0x88 => 0x02C6,
22
+    0x89 => 0x2030,
23
+    0x8A => 0x0679,
24
+    0x8B => 0x2039,
25
+    0x8C => 0x0152,
26
+    0x8D => 0x0686,
27
+    0x8E => 0x0698,
28
+    0x8F => 0x0688,
29
+    0x90 => 0x06AF,
30
+    0x91 => 0x2018,
31
+    0x92 => 0x2019,
32
+    0x93 => 0x201C,
33
+    0x94 => 0x201D,
34
+    0x95 => 0x2022,
35
+    0x96 => 0x2013,
36
+    0x97 => 0x2014,
37
+    0x98 => 0x06A9,
38
+    0x99 => 0x2122,
39
+    0x9A => 0x0691,
40
+    0x9B => 0x203A,
41
+    0x9C => 0x0153,
42
+    0x9D => 0x200C,
43
+    0x9E => 0x200D,
44
+    0x9F => 0x06BA,
45
+    0xA0 => 0x00A0,
46
+    0xA1 => 0x060C,
47
+    0xA2 => 0x00A2,
48
+    0xA3 => 0x00A3,
49
+    0xA4 => 0x00A4,
50
+    0xA5 => 0x00A5,
51
+    0xA6 => 0x00A6,
52
+    0xA7 => 0x00A7,
53
+    0xA8 => 0x00A8,
54
+    0xA9 => 0x00A9,
55
+    0xAA => 0x06BE,
56
+    0xAB => 0x00AB,
57
+    0xAC => 0x00AC,
58
+    0xAD => 0x00AD,
59
+    0xAE => 0x00AE,
60
+    0xAF => 0x00AF,
61
+    0xB0 => 0x00B0,
62
+    0xB1 => 0x00B1,
63
+    0xB2 => 0x00B2,
64
+    0xB3 => 0x00B3,
65
+    0xB4 => 0x00B4,
66
+    0xB5 => 0x00B5,
67
+    0xB6 => 0x00B6,
68
+    0xB7 => 0x00B7,
69
+    0xB8 => 0x00B8,
70
+    0xB9 => 0x00B9,
71
+    0xBA => 0x061B,
72
+    0xBB => 0x00BB,
73
+    0xBC => 0x00BC,
74
+    0xBD => 0x00BD,
75
+    0xBE => 0x00BE,
76
+    0xBF => 0x061F,
77
+    0xC0 => 0x06C1,
78
+    0xC1 => 0x0621,
79
+    0xC2 => 0x0622,
80
+    0xC3 => 0x0623,
81
+    0xC4 => 0x0624,
82
+    0xC5 => 0x0625,
83
+    0xC6 => 0x0626,
84
+    0xC7 => 0x0627,
85
+    0xC8 => 0x0628,
86
+    0xC9 => 0x0629,
87
+    0xCA => 0x062A,
88
+    0xCB => 0x062B,
89
+    0xCC => 0x062C,
90
+    0xCD => 0x062D,
91
+    0xCE => 0x062E,
92
+    0xCF => 0x062F,
93
+    0xD0 => 0x0630,
94
+    0xD1 => 0x0631,
95
+    0xD2 => 0x0632,
96
+    0xD3 => 0x0633,
97
+    0xD4 => 0x0634,
98
+    0xD5 => 0x0635,
99
+    0xD6 => 0x0636,
100
+    0xD7 => 0x00D7,
101
+    0xD8 => 0x0637,
102
+    0xD9 => 0x0638,
103
+    0xDA => 0x0639,
104
+    0xDB => 0x063A,
105
+    0xDC => 0x0640,
106
+    0xDD => 0x0641,
107
+    0xDE => 0x0642,
108
+    0xDF => 0x0643,
109
+    0xE0 => 0x00E0,
110
+    0xE1 => 0x0644,
111
+    0xE2 => 0x00E2,
112
+    0xE3 => 0x0645,
113
+    0xE4 => 0x0646,
114
+    0xE5 => 0x0647,
115
+    0xE6 => 0x0648,
116
+    0xE7 => 0x00E7,
117
+    0xE8 => 0x00E8,
118
+    0xE9 => 0x00E9,
119
+    0xEA => 0x00EA,
120
+    0xEB => 0x00EB,
121
+    0xEC => 0x0649,
122
+    0xED => 0x064A,
123
+    0xEE => 0x00EE,
124
+    0xEF => 0x00EF,
125
+    0xF0 => 0x064B,
126
+    0xF1 => 0x064C,
127
+    0xF2 => 0x064D,
128
+    0xF3 => 0x064E,
129
+    0xF4 => 0x00F4,
130
+    0xF5 => 0x064F,
131
+    0xF6 => 0x0650,
132
+    0xF7 => 0x00F7,
133
+    0xF8 => 0x0651,
134
+    0xF9 => 0x00F9,
135
+    0xFA => 0x0652,
136
+    0xFB => 0x00FB,
137
+    0xFC => 0x00FC,
138
+    0xFD => 0x200E,
139
+    0xFE => 0x200F,
140
+    0xFF => 0x06D2
141 141
 );
Please login to merge, or discard this patch.