Completed
Push — master ( 98228d...353f53 )
by cam
04:35
created
ecrire/inc_version.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
50 50
 
51 51
 /** chemin absolu vers la racine */
52
-define('_ROOT_RACINE', dirname(__DIR__) . '/');
52
+define('_ROOT_RACINE', dirname(__DIR__).'/');
53 53
 /** chemin absolu vers le repertoire de travail */
54
-define('_ROOT_CWD', getcwd() . '/');
54
+define('_ROOT_CWD', getcwd().'/');
55 55
 /** chemin absolu vers ecrire */
56
-define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
56
+define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT);
57 57
 
58 58
 // Icones
59 59
 if (!defined('_NOM_IMG_PACK')) {
@@ -61,17 +61,17 @@  discard block
 block discarded – undo
61 61
 	define('_NOM_IMG_PACK', 'images/');
62 62
 }
63 63
 /** le chemin http (relatif) vers les images standard */
64
-define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
64
+define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK));
65 65
 
66 66
 /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */
67
-define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
67
+define('_ROOT_IMG_PACK', dirname(__DIR__).'/prive/'._NOM_IMG_PACK);
68 68
 
69 69
 if (!defined('_JAVASCRIPT')) {
70 70
 	/** Nom du repertoire des  bibliotheques JavaScript */
71 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
-define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
74
+define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT));
75 75
 
76 76
 # Le nom des 4 repertoires modifiables par les scripts lances par httpd
77 77
 # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas)
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 }
102 102
 
103 103
 // Son emplacement absolu si on le trouve
104
-if (@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
105
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
104
+if (@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')
105
+	or (@file_exists($f = _ROOT_RESTREINT._NOM_CONFIG.'.php'))
106 106
 ) {
107 107
 	/** Emplacement absolu du fichier d'option */
108 108
 	define('_FILE_OPTIONS', $f);
@@ -125,7 +125,7 @@  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 130
 	include $f;
131 131
 }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			. 'MSIE 6\.0|'
145 145
 			// UA plus cibles
146 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'])
147
+			. ',i', (string) $_SERVER['HTTP_USER_AGENT'])
148 148
 	);
149 149
 }
150 150
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 //
275 275
 // Prendre en compte les entetes HTTP_X_FORWARDED_XX
276 276
 //
277
-if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
277
+if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
278 278
 	if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
279 279
 		$_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST'];
280 280
 	}
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 		$_SERVER['HTTP_X_FORWARDED_PORT'] = 443;
283 283
 	}
284 284
 }
285
-if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
286
-	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])){
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 287
 		$_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
288
-		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
288
+		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
289 289
 			$_SERVER['HTTPS'] = 'on';
290 290
 			if (isset($_SERVER['REQUEST_SCHEME'])) {
291 291
 				$_SERVER['REQUEST_SCHEME'] = 'https';
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
 		}
294 294
 	}
295 295
 	$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
296
-	if (strpos($host,',')!==false){
297
-		$h = explode(',',$host);
296
+	if (strpos($host, ',') !== false) {
297
+		$h = explode(',', $host);
298 298
 		$host = trim(reset($h));
299 299
 	}
300 300
 	// securite sur le contenu de l'entete
@@ -306,12 +306,12 @@  discard block
 block discarded – undo
306 306
 //
307 307
 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
308 308
 	$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
309
-	if (strpos($ip,',')!==false){
310
-		$ip = explode(',',$ip);
309
+	if (strpos($ip, ',') !== false) {
310
+		$ip = explode(',', $ip);
311 311
 		$ip = reset($ip);
312 312
 	}
313 313
 	// ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost
314
-	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR']==='127.0.0.1'){
314
+	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] === '127.0.0.1') {
315 315
 		$_SERVER['REMOTE_ADDR'] = $ip;
316 316
 	}
317 317
 }
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 # la matrice standard (fichiers definissant les fonctions a inclure)
385 385
 $spip_matrice = array();
386 386
 # les plugins a activer
387
-$plugins = array();  // voir le contenu du repertoire /plugins/
387
+$plugins = array(); // voir le contenu du repertoire /plugins/
388 388
 # les surcharges de include_spip()
389 389
 $surcharges = array(); // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
390 390
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 
439 439
 // cette version dev accepte tous les plugins compatible avec la version ci-dessous
440 440
 // a supprimer en phase beta/rc/release
441
-define('_DEV_VERSION_SPIP_COMPAT',"3.2.99");
441
+define('_DEV_VERSION_SPIP_COMPAT', "3.2.99");
442 442
 // version des signatures de fonctions PHP
443 443
 // (= date de leur derniere modif cassant la compatibilite et/ou necessitant un recalcul des squelettes)
444 444
 $spip_version_code = 20210430;
@@ -462,8 +462,8 @@  discard block
 block discarded – undo
462 462
 //
463 463
 // Charger les fonctions liees aux serveurs Http et Sql.
464 464
 //
465
-require_once _ROOT_RESTREINT . 'inc/utils.php';
466
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
465
+require_once _ROOT_RESTREINT.'inc/utils.php';
466
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
467 467
 
468 468
 // Definition personnelles eventuelles
469 469
 
@@ -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
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
 		// Si on est dans le site public, dire que qq s'en occupe
545 545
 		include_spip('inc/minipres');
546 546
 		utiliser_langue_visiteur();
547
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . "</p>", array('status' => 503));
547
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte')."</p>", array('status' => 503));
548 548
 		exit;
549 549
 	}
550 550
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 	if (!function_exists('session_set')) {
559 559
 		include_spip('inc/session');
560 560
 	}
561
-	$t = preg_replace(",\W,","_", $t);
561
+	$t = preg_replace(",\W,", "_", $t);
562 562
 	if ($v = _request($t)) {
563 563
 		session_set($t, $v);
564 564
 	}
@@ -582,12 +582,12 @@  discard block
 block discarded – undo
582 582
 	}
583 583
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
584 584
 		include_spip('inc/filtres_mini');
585
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . "config.txt"));
585
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR."config.txt"));
586 586
 	} else {
587 587
 		// header minimal
588
-		header(_HEADER_COMPOSED_BY . " @ www.spip.net");
588
+		header(_HEADER_COMPOSED_BY." @ www.spip.net");
589 589
 	}
590 590
 }
591 591
 
592 592
 $methode = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ((php_sapi_name() == 'cli') ? 'cli' : ''));
593
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
593
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.