Completed
Pull Request — master (#36)
by
unknown
06:08
created
prive/formulaires/configurer_langage.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -11,49 +11,49 @@
 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_langage_charger_dist() {
18 18
 
19
-	include_spip('inc/lang');
20
-	$GLOBALS['meta']['langues_proposees'] = '';
21
-	init_langues();
22
-	$langues = explode(',', $GLOBALS['meta']['langues_proposees']);
19
+    include_spip('inc/lang');
20
+    $GLOBALS['meta']['langues_proposees'] = '';
21
+    init_langues();
22
+    $langues = explode(',', $GLOBALS['meta']['langues_proposees']);
23 23
 
24 24
 
25
-	$valeurs = array(
26
-		'var_lang_ecrire' => $GLOBALS['spip_lang'],
27
-		'_langues' => $langues
28
-	);
25
+    $valeurs = array(
26
+        'var_lang_ecrire' => $GLOBALS['spip_lang'],
27
+        '_langues' => $langues
28
+    );
29 29
 
30
-	return $valeurs;
30
+    return $valeurs;
31 31
 }
32 32
 
33 33
 
34 34
 function formulaires_configurer_langage_traiter_dist() {
35
-	include_spip('action/converser');
36
-	action_converser_changer_langue(true);
35
+    include_spip('action/converser');
36
+    action_converser_changer_langue(true);
37 37
 
38
-	refuser_traiter_formulaire_ajax();
38
+    refuser_traiter_formulaire_ajax();
39 39
 
40
-	// on ne peut pas changer la langue pour tout le hit ici,
41
-	// car CVT repasse derriere et retablit la langue avant l'appel a traiter()
42
-	// il faut rediriger !
43
-	return array('message_ok' => _T('config_info_enregistree'), 'editable' => true, 'redirect' => self());
40
+    // on ne peut pas changer la langue pour tout le hit ici,
41
+    // car CVT repasse derriere et retablit la langue avant l'appel a traiter()
42
+    // il faut rediriger !
43
+    return array('message_ok' => _T('config_info_enregistree'), 'editable' => true, 'redirect' => self());
44 44
 }
45 45
 
46 46
 function afficher_langues_choix($langues, $name, $id, $selected) {
47
-	include_spip('inc/lang');
48
-	$ret = '';
49
-	sort($langues);
50
-	foreach ($langues as $l) {
51
-		$checked = ($l == $selected) ? ' checked=\'checked\'' : '';
52
-		$ret .= "<div class='choix'>"
53
-			. "<input type='radio' name='$name' id='{$id}_$l' value='$l'$checked />"
54
-			. "<label for='{$id}_$l'>" . traduire_nom_langue($l) . '</label>'
55
-			. '</div>';
56
-	}
57
-
58
-	return $ret;
47
+    include_spip('inc/lang');
48
+    $ret = '';
49
+    sort($langues);
50
+    foreach ($langues as $l) {
51
+        $checked = ($l == $selected) ? ' checked=\'checked\'' : '';
52
+        $ret .= "<div class='choix'>"
53
+            . "<input type='radio' name='$name' id='{$id}_$l' value='$l'$checked />"
54
+            . "<label for='{$id}_$l'>" . traduire_nom_langue($l) . '</label>'
55
+            . '</div>';
56
+    }
57
+
58
+    return $ret;
59 59
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		$checked = ($l == $selected) ? ' checked=\'checked\'' : '';
52 52
 		$ret .= "<div class='choix'>"
53 53
 			. "<input type='radio' name='$name' id='{$id}_$l' value='$l'$checked />"
54
-			. "<label for='{$id}_$l'>" . traduire_nom_langue($l) . '</label>'
54
+			. "<label for='{$id}_$l'>".traduire_nom_langue($l).'</label>'
55 55
 			. '</div>';
56 56
 	}
57 57
 
Please login to merge, or discard this patch.
prive/formulaires/configurer_previsualiseur.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
 \***************************************************************************/
12 12
 
13 13
 if (!defined('_ECRIRE_INC_VERSION')) {
14
-	return;
14
+    return;
15 15
 }
16 16
 include_spip('inc/presentation');
17 17
 
18 18
 function formulaires_configurer_previsualiseur_charger_dist() {
19
-	$valeurs = array();
20
-	$valeurs['preview'] = explode(',', $GLOBALS['meta']['preview']);
19
+    $valeurs = array();
20
+    $valeurs['preview'] = explode(',', $GLOBALS['meta']['preview']);
21 21
 
22
-	return $valeurs;
22
+    return $valeurs;
23 23
 }
24 24
 
25 25
 
26 26
 function formulaires_configurer_previsualiseur_traiter_dist() {
27
-	$res = array('editable' => true);
27
+    $res = array('editable' => true);
28 28
 
29
-	if ($i = _request('preview') and is_array($i)) {
30
-		$i = ',' . implode(',', $i) . ',';
31
-	}
29
+    if ($i = _request('preview') and is_array($i)) {
30
+        $i = ',' . implode(',', $i) . ',';
31
+    }
32 32
 
33
-	ecrire_meta('preview', $i);
33
+    ecrire_meta('preview', $i);
34 34
 
35
-	$res['message_ok'] = _T('config_info_enregistree');
35
+    $res['message_ok'] = _T('config_info_enregistree');
36 36
 
37
-	return $res;
37
+    return $res;
38 38
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	$res = array('editable' => true);
28 28
 
29 29
 	if ($i = _request('preview') and is_array($i)) {
30
-		$i = ',' . implode(',', $i) . ',';
30
+		$i = ','.implode(',', $i).',';
31 31
 	}
32 32
 
33 33
 	ecrire_meta('preview', $i);
Please login to merge, or discard this patch.
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/informer_auteur_fonctions.php 1 patch
Indentation   +10 added lines, -10 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
 
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
  *     JSON des différentes informations
35 35
  */
36 36
 function informer_auteur($bof) {
37
-	include_spip('inc/json');
38
-	include_spip('formulaires/login');
39
-	include_spip('inc/auth');
40
-	$login = strval(_request('var_login'));
41
-	$row = auth_informer_login($login);
42
-	if ($row and is_array($row) and isset($row['id_auteur'])) {
43
-		unset($row['id_auteur']);
44
-	}
37
+    include_spip('inc/json');
38
+    include_spip('formulaires/login');
39
+    include_spip('inc/auth');
40
+    $login = strval(_request('var_login'));
41
+    $row = auth_informer_login($login);
42
+    if ($row and is_array($row) and isset($row['id_auteur'])) {
43
+        unset($row['id_auteur']);
44
+    }
45 45
 	
46
-	return json_export($row);
46
+    return json_export($row);
47 47
 }
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/images/index.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 	<h1>Index des icones de <a href='http://www.spip.net'>Spip</a></h1>
10 10
 	<table>
11 11
 		<?php
12
-		$myDir = opendir('.');
13
-		while ($file = readdir($myDir)) {
14
-			if (preg_match(',\.(png|gif)$,i', $file)) {
15
-				echo "		<tr><td>$file</td><td><img src='$file' alt='$file' /></td></tr>\n";
16
-			}
17
-		}
18
-		?>
12
+        $myDir = opendir('.');
13
+        while ($file = readdir($myDir)) {
14
+            if (preg_match(',\.(png|gif)$,i', $file)) {
15
+                echo "		<tr><td>$file</td><td><img src='$file' alt='$file' /></td></tr>\n";
16
+            }
17
+        }
18
+        ?>
19 19
 	</table>
20 20
 </center>
21 21
 </body>
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.