Completed
Push — master ( 9db7a9...8cc67b )
by cam
04:18
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(dirname(__FILE__)) . '/');
52
+define('_ROOT_RACINE', dirname(dirname(__FILE__)).'/');
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(dirname(__FILE__)) . '/prive/' . _NOM_IMG_PACK);
67
+define('_ROOT_IMG_PACK', dirname(dirname(__FILE__)).'/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
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 //
267 267
 // Prendre en compte les entetes HTTP_X_FORWARDED_XX
268 268
 //
269
-if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
269
+if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
270 270
 	if (empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
271 271
 		$_SERVER['HTTP_X_FORWARDED_HOST'] = $_SERVER['HTTP_HOST'];
272 272
 	}
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
 		$_SERVER['HTTP_X_FORWARDED_PORT'] = 443;
275 275
 	}
276 276
 }
277
-if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])){
278
-	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])){
277
+if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
278
+	if (isset($_SERVER['HTTP_X_FORWARDED_PORT']) and is_numeric($_SERVER['HTTP_X_FORWARDED_PORT'])) {
279 279
 		$_SERVER['SERVER_PORT'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
280
-		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'){
280
+		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
281 281
 			$_SERVER['HTTPS'] = 'on';
282 282
 			if (isset($_SERVER['REQUEST_SCHEME'])) {
283 283
 				$_SERVER['REQUEST_SCHEME'] = 'https';
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
 		}
286 286
 	}
287 287
 	$host = $_SERVER['HTTP_X_FORWARDED_HOST'];
288
-	if (strpos($host,',')!==false){
289
-		$h = explode(',',$host);
288
+	if (strpos($host, ',') !== false) {
289
+		$h = explode(',', $host);
290 290
 		$host = trim(reset($h));
291 291
 	}
292 292
 	// securite sur le contenu de l'entete
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
 //
299 299
 if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
300 300
 	$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
301
-	if (strpos($ip,',')!==false){
302
-		$ip = explode(',',$ip);
301
+	if (strpos($ip, ',') !== false) {
302
+		$ip = explode(',', $ip);
303 303
 		$ip = reset($ip);
304 304
 	}
305 305
 	// ecraser $_SERVER['REMOTE_ADDR'] si elle est en localhost
306
-	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR']==='127.0.0.1'){
306
+	if (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] === '127.0.0.1') {
307 307
 		$_SERVER['REMOTE_ADDR'] = $ip;
308 308
 	}
309 309
 }
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 # la matrice standard (fichiers definissant les fonctions a inclure)
377 377
 $spip_matrice = array();
378 378
 # les plugins a activer
379
-$plugins = array();  // voir le contenu du repertoire /plugins/
379
+$plugins = array(); // voir le contenu du repertoire /plugins/
380 380
 # les surcharges de include_spip()
381 381
 $surcharges = array(); // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
382 382
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 
431 431
 // cette version dev accepte tous les plugins compatible avec la version ci-dessous
432 432
 // a supprimer en phase beta/rc/release
433
-define('_DEV_VERSION_SPIP_COMPAT',"3.2.99");
433
+define('_DEV_VERSION_SPIP_COMPAT', "3.2.99");
434 434
 // version des signatures de fonctions PHP
435 435
 // (= date de leur derniere modif cassant la compatibilite et/ou necessitant un recalcul des squelettes)
436 436
 $spip_version_code = 20200917;
@@ -454,8 +454,8 @@  discard block
 block discarded – undo
454 454
 //
455 455
 // Charger les fonctions liees aux serveurs Http et Sql.
456 456
 //
457
-require_once _ROOT_RESTREINT . 'inc/utils.php';
458
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
457
+require_once _ROOT_RESTREINT.'inc/utils.php';
458
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
459 459
 
460 460
 // Definition personnelles eventuelles
461 461
 
@@ -478,10 +478,10 @@  discard block
 block discarded – undo
478 478
 // ===> on execute en neutralisant les messages d'erreur
479 479
 
480 480
 spip_initialisation_core(
481
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
482
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
483
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
484
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
481
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
482
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
483
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
484
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
485 485
 );
486 486
 
487 487
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 		// Si on est dans le site public, dire que qq s'en occupe
537 537
 		include_spip('inc/minipres');
538 538
 		utiliser_langue_visiteur();
539
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . "</p>", array('status' => 503));
539
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte')."</p>", array('status' => 503));
540 540
 		exit;
541 541
 	}
542 542
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 	if (!function_exists('session_set')) {
551 551
 		include_spip('inc/session');
552 552
 	}
553
-	$t = preg_replace(",\W,","_", $t);
553
+	$t = preg_replace(",\W,", "_", $t);
554 554
 	if ($v = _request($t)) {
555 555
 		session_set($t, $v);
556 556
 	}
@@ -574,12 +574,12 @@  discard block
 block discarded – undo
574 574
 	}
575 575
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
576 576
 		include_spip('inc/filtres_mini');
577
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . "config.txt"));
577
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR."config.txt"));
578 578
 	} else {
579 579
 		// header minimal
580
-		header(_HEADER_COMPOSED_BY . " @ www.spip.net");
580
+		header(_HEADER_COMPOSED_BY." @ www.spip.net");
581 581
 	}
582 582
 }
583 583
 
584 584
 $methode = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : ((php_sapi_name() == 'cli') ? 'cli' : ''));
585
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
585
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.