Completed
Push — master ( a9554c...8b4d2b )
by cam
06:03
created
ecrire/inc_version.php 1 patch
Indentation   +203 added lines, -203 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
 /**
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 define('_PHP_MIN', '7.3.0');
37 37
 
38 38
 if (!defined('_DIR_RESTREINT_ABS')) {
39
-	/** le nom du repertoire ecrire/ */
40
-	define('_DIR_RESTREINT_ABS', 'ecrire/');
39
+    /** le nom du repertoire ecrire/ */
40
+    define('_DIR_RESTREINT_ABS', 'ecrire/');
41 41
 }
42 42
 
43 43
 /** Chemin relatif pour aller dans ecrire
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 
58 58
 // Icones
59 59
 if (!defined('_NOM_IMG_PACK')) {
60
-	/** Nom du dossier images */
61
-	define('_NOM_IMG_PACK', 'images/');
60
+    /** Nom du dossier images */
61
+    define('_NOM_IMG_PACK', 'images/');
62 62
 }
63 63
 /** le chemin http (relatif) vers les images standard */
64 64
 define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
68 68
 
69 69
 if (!defined('_JAVASCRIPT')) {
70
-	/** Nom du repertoire des  bibliotheques JavaScript */
71
-	define('_JAVASCRIPT', 'javascript/');
70
+    /** Nom du repertoire des  bibliotheques JavaScript */
71
+    define('_JAVASCRIPT', 'javascript/');
72 72
 } // utilisable avec #CHEMIN et find_in_path
73 73
 /** le nom du repertoire des  bibliotheques JavaScript du prive */
74 74
 define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
@@ -78,46 +78,46 @@  discard block
 block discarded – undo
78 78
 # mais on peut les mettre ailleurs et changer completement les noms
79 79
 
80 80
 if (!defined('_NOM_TEMPORAIRES_INACCESSIBLES')) {
81
-	/** Nom du repertoire des fichiers Temporaires Inaccessibles par http:// */
82
-	define('_NOM_TEMPORAIRES_INACCESSIBLES', "tmp/");
81
+    /** Nom du repertoire des fichiers Temporaires Inaccessibles par http:// */
82
+    define('_NOM_TEMPORAIRES_INACCESSIBLES', "tmp/");
83 83
 }
84 84
 if (!defined('_NOM_TEMPORAIRES_ACCESSIBLES')) {
85
-	/** Nom du repertoire des fichiers Temporaires Accessibles par http:// */
86
-	define('_NOM_TEMPORAIRES_ACCESSIBLES', "local/");
85
+    /** Nom du repertoire des fichiers Temporaires Accessibles par http:// */
86
+    define('_NOM_TEMPORAIRES_ACCESSIBLES', "local/");
87 87
 }
88 88
 if (!defined('_NOM_PERMANENTS_INACCESSIBLES')) {
89
-	/** Nom du repertoire des fichiers Permanents Inaccessibles par http:// */
90
-	define('_NOM_PERMANENTS_INACCESSIBLES', "config/");
89
+    /** Nom du repertoire des fichiers Permanents Inaccessibles par http:// */
90
+    define('_NOM_PERMANENTS_INACCESSIBLES', "config/");
91 91
 }
92 92
 if (!defined('_NOM_PERMANENTS_ACCESSIBLES')) {
93
-	/** Nom du repertoire des fichiers Permanents Accessibles par http:// */
94
-	define('_NOM_PERMANENTS_ACCESSIBLES', "IMG/");
93
+    /** Nom du repertoire des fichiers Permanents Accessibles par http:// */
94
+    define('_NOM_PERMANENTS_ACCESSIBLES', "IMG/");
95 95
 }
96 96
 
97 97
 
98 98
 /** Le nom du fichier de personnalisation */
99 99
 if (!defined('_NOM_CONFIG')) {
100
-	define('_NOM_CONFIG', 'mes_options');
100
+    define('_NOM_CONFIG', 'mes_options');
101 101
 }
102 102
 
103 103
 // Son emplacement absolu si on le trouve
104 104
 if (@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
105
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
105
+    or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
106 106
 ) {
107
-	/** Emplacement absolu du fichier d'option */
108
-	define('_FILE_OPTIONS', $f);
107
+    /** Emplacement absolu du fichier d'option */
108
+    define('_FILE_OPTIONS', $f);
109 109
 } else {
110
-	define('_FILE_OPTIONS', '');
110
+    define('_FILE_OPTIONS', '');
111 111
 }
112 112
 
113 113
 if (!defined('MODULES_IDIOMES')) {
114
-	/**
115
-	 * Modules par défaut pour la traduction.
116
-	 *
117
-	 * Constante utilisée par le compilateur et le décompilateur
118
-	 * sa valeur etant traitée par inc_traduire_dist
119
-	 */
120
-	define('MODULES_IDIOMES', 'public|spip|ecrire');
114
+    /**
115
+     * Modules par défaut pour la traduction.
116
+     *
117
+     * Constante utilisée par le compilateur et le décompilateur
118
+     * sa valeur etant traitée par inc_traduire_dist
119
+     */
120
+    define('MODULES_IDIOMES', 'public|spip|ecrire');
121 121
 }
122 122
 
123 123
 // *** Fin des define *** //
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
 
126 126
 // Inclure l'ecran de securite
127 127
 if (!defined('_ECRAN_SECURITE')
128
-	and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
128
+    and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
129 129
 ) {
130
-	include $f;
130
+    include $f;
131 131
 }
132 132
 
133 133
 
@@ -135,26 +135,26 @@  discard block
 block discarded – undo
135 135
  * Détecteur de robot d'indexation
136 136
  */
137 137
 if (!defined('_IS_BOT')) {
138
-	define('_IS_BOT',
139
-		isset($_SERVER['HTTP_USER_AGENT'])
140
-		and preg_match(
141
-			// mots generiques
142
-			',bot|slurp|crawler|spider|webvac|yandex|'
143
-			// MSIE 6.0 est un botnet 99,9% du temps, on traite donc ce USER_AGENT comme un bot
144
-			. 'MSIE 6\.0|'
145
-			// UA plus cibles
146
-			. '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti'
147
-			. ',i', (string)$_SERVER['HTTP_USER_AGENT'])
148
-	);
138
+    define('_IS_BOT',
139
+        isset($_SERVER['HTTP_USER_AGENT'])
140
+        and preg_match(
141
+            // mots generiques
142
+            ',bot|slurp|crawler|spider|webvac|yandex|'
143
+            // MSIE 6.0 est un botnet 99,9% du temps, on traite donc ce USER_AGENT comme un bot
144
+            . 'MSIE 6\.0|'
145
+            // UA plus cibles
146
+            . '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti'
147
+            . ',i', (string)$_SERVER['HTTP_USER_AGENT'])
148
+    );
149 149
 }
150 150
 
151 151
 if (!defined('_IS_CLI')) {
152
-	define('_IS_CLI',
153
-	  !isset($_SERVER['HTTP_HOST'])
154
-	  and !strlen($_SERVER['DOCUMENT_ROOT'])
155
-	  and !empty($_SERVER['argv'])
156
-	  and empty($_SERVER['REQUEST_METHOD'])
157
-	);
152
+    define('_IS_CLI',
153
+        !isset($_SERVER['HTTP_HOST'])
154
+      and !strlen($_SERVER['DOCUMENT_ROOT'])
155
+      and !empty($_SERVER['argv'])
156
+      and empty($_SERVER['REQUEST_METHOD'])
157
+    );
158 158
 }
159 159
 
160 160
 // *** Parametrage par defaut de SPIP ***
@@ -166,61 +166,61 @@  discard block
 block discarded – undo
166 166
 // Ne pas les rendre indefinies.
167 167
 
168 168
 global
169
-	$nombre_de_logs,
170
-	$taille_des_logs,
171
-	$table_prefix,
172
-	$cookie_prefix,
173
-	$dossier_squelettes,
174
-	$filtrer_javascript,
175
-	$type_urls,
176
-	$debut_date_publication,
177
-	$ip,
178
-	$mysql_rappel_connexion,
179
-	$mysql_rappel_nom_base,
180
-	$test_i18n,
181
-	$ignore_auth_http,
182
-	$ignore_remote_user,
183
-	$derniere_modif_invalide,
184
-	$home_server,
185
-	$help_server,
186
-	$url_glossaire_externe,
187
-	$tex_server,
188
-	$traiter_math,
189
-	$xhtml,
190
-	$xml_indent,
191
-	$source_vignettes,
192
-	$formats_logos,
193
-	$controler_dates_rss,
194
-	$spip_pipeline,
195
-	$spip_matrice,
196
-	$plugins,
197
-	$surcharges,
198
-	$exceptions_des_tables,
199
-	$tables_principales,
200
-	$table_des_tables,
201
-	$tables_auxiliaires,
202
-	$table_primary,
203
-	$table_date,
204
-	$table_titre,
205
-	$tables_jointures,
206
-	$liste_des_statuts,
207
-	$liste_des_etats,
208
-	$liste_des_authentifications,
209
-	$spip_version_branche,
210
-	$spip_version_code,
211
-	$spip_version_base,
212
-	$spip_sql_version,
213
-	$spip_version_affichee,
214
-	$visiteur_session,
215
-	$auteur_session,
216
-	$connect_statut,
217
-	$connect_toutes_rubriques,
218
-	$hash_recherche,
219
-	$hash_recherche_strict,
220
-	$ldap_present,
221
-	$meta,
222
-	$connect_id_rubrique,
223
-	$puce;
169
+    $nombre_de_logs,
170
+    $taille_des_logs,
171
+    $table_prefix,
172
+    $cookie_prefix,
173
+    $dossier_squelettes,
174
+    $filtrer_javascript,
175
+    $type_urls,
176
+    $debut_date_publication,
177
+    $ip,
178
+    $mysql_rappel_connexion,
179
+    $mysql_rappel_nom_base,
180
+    $test_i18n,
181
+    $ignore_auth_http,
182
+    $ignore_remote_user,
183
+    $derniere_modif_invalide,
184
+    $home_server,
185
+    $help_server,
186
+    $url_glossaire_externe,
187
+    $tex_server,
188
+    $traiter_math,
189
+    $xhtml,
190
+    $xml_indent,
191
+    $source_vignettes,
192
+    $formats_logos,
193
+    $controler_dates_rss,
194
+    $spip_pipeline,
195
+    $spip_matrice,
196
+    $plugins,
197
+    $surcharges,
198
+    $exceptions_des_tables,
199
+    $tables_principales,
200
+    $table_des_tables,
201
+    $tables_auxiliaires,
202
+    $table_primary,
203
+    $table_date,
204
+    $table_titre,
205
+    $tables_jointures,
206
+    $liste_des_statuts,
207
+    $liste_des_etats,
208
+    $liste_des_authentifications,
209
+    $spip_version_branche,
210
+    $spip_version_code,
211
+    $spip_version_base,
212
+    $spip_sql_version,
213
+    $spip_version_affichee,
214
+    $visiteur_session,
215
+    $auteur_session,
216
+    $connect_statut,
217
+    $connect_toutes_rubriques,
218
+    $hash_recherche,
219
+    $hash_recherche_strict,
220
+    $ldap_present,
221
+    $meta,
222
+    $connect_id_rubrique,
223
+    $puce;
224 224
 
225 225
 # comment on logge, defaut 4 tmp/spip.log de 100k, 0 ou 0 suppriment le log
226 226
 $nombre_de_logs = 4;
@@ -275,48 +275,48 @@  discard block
 block discarded – undo
275 275
 // Prendre en compte les entetes HTTP_X_FORWARDED_XX
276 276
 //
277 277
 if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
278
-	if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
279
-		$_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST'];
280
-	}
281
-	if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) {
282
-		$_SERVER['HTTP_X_FORWARDED_PORT'] = 443;
283
-	}
278
+    if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
279
+        $_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST'];
280
+    }
281
+    if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) {
282
+        $_SERVER['HTTP_X_FORWARDED_PORT'] = 443;
283
+    }
284 284
 }
285 285
 if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
286
-	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])){
287
-		$_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
288
-		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
289
-			$_SERVER['HTTPS'] = 'on';
290
-			if (isset($_SERVER['REQUEST_SCHEME'])) {
291
-				$_SERVER['REQUEST_SCHEME'] = 'https';
292
-			}
293
-		}
294
-	}
295
-	$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
296
-	if (strpos($host,',')!==false){
297
-		$h = explode(',',$host);
298
-		$host = trim(reset($h));
299
-	}
300
-	// securite sur le contenu de l'entete
301
-	$host = strtr($host, "<>?\"\{\}\$'` \r\n", '____________');
302
-	$_SERVER['HTTP_HOST'] = $host;
286
+    if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])){
287
+        $_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
288
+        if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
289
+            $_SERVER['HTTPS'] = 'on';
290
+            if (isset($_SERVER['REQUEST_SCHEME'])) {
291
+                $_SERVER['REQUEST_SCHEME'] = 'https';
292
+            }
293
+        }
294
+    }
295
+    $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
296
+    if (strpos($host,',')!==false){
297
+        $h = explode(',',$host);
298
+        $host = trim(reset($h));
299
+    }
300
+    // securite sur le contenu de l'entete
301
+    $host = strtr($host, "<>?\"\{\}\$'` \r\n", '____________');
302
+    $_SERVER['HTTP_HOST'] = $host;
303 303
 }
304 304
 //
305 305
 // On note le numero IP du client dans la variable $ip
306 306
 //
307 307
 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
308
-	$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
309
-	if (strpos($ip,',')!==false){
310
-		$ip = explode(',',$ip);
311
-		$ip = reset($ip);
312
-	}
313
-	// ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost
314
-	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR']==='127.0.0.1'){
315
-		$_SERVER['REMOTE_ADDR'] = $ip;
316
-	}
308
+    $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
309
+    if (strpos($ip,',')!==false){
310
+        $ip = explode(',',$ip);
311
+        $ip = reset($ip);
312
+    }
313
+    // ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost
314
+    if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR']==='127.0.0.1'){
315
+        $_SERVER['REMOTE_ADDR'] = $ip;
316
+    }
317 317
 }
318 318
 if (isset($_SERVER['REMOTE_ADDR'])) {
319
-	$ip = $_SERVER['REMOTE_ADDR'];
319
+    $ip = $_SERVER['REMOTE_ADDR'];
320 320
 }
321 321
 
322 322
 // Pour renforcer la privacy, decommentez la ligne ci-dessous (ou recopiez-la
@@ -401,24 +401,24 @@  discard block
 block discarded – undo
401 401
 
402 402
 // Liste des statuts.
403 403
 $liste_des_statuts = array(
404
-	"info_administrateurs" => '0minirezo',
405
-	"info_redacteurs" => '1comite',
406
-	"info_visiteurs" => '6forum',
407
-	"texte_statut_poubelle" => '5poubelle'
404
+    "info_administrateurs" => '0minirezo',
405
+    "info_redacteurs" => '1comite',
406
+    "info_visiteurs" => '6forum',
407
+    "texte_statut_poubelle" => '5poubelle'
408 408
 );
409 409
 
410 410
 $liste_des_etats = array(
411
-	'texte_statut_en_cours_redaction' => 'prepa',
412
-	'texte_statut_propose_evaluation' => 'prop',
413
-	'texte_statut_publie' => 'publie',
414
-	'texte_statut_poubelle' => 'poubelle',
415
-	'texte_statut_refuse' => 'refuse'
411
+    'texte_statut_en_cours_redaction' => 'prepa',
412
+    'texte_statut_propose_evaluation' => 'prop',
413
+    'texte_statut_publie' => 'publie',
414
+    'texte_statut_poubelle' => 'poubelle',
415
+    'texte_statut_refuse' => 'refuse'
416 416
 );
417 417
 
418 418
 // liste des methodes d'authentifications
419 419
 $liste_des_authentifications = array(
420
-	'spip' => 'spip',
421
-	'ldap' => 'ldap'
420
+    'spip' => 'spip',
421
+    'ldap' => 'ldap'
422 422
 );
423 423
 
424 424
 // Experimental : pour supprimer systematiquement l'affichage des numeros
@@ -468,12 +468,12 @@  discard block
 block discarded – undo
468 468
 // Definition personnelles eventuelles
469 469
 
470 470
 if (_FILE_OPTIONS) {
471
-	include_once _FILE_OPTIONS;
471
+    include_once _FILE_OPTIONS;
472 472
 }
473 473
 
474 474
 if (!defined('SPIP_ERREUR_REPORT')) {
475
-	/** Masquer les warning */
476
-	define('SPIP_ERREUR_REPORT', E_ALL ^ E_NOTICE ^ E_DEPRECATED);
475
+    /** Masquer les warning */
476
+    define('SPIP_ERREUR_REPORT', E_ALL ^ E_NOTICE ^ E_DEPRECATED);
477 477
 }
478 478
 error_reporting(SPIP_ERREUR_REPORT);
479 479
 
@@ -486,10 +486,10 @@  discard block
 block discarded – undo
486 486
 // ===> on execute en neutralisant les messages d'erreur
487 487
 
488 488
 spip_initialisation_core(
489
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
490
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
491
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
492
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
489
+    (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
490
+    (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
491
+    (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
492
+    (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
493 493
 );
494 494
 
495 495
 
@@ -499,69 +499,69 @@  discard block
 block discarded – undo
499 499
 // donc il faut avoir tout fini ici avant de charger les plugins
500 500
 
501 501
 if (@is_readable(_CACHE_PLUGINS_OPT) and @is_readable(_CACHE_PLUGINS_PATH)) {
502
-	// chargement optimise precompile
503
-	include_once(_CACHE_PLUGINS_OPT);
502
+    // chargement optimise precompile
503
+    include_once(_CACHE_PLUGINS_OPT);
504 504
 } else {
505
-	spip_initialisation_suite();
506
-	include_spip('inc/plugin');
507
-	// generer les fichiers php precompiles
508
-	// de chargement des plugins et des pipelines
509
-	actualise_plugins_actifs();
505
+    spip_initialisation_suite();
506
+    include_spip('inc/plugin');
507
+    // generer les fichiers php precompiles
508
+    // de chargement des plugins et des pipelines
509
+    actualise_plugins_actifs();
510 510
 }
511 511
 
512 512
 // Initialisations non critiques surchargeables par les plugins
513 513
 spip_initialisation_suite();
514 514
 
515 515
 if (!defined('_LOG_FILTRE_GRAVITE')) {
516
-	/** niveau maxi d'enregistrement des logs */
517
-	define('_LOG_FILTRE_GRAVITE', _LOG_INFO_IMPORTANTE);
516
+    /** niveau maxi d'enregistrement des logs */
517
+    define('_LOG_FILTRE_GRAVITE', _LOG_INFO_IMPORTANTE);
518 518
 }
519 519
 
520 520
 if (!defined('_OUTILS_DEVELOPPEURS')) {
521
-	/** Activer des outils pour développeurs ? */
522
-	define('_OUTILS_DEVELOPPEURS', false);
521
+    /** Activer des outils pour développeurs ? */
522
+    define('_OUTILS_DEVELOPPEURS', false);
523 523
 }
524 524
 
525 525
 // charger systematiquement inc/autoriser dans l'espace restreint
526 526
 if (test_espace_prive()) {
527
-	include_spip('inc/autoriser');
527
+    include_spip('inc/autoriser');
528 528
 }
529 529
 //
530 530
 // Installer Spip si pas installe... sauf si justement on est en train
531 531
 //
532 532
 if (!(_FILE_CONNECT
533
-	or autoriser_sans_cookie(_request('exec'))
534
-	or _request('action') == 'cookie'
535
-	or _request('action') == 'converser'
536
-	or _request('action') == 'test_dirs')
533
+    or autoriser_sans_cookie(_request('exec'))
534
+    or _request('action') == 'cookie'
535
+    or _request('action') == 'converser'
536
+    or _request('action') == 'test_dirs')
537 537
 ) {
538 538
 
539
-	// Si on peut installer, on lance illico
540
-	if (test_espace_prive()) {
541
-		include_spip('inc/headers');
542
-		redirige_url_ecrire("install");
543
-	} else {
544
-		// Si on est dans le site public, dire que qq s'en occupe
545
-		include_spip('inc/minipres');
546
-		utiliser_langue_visiteur();
547
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . "</p>", array('status' => 503));
548
-		exit;
549
-	}
550
-	// autrement c'est une install ad hoc (spikini...), on sait pas faire
539
+    // Si on peut installer, on lance illico
540
+    if (test_espace_prive()) {
541
+        include_spip('inc/headers');
542
+        redirige_url_ecrire("install");
543
+    } else {
544
+        // Si on est dans le site public, dire que qq s'en occupe
545
+        include_spip('inc/minipres');
546
+        utiliser_langue_visiteur();
547
+        echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . "</p>", array('status' => 503));
548
+        exit;
549
+    }
550
+    // autrement c'est une install ad hoc (spikini...), on sait pas faire
551 551
 }
552 552
 
553 553
 // memoriser un tri sessionne eventuel
554 554
 if (isset($_REQUEST['var_memotri'])
555
-	and $t = $_REQUEST['var_memotri']
556
-	and (strncmp($t, 'trisession', 10) == 0 or strncmp($t, 'senssession', 11) == 0)
555
+    and $t = $_REQUEST['var_memotri']
556
+    and (strncmp($t, 'trisession', 10) == 0 or strncmp($t, 'senssession', 11) == 0)
557 557
 ) {
558
-	if (!function_exists('session_set')) {
559
-		include_spip('inc/session');
560
-	}
561
-	$t = preg_replace(",\W,","_", $t);
562
-	if ($v = _request($t)) {
563
-		session_set($t, $v);
564
-	}
558
+    if (!function_exists('session_set')) {
559
+        include_spip('inc/session');
560
+    }
561
+    $t = preg_replace(",\W,","_", $t);
562
+    if ($v = _request($t)) {
563
+        session_set($t, $v);
564
+    }
565 565
 }
566 566
 
567 567
 /**
@@ -571,22 +571,22 @@  discard block
 block discarded – undo
571 571
  * La globale $spip_header_silencieux permet de rendre le header minimal pour raisons de securite
572 572
  */
573 573
 if (!defined('_HEADER_COMPOSED_BY')) {
574
-	define('_HEADER_COMPOSED_BY', "Composed-By: SPIP");
574
+    define('_HEADER_COMPOSED_BY', "Composed-By: SPIP");
575 575
 }
576 576
 if (!headers_sent() and _HEADER_COMPOSED_BY) {
577
-	if (!defined('_HEADER_VARY')) {
578
-		define('_HEADER_VARY', "Vary: Cookie, Accept-Encoding");
579
-	}
580
-	if (_HEADER_VARY) {
581
-		header(_HEADER_VARY);
582
-	}
583
-	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
584
-		include_spip('inc/filtres_mini');
585
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . "config.txt"));
586
-	} else {
587
-		// header minimal
588
-		header(_HEADER_COMPOSED_BY . " @ www.spip.net");
589
-	}
577
+    if (!defined('_HEADER_VARY')) {
578
+        define('_HEADER_VARY', "Vary: Cookie, Accept-Encoding");
579
+    }
580
+    if (_HEADER_VARY) {
581
+        header(_HEADER_VARY);
582
+    }
583
+    if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
584
+        include_spip('inc/filtres_mini');
585
+        header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . "config.txt"));
586
+    } else {
587
+        // header minimal
588
+        header(_HEADER_COMPOSED_BY . " @ www.spip.net");
589
+    }
590 590
 }
591 591
 
592 592
 $methode = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ((php_sapi_name() == 'cli') ? 'cli' : ''));
Please login to merge, or discard this patch.