Completed
Push — master ( eb91e6...90b640 )
by cam
01:14
created
ecrire/inc_version.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  *  Ce programme est un logiciel libre distribué sous licence GNU/GPL.     *
10 10
 \***************************************************************************/
11 11
 
12
-require_once __DIR__ . '/../vendor/autoload.php';
12
+require_once __DIR__.'/../vendor/autoload.php';
13 13
 
14 14
 /**
15 15
  * Initialisation de SPIP
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
 define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
54 54
 
55 55
 /** chemin absolu vers la racine */
56
-define('_ROOT_RACINE', dirname(__DIR__) . '/');
56
+define('_ROOT_RACINE', dirname(__DIR__).'/');
57 57
 /** chemin absolu vers le repertoire de travail */
58
-define('_ROOT_CWD', getcwd() . '/');
58
+define('_ROOT_CWD', getcwd().'/');
59 59
 /** chemin absolu vers ecrire */
60
-define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
60
+define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT);
61 61
 
62 62
 // Icones
63 63
 if (!defined('_NOM_IMG_PACK')) {
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
 	define('_NOM_IMG_PACK', 'images/');
66 66
 }
67 67
 /** le chemin http (relatif) vers les images standard */
68
-define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
68
+define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK));
69 69
 
70 70
 /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */
71
-define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
71
+define('_ROOT_IMG_PACK', dirname(__DIR__).'/prive/'._NOM_IMG_PACK);
72 72
 
73 73
 if (!defined('_JAVASCRIPT')) {
74 74
 	/** Nom du repertoire des  bibliotheques JavaScript */
75 75
 	define('_JAVASCRIPT', 'javascript/');
76 76
 } // utilisable avec #CHEMIN et find_in_path
77 77
 /** le nom du repertoire des  bibliotheques JavaScript du prive */
78
-define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
78
+define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT));
79 79
 
80 80
 # Le nom des 4 repertoires modifiables par les scripts lances par httpd
81 81
 # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas)
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 
107 107
 // Son emplacement absolu si on le trouve
108 108
 if (
109
-	@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
110
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
109
+	@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')
110
+	or (@file_exists($f = _ROOT_RESTREINT._NOM_CONFIG.'.php'))
111 111
 ) {
112 112
 	/** Emplacement absolu du fichier d'option */
113 113
 	define('_FILE_OPTIONS', $f);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 // inclure l'ecran de securite
132 132
 if (
133 133
 	!defined('_ECRAN_SECURITE')
134
-	and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
134
+	and @file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES.'ecran_securite.php')
135 135
 ) {
136 136
 	include $f;
137 137
 }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			// UA plus cibles
153 153
 			. '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'
154 154
 			. ',i',
155
-			(string)$_SERVER['HTTP_USER_AGENT']
155
+			(string) $_SERVER['HTTP_USER_AGENT']
156 156
 		)
157 157
 	);
158 158
 }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 # la matrice standard (fichiers definissant les fonctions a inclure)
395 395
 $spip_matrice = [];
396 396
 # les plugins a activer
397
-$plugins = [];  // voir le contenu du repertoire /plugins/
397
+$plugins = []; // voir le contenu du repertoire /plugins/
398 398
 # les surcharges de include_spip()
399 399
 $surcharges = []; // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
400 400
 
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
 //
473 473
 // Charger les fonctions liees aux serveurs Http et Sql.
474 474
 //
475
-require_once _ROOT_RESTREINT . 'inc/utils.php';
476
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
475
+require_once _ROOT_RESTREINT.'inc/utils.php';
476
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
477 477
 
478 478
 // Definition personnelles eventuelles
479 479
 
@@ -496,10 +496,10 @@  discard block
 block discarded – undo
496 496
 // ===> on execute en neutralisant les messages d'erreur
497 497
 
498 498
 spip_initialisation_core(
499
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
500
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
501
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
502
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
499
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
500
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
501
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
502
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
503 503
 );
504 504
 
505 505
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		include_spip('inc/lang');
556 556
 		utiliser_langue_visiteur();
557 557
 		include_spip('inc/minipres');
558
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]);
558
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte').'</p>', ['status' => 503]);
559 559
 		exit;
560 560
 	}
561 561
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -594,12 +594,12 @@  discard block
 block discarded – undo
594 594
 	}
595 595
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
596 596
 		include_spip('inc/filtres_mini');
597
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt'));
597
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR.'config.txt'));
598 598
 	} else {
599 599
 		// header minimal
600
-		header(_HEADER_COMPOSED_BY . ' @ www.spip.net');
600
+		header(_HEADER_COMPOSED_BY.' @ www.spip.net');
601 601
 	}
602 602
 }
603 603
 
604 604
 $methode = ($_SERVER['REQUEST_METHOD'] ?? ((php_sapi_name() == 'cli') ? 'cli' : ''));
605
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
605
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.
ecrire/src/Afficher/Minipublic.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,17 +64,17 @@  discard block
 block discarded – undo
64 64
 
65 65
 		$page_title = (isset($options['page_title']) ? $options['page_title'] : $GLOBALS['meta']['nom_site']);
66 66
 		$doctype = (isset($options['doctype']) ? $options['doctype'] : "<!DOCTYPE html>");
67
-		$doctype = trim($doctype) . "\n";
67
+		$doctype = trim($doctype)."\n";
68 68
 		$charset = (isset($options['charset']) ? $options['charset'] : "utf-8");
69 69
 		$all_inline = (isset($options['all_inline']) ? $options['all_inline'] : true);
70 70
 		$onLoad = (isset($options['onLoad']) ? $options['onLoad'] : '');
71 71
 		if ($onLoad) {
72
-			$onLoad = ' onload="' . attribut_html($onLoad) . '"';
72
+			$onLoad = ' onload="'.attribut_html($onLoad).'"';
73 73
 		}
74 74
 
75 75
 		# envoyer le charset
76 76
 		if (!headers_sent()) {
77
-			header('Content-Type: text/html; charset=' . $charset);
77
+			header('Content-Type: text/html; charset='.$charset);
78 78
 		}
79 79
 
80 80
 		$css = '';
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			. "--minipublic-color-theme--s: $s;"
96 96
 			. "--minipublic-color-theme--l: $l;}";
97 97
 		$vars = file_get_contents(find_in_theme('minipublic.vars.css'));
98
-		$inline .= "\n" . trim($vars);
98
+		$inline .= "\n".trim($vars);
99 99
 		if (function_exists('minifier')) {
100 100
 			$inline = minifier($inline, 'css');
101 101
 		}
@@ -122,31 +122,31 @@  discard block
 block discarded – undo
122 122
 			}
123 123
 			$css = "$inline\n$css";
124 124
 			if (!empty($options['css'])) {
125
-				$css .= "\n" . $options['css'];
125
+				$css .= "\n".$options['css'];
126 126
 			}
127 127
 			$css = "<style type='text/css'>$css</style>";
128 128
 		} else {
129 129
 			$css = "<style type='text/css'>$inline</style>";
130 130
 			foreach ($files as $name) {
131 131
 				$file = timestamp(direction_css($name));
132
-				$css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n";
132
+				$css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n";
133 133
 			}
134 134
 			if (!empty($options['css'])) {
135
-				$css .= "<style type='text/css'>" . $options['css'] . "</style>";
135
+				$css .= "<style type='text/css'>".$options['css']."</style>";
136 136
 			}
137 137
 		}
138 138
 
139
-		return $doctype .
140
-			html_lang_attributes() .
141
-			"<head>\n" .
142
-			'<title>' .
143
-			textebrut($page_title) .
144
-			"</title>\n" .
145
-			"<meta name=\"viewport\" content=\"width=device-width\" />\n" .
146
-			$css .
147
-			(empty($options['head']) ? "" : $options['head']) .
148
-			"</head>\n" .
149
-			"<body{$onLoad} class=\"minipublic\">\n" .
139
+		return $doctype.
140
+			html_lang_attributes().
141
+			"<head>\n".
142
+			'<title>'.
143
+			textebrut($page_title).
144
+			"</title>\n".
145
+			"<meta name=\"viewport\" content=\"width=device-width\" />\n".
146
+			$css.
147
+			(empty($options['head']) ? "" : $options['head']).
148
+			"</head>\n".
149
+			"<body{$onLoad} class=\"minipublic\">\n".
150 150
 			"\t<div class=\"minipublic-bloc\">\n";
151 151
 	}
152 152
 
@@ -157,16 +157,16 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	protected function ouvreCorps($options = []) {
159 159
 		$url_site = url_de_base();
160
-		$header = "<header>\n" .
161
-			"<h1><a href=\"" . attribut_html($url_site) . "\">" . interdire_scripts($GLOBALS['meta']['nom_site'] ?? '') . "</a></h1>\n";
160
+		$header = "<header>\n".
161
+			"<h1><a href=\"".attribut_html($url_site)."\">".interdire_scripts($GLOBALS['meta']['nom_site'] ?? '')."</a></h1>\n";
162 162
 
163 163
 		$titre = (isset($options['titre']) ? $options['titre'] : '');
164 164
 		if ($titre) {
165
-			$header .= "<h2>" . interdire_scripts($titre) . "</h2>";
165
+			$header .= "<h2>".interdire_scripts($titre)."</h2>";
166 166
 		}
167 167
 		$header .= "</header>";
168 168
 
169
-		return $header . "<div class='corps'>\n";
169
+		return $header."<div class='corps'>\n";
170 170
 	}
171 171
 
172 172
 	/**
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 		if (isset($options['footer'])) {
181 181
 			$footer = $options['footer'];
182 182
 		} else {
183
-			$footer = "<a href=\"" . attribut_html($url_site) . "\">" . _T('retour') . "</a>\n";
183
+			$footer = "<a href=\"".attribut_html($url_site)."\">"._T('retour')."</a>\n";
184 184
 		}
185 185
 		if (!empty($footer)) {
186 186
 			$footer = "<footer>\n{$footer}</footer>";
187 187
 		}
188 188
 
189
-		return "</div>\n" . $footer;
189
+		return "</div>\n".$footer;
190 190
 	}
191 191
 
192 192
 
Please login to merge, or discard this patch.