Completed
Push — master ( 59acee...7a72c7 )
by cam
04:42
created
ecrire/inc/actions.php 1 patch
Indentation   +36 added lines, -36 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
 /**
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
  *     URL, code HTML du formulaire ou tableau (action, arg, hash)
44 44
  */
45 45
 function generer_action_auteur($action, $arg = '', $redirect = '', $mode = false, $att = '', $public = false) {
46
-	$securiser_action = charger_fonction('securiser_action', 'inc');
46
+    $securiser_action = charger_fonction('securiser_action', 'inc');
47 47
 
48
-	return $securiser_action($action, $arg, $redirect, $mode, $att, $public);
48
+    return $securiser_action($action, $arg, $redirect, $mode, $att, $public);
49 49
 }
50 50
 
51 51
 /**
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
  *     Code HTML du formulaire
79 79
  */
80 80
 function redirige_action_auteur($action, $arg, $ret, $gra = '', $mode = false, $atts = '', $public = false) {
81
-	$r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true);
81
+    $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true);
82 82
 
83
-	return generer_action_auteur($action, $arg, $r, $mode, $atts, $public);
83
+    return generer_action_auteur($action, $arg, $r, $mode, $atts, $public);
84 84
 }
85 85
 
86 86
 /**
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
  *     URL, code HTML du formulaire ou tableau (action, arg, hash)
106 106
  */
107 107
 function redirige_action_post($action, $arg, $ret, $gra, $corps, $att = '') {
108
-	$r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true);
108
+    $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true);
109 109
 
110
-	return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'");
110
+    return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'");
111 111
 }
112 112
 
113 113
 
@@ -122,33 +122,33 @@  discard block
 block discarded – undo
122 122
  *   passer "text/html" comme $content_type
123 123
  */
124 124
 function ajax_retour($corps, $content_type = null) {
125
-	$xml = false;
126
-	if (is_null($content_type) or $content_type === true) {
127
-		$xml = true;
128
-		$content_type = 'text/html';
129
-	} elseif (!$content_type or !is_string($content_type) or strpos($content_type, '/') === false) {
130
-		$content_type = 'text/html';
131
-	}
132
-
133
-	$e = '';
134
-	if (isset($_COOKIE['spip_admin'])
135
-		and ((_request('var_mode') == 'debug') or !empty($GLOBALS['tableau_des_temps']))
136
-	) {
137
-		$e = erreur_squelette();
138
-	}
139
-
140
-	$c = $GLOBALS['meta']['charset'];
141
-	header('Content-Type: ' . $content_type . '; charset=' . $c);
142
-	$debut = (($xml and strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : '');
143
-	$fin = '';
144
-
145
-	echo $debut.$corps.$fin.$e;
146
-
147
-	// flusher tous les tampons
148
-	$level = @ob_get_level();
149
-	while ($level--) {
150
-		@ob_end_flush();
151
-	}
152
-
153
-	flush();
125
+    $xml = false;
126
+    if (is_null($content_type) or $content_type === true) {
127
+        $xml = true;
128
+        $content_type = 'text/html';
129
+    } elseif (!$content_type or !is_string($content_type) or strpos($content_type, '/') === false) {
130
+        $content_type = 'text/html';
131
+    }
132
+
133
+    $e = '';
134
+    if (isset($_COOKIE['spip_admin'])
135
+        and ((_request('var_mode') == 'debug') or !empty($GLOBALS['tableau_des_temps']))
136
+    ) {
137
+        $e = erreur_squelette();
138
+    }
139
+
140
+    $c = $GLOBALS['meta']['charset'];
141
+    header('Content-Type: ' . $content_type . '; charset=' . $c);
142
+    $debut = (($xml and strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : '');
143
+    $fin = '';
144
+
145
+    echo $debut.$corps.$fin.$e;
146
+
147
+    // flusher tous les tampons
148
+    $level = @ob_get_level();
149
+    while ($level--) {
150
+        @ob_end_flush();
151
+    }
152
+
153
+    flush();
154 154
 }
Please login to merge, or discard this patch.