Completed
Push — master ( fb0017...92433c )
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/install/etape_3.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, '', $server_db);
44 44
 
45 45
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
46
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
46
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
47 47
 
48 48
 	$fquery = sql_serveur('query', $server_db);
49 49
 	if ($choix_db == 'new_spip') {
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
 			if (!$ok) {
54 54
 				$re = "Impossible de creer la base $re";
55 55
 				spip_log($re);
56
-				return '<p>' . _T('avis_connexion_erreur_creer_base') . "</p><!--\n$re\n-->";
56
+				return '<p>'._T('avis_connexion_erreur_creer_base')."</p><!--\n$re\n-->";
57 57
 			}
58 58
 		} else {
59 59
 			$re = "Le nom de la base doit correspondre a $re";
60 60
 			spip_log($re);
61 61
 
62
-			return '<p>' . _T('avis_connexion_erreur_nom_base') . "</p><!--\n$re\n-->";
62
+			return '<p>'._T('avis_connexion_erreur_nom_base')."</p><!--\n$re\n-->";
63 63
 		}
64 64
 	}
65 65
 
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, $sel_db, $server_db);
71 71
 
72 72
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
73
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
73
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
74 74
 
75 75
 	// Completer le tableau decrivant la connexion
76 76
 
77 77
 	$GLOBALS['connexions'][$server_db]['prefixe'] = $table_prefix;
78 78
 	$GLOBALS['connexions'][$server_db]['db'] = $sel_db;
79 79
 
80
-	$old = sql_showbase($table_prefix . '_meta', $server_db);
80
+	$old = sql_showbase($table_prefix.'_meta', $server_db);
81 81
 	if ($old) {
82 82
 		$old = sql_fetch($old, $server_db);
83 83
 	}
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 				$charset['charset'];
97 97
 			$charsetbase = $charset['charset'];
98 98
 		} else {
99
-			spip_log(_DEFAULT_CHARSET . ' inconnu du serveur SQL');
99
+			spip_log(_DEFAULT_CHARSET.' inconnu du serveur SQL');
100 100
 			$charsetbase = 'standard';
101 101
 		}
102 102
 		spip_log("Creation des tables. Codage $charsetbase");
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		if ($r) {
147 147
 			$r = sql_fetch($r, $server_db);
148 148
 		}
149
-		$version_installee = !$r ? 0 : (double)$r['valeur'];
149
+		$version_installee = !$r ? 0 : (double) $r['valeur'];
150 150
 		if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) {
151 151
 			$fupdateq(
152 152
 				'spip_meta',
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 				'',
156 156
 				$server_db
157 157
 			);
158
-			spip_log('nouvelle version installee: ' . $GLOBALS['spip_version_base']);
158
+			spip_log('nouvelle version installee: '.$GLOBALS['spip_version_base']);
159 159
 		}
160 160
 		// eliminer la derniere operation d'admin mal terminee
161 161
 		// notamment la mise a jour
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	if ($chmod_db) {
183 183
 		install_fichier_connexion(
184 184
 			_FILE_CHMOD_TMP,
185
-			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', " . sprintf('0%3o', $chmod_db) . ");\n"
185
+			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', ".sprintf('0%3o', $chmod_db).");\n"
186 186
 		);
187 187
 	}
188 188
 
@@ -245,16 +245,16 @@  discard block
 block discarded – undo
245 245
 
246 246
 
247 247
 function install_premier_auteur($email, $login, $nom, #[\SensitiveParameter] $pass, $hidden, $auteur_obligatoire) {
248
-	return info_progression_etape(3, 'etape_', 'install/') .
248
+	return info_progression_etape(3, 'etape_', 'install/').
249 249
 	info_etape(
250 250
 		_T('info_informations_personnelles'),
251
-		'<b>' . _T('texte_informations_personnelles_1') . '</b>' .
252
-		aider('install5', true) .
253
-		'<p>' .
251
+		'<b>'._T('texte_informations_personnelles_1').'</b>'.
252
+		aider('install5', true).
253
+		'<p>'.
254 254
 		($auteur_obligatoire ?
255 255
 			''
256 256
 			:
257
-			_T('texte_informations_personnelles_2') . ' ' . _T('info_laisser_champs_vides')
257
+			_T('texte_informations_personnelles_2').' '._T('info_laisser_champs_vides')
258 258
 		)
259 259
 	)
260 260
 	. generer_form_ecrire('install', (
@@ -264,12 +264,12 @@  discard block
 block discarded – undo
264 264
 			_T('info_identification_publique'),
265 265
 			[
266 266
 				'nom' => [
267
-					'label' => '<b>' . _T('entree_signature') . "</b><br />\n" . _T('entree_nom_pseudo_1') . "\n",
267
+					'label' => '<b>'._T('entree_signature')."</b><br />\n"._T('entree_nom_pseudo_1')."\n",
268 268
 					'valeur' => $nom,
269 269
 					'required' => $auteur_obligatoire,
270 270
 				],
271 271
 				'email' => [
272
-					'label' => '<b>' . _T('entree_adresse_email') . "</b>\n",
272
+					'label' => '<b>'._T('entree_adresse_email')."</b>\n",
273 273
 					'valeur' => $email,
274 274
 				]
275 275
 			]
@@ -279,23 +279,23 @@  discard block
 block discarded – undo
279 279
 			_T('entree_identifiants_connexion'),
280 280
 			[
281 281
 				'login' => [
282
-					'label' => '<b>' . _T('entree_login') . "</b><br />\n" . _T(
282
+					'label' => '<b>'._T('entree_login')."</b><br />\n"._T(
283 283
 						'info_login_trop_court_car_pluriel',
284 284
 						['nb' => _LOGIN_TROP_COURT]
285
-					) . "\n",
285
+					)."\n",
286 286
 					'valeur' => $login,
287 287
 					'required' => $auteur_obligatoire,
288 288
 				],
289 289
 				'pass' => [
290
-					'label' => '<b>' . _T('entree_mot_passe') . "</b><br />\n" . _T(
290
+					'label' => '<b>'._T('entree_mot_passe')."</b><br />\n"._T(
291 291
 						'info_passe_trop_court_car_pluriel',
292 292
 						['nb' => _PASS_LONGUEUR_MINI]
293
-					) . "\n",
293
+					)."\n",
294 294
 					'valeur' => $pass,
295 295
 					'required' => $auteur_obligatoire,
296 296
 				],
297 297
 				'pass_verif' => [
298
-					'label' => '<b>' . _T('info_confirmer_passe') . "</b><br />\n",
298
+					'label' => '<b>'._T('info_confirmer_passe')."</b><br />\n",
299 299
 					'valeur' => $pass,
300 300
 					'required' => $auteur_obligatoire,
301 301
 				]
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
 
340 340
 		if ($res) {
341 341
 			$res = info_progression_etape(2, 'etape_', 'install/', true)
342
-				. "<div class='error'><h3>" . _T('avis_operation_echec') . '</h3>'
342
+				. "<div class='error'><h3>"._T('avis_operation_echec').'</h3>'
343 343
 				. $res
344
-				. '<p>' . _T('texte_operation_echec') . '</p>'
344
+				. '<p>'._T('texte_operation_echec').'</p>'
345 345
 				. '</div>';
346 346
 		}
347 347
 	} else {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
 		$hidden = predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db)
367 367
 			. (defined('_INSTALL_NAME_DB') ? ''
368
-				: "\n<input type='hidden' name='sel_db' value=\"" . spip_htmlspecialchars($sel_db) . '" />');
368
+				: "\n<input type='hidden' name='sel_db' value=\"".spip_htmlspecialchars($sel_db).'" />');
369 369
 
370 370
 		$auteur_obligatoire = ($ldap_present ? 0 : !sql_countsel('spip_auteurs', '', '', '', $server_db));
371 371
 
Please login to merge, or discard this patch.
ecrire/install/etape_.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 	} else {
33 33
 		include_spip('inc/presentation'); // pour info_copyright
34 34
 
35
-		$res = "<div class='petit-centre'><img alt='SPIP' class='logo' src='" . chemin_image('logo-spip.png') . "' />\n" .
36
-			"<p class='small'>" . info_copyright() . "</p></div>\n" .
37
-			'<p>' . _T('install_select_langue') . '</p>' .
38
-			'<div>' . $menu_langues . "</div>\n" .
39
-			generer_form_ecrire('install', "<input type='hidden' name='etape' value='chmod' />" . bouton_suivant());
35
+		$res = "<div class='petit-centre'><img alt='SPIP' class='logo' src='".chemin_image('logo-spip.png')."' />\n".
36
+			"<p class='small'>".info_copyright()."</p></div>\n".
37
+			'<p>'._T('install_select_langue').'</p>'.
38
+			'<div>'.$menu_langues."</div>\n".
39
+			generer_form_ecrire('install', "<input type='hidden' name='etape' value='chmod' />".bouton_suivant());
40 40
 
41 41
 		$minipage = new Spip\Afficher\Minipage\Installation();
42 42
 		echo $minipage->page($res);
Please login to merge, or discard this patch.
ecrire/install/etape_2.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$GLOBALS['connexions'][$server_db] = $link;
49 49
 
50 50
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
51
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
51
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
52 52
 
53 53
 	$minipage = new Spip\Afficher\Minipage\Installation();
54 54
 	echo $minipage->installDebutPage();
@@ -68,18 +68,18 @@  discard block
 block discarded – undo
68 68
 	//echo "\n-->\n";
69 69
 
70 70
 	if (($db_connect == '0') && $link) {
71
-		echo "<div class='success'><b>" . _T('info_connexion_ok') . '</b></div>';
71
+		echo "<div class='success'><b>"._T('info_connexion_ok').'</b></div>';
72 72
 		echo info_progression_etape(2, 'etape_', 'install/');
73 73
 
74
-		echo info_etape(_T('menu_aide_installation_choix_base') . aider('install2', true));
74
+		echo info_etape(_T('menu_aide_installation_choix_base').aider('install2', true));
75 75
 
76 76
 		echo "\n", '<!-- ', sql_version($server_db), ' -->';
77 77
 		[$checked, $res] = install_etape_2_bases($login_db, $server_db);
78 78
 
79 79
 		$hidden = (defined('_SPIP_CHMOD')
80 80
 				? ''
81
-				: ("\n<input type='hidden' name='chmod' value='" . spip_htmlspecialchars($chmod) . "' />"))
82
-			. predef_ou_cache($adresse_db . ($port ? ':' . $port : ''), $login_db, $pass_db, $server_db);
81
+				: ("\n<input type='hidden' name='chmod' value='".spip_htmlspecialchars($chmod)."' />"))
82
+			. predef_ou_cache($adresse_db.($port ? ':'.$port : ''), $login_db, $pass_db, $server_db);
83 83
 
84 84
 		echo install_etape_2_form($hidden, $checked, $res, 3);
85 85
 	} else {
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 
88 88
 		echo "<div class='error'>";
89 89
 		echo info_etape(_T('info_connexion_base'));
90
-		echo '<h3>' . _T('avis_connexion_echec_1') . '</h3>';
91
-		echo '<p>' . _T('avis_connexion_echec_2') . '</p>';
90
+		echo '<h3>'._T('avis_connexion_echec_1').'</h3>';
91
+		echo '<p>'._T('avis_connexion_echec_2').'</p>';
92 92
 
93 93
 		echo "<p style='font-size: small;'>",
94 94
 		_T('avis_connexion_echec_3'),
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 			. ' '
121 121
 		];
122 122
 	}
123
-	$res = '<b>' . _T('avis_lecture_noms_bases_1') . '</b>
124
-		' . _T('avis_lecture_noms_bases_2') . '<p>';
123
+	$res = '<b>'._T('avis_lecture_noms_bases_1').'</b>
124
+		' . _T('avis_lecture_noms_bases_2').'<p>';
125 125
 
126 126
 	$checked = false;
127 127
 	if ($login_db) {
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
 		if ($ok) {
139 139
 			$res .= _T('avis_lecture_noms_bases_3')
140 140
 				. '<ul>'
141
-				. '<li><input name="choix_db" value="' . $test_base . "\" type='radio' id='stand' checked='checked' />"
142
-				. "<label for='stand'>" . $test_base . "</label></li>\n"
141
+				. '<li><input name="choix_db" value="'.$test_base."\" type='radio' id='stand' checked='checked' />"
142
+				. "<label for='stand'>".$test_base."</label></li>\n"
143 143
 				. '</ul>'
144
-				. '<p>' . _T('info_ou') . ' ';
144
+				. '<p>'._T('info_ou').' ';
145 145
 			$checked = true;
146 146
 		}
147 147
 	}
@@ -154,20 +154,20 @@  discard block
 block discarded – undo
154 154
 		"\n<input type='hidden' name='etape' value='$etape' />"
155 155
 		. $hidden
156 156
 		. (defined('_INSTALL_NAME_DB')
157
-			? '<h3>' . _T('install_nom_base_hebergeur') . ' <tt>' . _INSTALL_NAME_DB . '</tt>' . '</h3>'
158
-			: "\n<fieldset><legend>" . _T('texte_choix_base_1') . "</legend>\n"
157
+			? '<h3>'._T('install_nom_base_hebergeur').' <tt>'._INSTALL_NAME_DB.'</tt>'.'</h3>'
158
+			: "\n<fieldset><legend>"._T('texte_choix_base_1')."</legend>\n"
159 159
 			. $res
160 160
 			. "\n<input name=\"choix_db\" value=\"new_spip\" type='radio' id='nou'"
161 161
 			. ($checked ? '' : " checked='checked'")
162
-			. " />\n<label for='nou'>" . _T('info_creer_base') . "</label></p>\n<p>"
162
+			. " />\n<label for='nou'>"._T('info_creer_base')."</label></p>\n<p>"
163 163
 			. "\n<input type='text' name='table_new' class='text' value=\"spip\" size='20' /></p></fieldset>\n"
164 164
 		)
165 165
 
166 166
 		. ((defined('_INSTALL_TABLE_PREFIX')
167 167
 			or $GLOBALS['table_prefix'] != 'spip')
168
-			? '<h3>' . _T('install_table_prefix_hebergeur') . '  <tt>' . $GLOBALS['table_prefix'] . '</tt>' . '</h3>'
169
-			: '<fieldset><legend>' . _T('texte_choix_table_prefix') . "</legend>\n"
170
-			. "<p><label for='table_prefix'>" . _T('info_table_prefix') . '</label></p><p>'
168
+			? '<h3>'._T('install_table_prefix_hebergeur').'  <tt>'.$GLOBALS['table_prefix'].'</tt>'.'</h3>'
169
+			: '<fieldset><legend>'._T('texte_choix_table_prefix')."</legend>\n"
170
+			. "<p><label for='table_prefix'>"._T('info_table_prefix').'</label></p><p>'
171 171
 			. "\n<input type='text' id='tprefix' name='tprefix' class='text' value='"
172 172
 			. 'spip' # valeur par defaut
173 173
 			. "' size='20' /></p></fieldset>"
Please login to merge, or discard this patch.
ecrire/install/etape_ldap2.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$adresse_ldap = filter_var($adresse_ldap, FILTER_SANITIZE_URL) ?: '';
49 49
 
50 50
 	$ldap_link = ldap_connect($adresse_ldap, $port_ldap);
51
-	$erreur = 'ldap_connect(' . spip_htmlspecialchars($adresse_ldap) . ', ' . spip_htmlspecialchars($port_ldap) . ')';
51
+	$erreur = 'ldap_connect('.spip_htmlspecialchars($adresse_ldap).', '.spip_htmlspecialchars($port_ldap).')';
52 52
 
53 53
 	if ($ldap_link) {
54 54
 		if (!ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap)) {
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 		}
58 58
 		if ($tls === true) {
59 59
 			if (!ldap_start_tls($ldap_link)) {
60
-				$erreur = 'ldap_start_tls(' . spip_htmlspecialchars($ldap_link)
61
-					. ' ' . spip_htmlspecialchars($adresse_ldap)
62
-					. ', ' . spip_htmlspecialchars($port_ldap) . ')';
60
+				$erreur = 'ldap_start_tls('.spip_htmlspecialchars($ldap_link)
61
+					. ' '.spip_htmlspecialchars($adresse_ldap)
62
+					. ', '.spip_htmlspecialchars($port_ldap).')';
63 63
 				$ldap_link = false;
64 64
 			}
65 65
 		}
66 66
 		if ($ldap_link) {
67 67
 			$ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap);
68
-			$erreur = "ldap_bind('" . spip_htmlspecialchars($ldap_link)
69
-				. "', '" . spip_htmlspecialchars($login_ldap)
70
-				. "', '" . spip_htmlspecialchars($pass_ldap)
71
-				. "'): " . spip_htmlspecialchars($adresse_ldap)
72
-				. ', ' . spip_htmlspecialchars($port_ldap);
68
+			$erreur = "ldap_bind('".spip_htmlspecialchars($ldap_link)
69
+				. "', '".spip_htmlspecialchars($login_ldap)
70
+				. "', '".spip_htmlspecialchars($pass_ldap)
71
+				. "'): ".spip_htmlspecialchars($adresse_ldap)
72
+				. ', '.spip_htmlspecialchars($port_ldap);
73 73
 		}
74 74
 	}
75 75
 
@@ -77,22 +77,22 @@  discard block
 block discarded – undo
77 77
 		echo info_etape(
78 78
 			_T('titre_connexion_ldap'),
79 79
 			info_progression_etape(2, 'etape_ldap', 'install/')
80
-		),  _T('info_connexion_ldap_ok');
80
+		), _T('info_connexion_ldap_ok');
81 81
 		echo generer_form_ecrire('install', (
82 82
 			"\n<input type='hidden' name='etape' value='ldap3' />"
83
-			. "\n<input type='hidden' name='adresse_ldap' value=\"" . spip_htmlspecialchars($adresse_ldap) . '" />'
84
-			. "\n<input type='hidden' name='port_ldap' value=\"" . spip_htmlspecialchars($port_ldap) . '" />'
85
-			. "\n<input type='hidden' name='login_ldap' value=\"" . spip_htmlspecialchars($login_ldap) . '" />'
86
-			. "\n<input type='hidden' name='pass_ldap' value=\"" . spip_htmlspecialchars($pass_ldap) . '" />'
87
-			. "\n<input type='hidden' name='protocole_ldap' value=\"" . spip_htmlspecialchars($protocole_ldap) . '" />'
88
-			. "\n<input type='hidden' name='tls_ldap' value=\"" . spip_htmlspecialchars($tls_ldap) . '" />'
83
+			. "\n<input type='hidden' name='adresse_ldap' value=\"".spip_htmlspecialchars($adresse_ldap).'" />'
84
+			. "\n<input type='hidden' name='port_ldap' value=\"".spip_htmlspecialchars($port_ldap).'" />'
85
+			. "\n<input type='hidden' name='login_ldap' value=\"".spip_htmlspecialchars($login_ldap).'" />'
86
+			. "\n<input type='hidden' name='pass_ldap' value=\"".spip_htmlspecialchars($pass_ldap).'" />'
87
+			. "\n<input type='hidden' name='protocole_ldap' value=\"".spip_htmlspecialchars($protocole_ldap).'" />'
88
+			. "\n<input type='hidden' name='tls_ldap' value=\"".spip_htmlspecialchars($tls_ldap).'" />'
89 89
 			. bouton_suivant()));
90 90
 	} else {
91 91
 		echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true),
92
-			"<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . '</p>',
93
-			'<p>' . _T('avis_connexion_ldap_echec_2') .
94
-			"<br />\n" . _T('avis_connexion_ldap_echec_3') .
95
-			'<br /><br />' . $erreur . '<b> ?</b></p></div>';
92
+			"<div class='error'><p>"._T('avis_connexion_ldap_echec_1').'</p>',
93
+			'<p>'._T('avis_connexion_ldap_echec_2').
94
+			"<br />\n"._T('avis_connexion_ldap_echec_3').
95
+			'<br /><br />'.$erreur.'<b> ?</b></p></div>';
96 96
 	}
97 97
 
98 98
 	echo $minipage->installFinPage();
Please login to merge, or discard this patch.
ecrire/install/etape_fin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	// creer le repertoire cache, qui sert partout !
44 44
 	// deja fait en etape 4 en principe, on garde au cas ou
45 45
 	if (!@file_exists(_DIR_CACHE)) {
46
-		$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
46
+		$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
47 47
 		$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
48 48
 	}
49 49
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$cible = _T('public:accueil_site');
55 55
 		$cible = generer_form_ecrire('accueil', '', '', $cible);
56 56
 		$minipage = new Spip\Afficher\Minipage\Installation();
57
-		echo $minipage->page($msg . $cible);
57
+		echo $minipage->page($msg.$cible);
58 58
 		// ok, deboucher dans l'espace prive
59 59
 	} else {
60 60
 		redirige_url_ecrire('accueil');
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	$averti = _T(
76 76
 		'htaccess_a_simuler',
77 77
 		[
78
-			'htaccess' => '<tt>' . _ACCESS_FILE_NAME . '</tt>',
78
+			'htaccess' => '<tt>'._ACCESS_FILE_NAME.'</tt>',
79 79
 			'constantes' => '<tt>_DIR_TMP &amp; _DIR_CONNECT</tt>',
80
-			'document_root' => '<tt>' . $_SERVER['DOCUMENT_ROOT'] . '</tt>'
80
+			'document_root' => '<tt>'.$_SERVER['DOCUMENT_ROOT'].'</tt>'
81 81
 		]
82 82
 	);
83 83
 
Please login to merge, or discard this patch.
ecrire/public/fonctions.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		$texte = $intro;
87 87
 	} else {
88 88
 		if (
89
-			strpos("\n" . $texte, "\n|") === false
89
+			strpos("\n".$texte, "\n|") === false
90 90
 			and strlen($texte) > 2.5 * $longueur
91 91
 		) {
92 92
 			if (strpos($texte, '<multi') !== false) {
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 	if ($pas < 1) {
171 171
 		return '';
172 172
 	}
173
-	$ancre = 'pagination' . $nom; // #pagination_articles
174
-	$debut = 'debut' . $nom; // 'debut_articles'
173
+	$ancre = 'pagination'.$nom; // #pagination_articles
174
+	$debut = 'debut'.$nom; // 'debut_articles'
175 175
 
176 176
 	// n'afficher l'ancre qu'une fois
177 177
 	if (!isset($ancres[$ancre])) {
178
-		$bloc_ancre = $ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>";
178
+		$bloc_ancre = $ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>";
179 179
 	} else {
180 180
 		$bloc_ancre = '';
181 181
 	}
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 	if ($modele) {
209 209
 		$pagination['type_pagination'] = $modele;
210
-		if (trouver_fond('pagination_' . $modele, 'modeles')) {
211
-			$modele = '_' . $modele;
210
+		if (trouver_fond('pagination_'.$modele, 'modeles')) {
211
+			$modele = '_'.$modele;
212 212
 		}
213 213
 		else {
214 214
 			$modele = '';
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 function lister_objets_avec_logos($type) {
294 294
 
295 295
 	$objet = objet_type($type);
296
-	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote('logoon') . ' AND L.objet=' . sql_quote($objet));
296
+	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote('logoon').' AND L.objet='.sql_quote($objet));
297 297
 	if ($ids) {
298 298
 		$ids = array_column($ids, 'id_objet');
299 299
 		return implode(',', $ids);
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 
487 487
 	// Classes : on indique le sens de tri et l'item exposé
488 488
 	if (!$is_sens_fixe) {
489
-		$classe .= ' item-tri item-tri_' . ($tri_sens_actuel === 1 ? 'asc' : 'desc');
489
+		$classe .= ' item-tri item-tri_'.($tri_sens_actuel === 1 ? 'asc' : 'desc');
490 490
 	}
491 491
 	if ($champ_ou_sens === $tri_champ) {
492 492
 		$classe .= ' item-tri_actif';
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
  */
526 526
 function tri_champ_order($t, $from = null, $senstri = '') {
527 527
 	if (strncmp($t, 'multi ', 6) == 0) {
528
-		return 'multi' . $senstri;
528
+		return 'multi'.$senstri;
529 529
 	}
530 530
 
531 531
 	$champ = $t;
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 		case 'sinum ':
560 560
 			return "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}";
561 561
 		default:
562
-			return $champ . $senstri;
562
+			return $champ.$senstri;
563 563
 	}
564 564
 }
565 565
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
  * @param ...$dummy
654 654
  * @return string
655 655
  */
656
-function filtre_styles_inline_page_login_pass_dist(&$Pile,...$dummy) {
656
+function filtre_styles_inline_page_login_pass_dist(&$Pile, ...$dummy) {
657 657
 	$styles = '';
658 658
 	include_spip('inc/config');
659 659
 	if ($couleur = lire_config('couleur_login')) {
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 		$l = couleur_hex_to_hsl($couleur, 'l');
663 663
 		$styles .= ":root {--spip-login-color-theme--hs: {$hs};--spip-login-color-theme--l: {$l};}\n";
664 664
 	}
665
-	$logo_bg = _DIR_IMG . "spip_fond_login.jpg";
665
+	$logo_bg = _DIR_IMG."spip_fond_login.jpg";
666 666
 	if (file_exists($logo_bg)) {
667 667
 		include_spip('inc/filtres_images_mini');
668 668
 		$logo_mini = image_reduire($logo_bg, 64, 64);
Please login to merge, or discard this patch.
ecrire/inc/install.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  * @return void
43 43
  **/
44 44
 function install_fichier_connexion($nom, $texte) {
45
-	$texte = '<' . "?php\n"
45
+	$texte = '<'."?php\n"
46 46
 		. "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n"
47 47
 		. $texte;
48 48
 
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 		return $regs;
115 115
 	} else {
116 116
 		$ar = '\s*\'([^\']*)\'';
117
-		$r = '\s*,' . $ar;
117
+		$r = '\s*,'.$ar;
118 118
 		$r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#";
119 119
 		if (preg_match($r, $s, $regs)) {
120
-			$regs[2] = $regs[1] . (!$regs[2] ? '' : ':' . $regs[2] . ';');
120
+			$regs[2] = $regs[1].(!$regs[2] ? '' : ':'.$regs[2].';');
121 121
 			array_shift($regs);
122 122
 			array_shift($regs);
123 123
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	// Si on n'a pas la bonne version de PHP, c'est la fin
183 183
 	if ($err) {
184 184
 		die("<div class='error'>"
185
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"
185
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"
186 186
 			. "<li><strong>{$err[0]}</strong></li>\n</ul></div>");
187 187
 	}
188 188
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 	if ($err) {
204 204
 		echo "<div class='error'>"
205
-			. '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>";
205
+			. '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>";
206 206
 		foreach ($err as $e) {
207 207
 			echo "<li><strong>$e</strong></li>\n";
208 208
 		}
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 
216 216
 
217 217
 function info_etape($titre, $complement = '') {
218
-	return '<h2>' . $titre . "</h2>\n" .
219
-	($complement ? '' . $complement . "\n" : '');
218
+	return '<h2>'.$titre."</h2>\n".
219
+	($complement ? ''.$complement."\n" : '');
220 220
 }
221 221
 
222 222
 /**
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
 		$code = _T('bouton_suivant');
231 231
 	}
232 232
 	static $suivant = 0;
233
-	$id = 'suivant' . (($suivant > 0) ? strval($suivant) : '');
233
+	$id = 'suivant'.(($suivant > 0) ? strval($suivant) : '');
234 234
 	$suivant += 1;
235 235
 
236
-	return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" .
237
-	$code .
236
+	return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"".
237
+	$code.
238 238
 	" >>\" /></p>\n";
239 239
 }
240 240
 
241 241
 function info_progression_etape($en_cours, $phase, $dir, $erreur = false) {
242 242
 	$intitule_etat = [];
243 243
 
244
-	$liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$');
244
+	$liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$');
245 245
 	$debut = 1;
246 246
 	$last = count($liste);
247 247
 
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
 			}
277 277
 
278 278
 			$aff_etapes .= "<li class='$class'><div class='fond'>";
279
-			$aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
280
-			$aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</'.(($debut == $en_cours) ? 'strong' : 'span').'>';
279
+			$aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em>&nbsp;: </em>";
280
+			$aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>';
281 281
 			$aff_etapes .= '</div></li>';
282 282
 		}
283 283
 		$debut++;
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
 
290 290
 
291 291
 function fieldset($legend, $champs = [], $apres = '', $avant = '') {
292
-	return "<fieldset>\n" .
293
-	$avant .
294
-	($legend ? '<legend>' . $legend . "</legend>\n" : '') .
295
-	fieldset_champs($champs) .
296
-	$apres .
292
+	return "<fieldset>\n".
293
+	$avant.
294
+	($legend ? '<legend>'.$legend."</legend>\n" : '').
295
+	fieldset_champs($champs).
296
+	$apres.
297 297
 	"</fieldset>\n";
298 298
 }
299 299
 
@@ -303,18 +303,18 @@  discard block
 block discarded – undo
303 303
 		$type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text');
304 304
 		$class = isset($contenu['hidden']) ? '' : "class='formo' size='40' ";
305 305
 		if (isset($contenu['alternatives'])) {
306
-			$fieldset .= $contenu['label'] . "\n";
306
+			$fieldset .= $contenu['label']."\n";
307 307
 			foreach ($contenu['alternatives'] as $valeur => $label) {
308
-				$fieldset .= "<input type='radio' name='" . $nom .
308
+				$fieldset .= "<input type='radio' name='".$nom.
309 309
 					"' id='$nom-$valeur' value='$valeur'"
310 310
 					. (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '')
311 311
 					. "/>\n";
312
-				$fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n";
312
+				$fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n";
313 313
 			}
314 314
 			$fieldset .= "<br />\n";
315 315
 		} else {
316
-			$fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n";
317
-			$fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'"
316
+			$fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n";
317
+			$fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'"
318 318
 				. (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '')
319 319
 				. ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '')
320 320
 				. " />\n";
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
 function install_select_serveur() {
328 328
 	$options = [];
329
-	$dir = _DIR_RESTREINT . 'req/';
329
+	$dir = _DIR_RESTREINT.'req/';
330 330
 	$d = opendir($dir);
331 331
 	if (!$d) {
332 332
 		return [];
@@ -334,17 +334,17 @@  discard block
 block discarded – undo
334 334
 	while (($f = readdir($d)) !== false) {
335 335
 		if (
336 336
 			(preg_match('/^(.*)[.]php$/', $f, $s))
337
-			and is_readable($f = $dir . $f)
337
+			and is_readable($f = $dir.$f)
338 338
 		) {
339 339
 			require_once($f);
340 340
 			$s = $s[1];
341
-			$v = 'spip_versions_' . $s;
341
+			$v = 'spip_versions_'.$s;
342 342
 			if (function_exists($v) and $v()) {
343 343
 				$titre = _T("install_select_type_$s");
344 344
 				// proposer mysql par defaut si dispo
345 345
 				$checked = ($s == 'mysql' ? " checked='checked'" : '');
346 346
 				$options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>"
347
-					. "<label for='$s'>" . ($titre ?: $s) . '</label></li>';
347
+					. "<label for='$s'>".($titre ?: $s).'</label></li>';
348 348
 			} else {
349 349
 				spip_log("$s: portage indisponible");
350 350
 			}
@@ -362,8 +362,8 @@  discard block
 block discarded – undo
362 362
 		"\n<input type='hidden' name='etape' value='$etape' />"
363 363
 		. $hidden
364 364
 		. (_request('echec') ?
365
-			('<p><b>' . _T('avis_connexion_echec_1') .
366
-				'</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>')
365
+			('<p><b>'._T('avis_connexion_echec_1').
366
+				'</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>')
367 367
 			: '')
368 368
 
369 369
 		. ($jquery ? http_script('', 'jquery.js') : '')
@@ -401,9 +401,9 @@  discard block
 block discarded – undo
401 401
 		});')
402 402
 
403 403
 		. ($server_db
404
-			? '<input type="hidden" name="server_db" value="' . $server_db . '" />'
404
+			? '<input type="hidden" name="server_db" value="'.$server_db.'" />'
405 405
 			. (($predef[0])
406
-				? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>')
406
+				? ('<h3>'._T('install_serveur_hebergeur').'</h3>')
407 407
 				: '')
408 408
 			: ('<fieldset><legend>'
409 409
 				. _T('install_select_type_db')
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
 				. "\n</ul>\n</div></fieldset>")
419 419
 		)
420 420
 		. '<div id="install_adresse_base_hebergeur">'
421
-		. '<p>' . _T('texte_connexion_mysql') . '</p>'
421
+		. '<p>'._T('texte_connexion_mysql').'</p>'
422 422
 		. ($predef[1]
423
-			? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>'
423
+			? '<h3>'._T('install_adresse_base_hebergeur').'</h3>'
424 424
 			: fieldset(
425 425
 				_T('entree_base_donnee_1'),
426 426
 				[
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
 		. '<div id="install_login_base_hebergeur">'
437 437
 		. ($predef[2]
438
-			? '<h3>' . _T('install_login_base_hebergeur') . '</h3>'
438
+			? '<h3>'._T('install_login_base_hebergeur').'</h3>'
439 439
 			: fieldset(
440 440
 				_T('entree_login_connexion_1'),
441 441
 				[
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 
451 451
 		. '<div id="install_pass_base_hebergeur">'
452 452
 		. ($predef[3]
453
-			? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>'
453
+			? '<h3>'._T('install_pass_base_hebergeur').'</h3>'
454 454
 			: fieldset(
455 455
 				_T('entree_mot_passe_1'),
456 456
 				[
@@ -472,20 +472,20 @@  discard block
 block discarded – undo
472 472
 function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) {
473 473
 	return ((defined('_INSTALL_HOST_DB'))
474 474
 		? ''
475
-		: "\n<input type='hidden' name='adresse_db'  value=\"" . spip_htmlspecialchars($adresse_db) . '" />'
475
+		: "\n<input type='hidden' name='adresse_db'  value=\"".spip_htmlspecialchars($adresse_db).'" />'
476 476
 	)
477 477
 	. ((defined('_INSTALL_USER_DB'))
478 478
 		? ''
479
-		: "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />'
479
+		: "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />'
480 480
 	)
481 481
 	. ((defined('_INSTALL_PASS_DB'))
482 482
 		? ''
483
-		: "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />'
483
+		: "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />'
484 484
 	)
485 485
 
486 486
 	. ((defined('_INSTALL_SERVER_DB'))
487 487
 		? ''
488
-		: "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />'
488
+		: "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />'
489 489
 	);
490 490
 }
491 491
 
Please login to merge, or discard this patch.
ecrire/src/Afficher/Minipage/AbstractPage.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$page_title = (isset($options['page_title']) ? $options['page_title'] : $GLOBALS['meta']['nom_site']);
65 65
 		$doctype = (isset($options['doctype']) ? $options['doctype'] : "<!DOCTYPE html>");
66
-		$doctype = trim($doctype) . "\n";
66
+		$doctype = trim($doctype)."\n";
67 67
 		$charset = (isset($options['charset']) ? $options['charset'] : "utf-8");
68 68
 		$all_inline = (isset($options['all_inline']) ? $options['all_inline'] : true);
69 69
 		$onLoad = (isset($options['onLoad']) ? $options['onLoad'] : '');
70 70
 		if ($onLoad) {
71
-			$onLoad = ' onload="' . attribut_html($onLoad) . '"';
71
+			$onLoad = ' onload="'.attribut_html($onLoad).'"';
72 72
 		}
73 73
 
74 74
 		# envoyer le charset
75 75
 		if (!headers_sent()) {
76
-			header('Content-Type: text/html; charset=' . $charset);
76
+			header('Content-Type: text/html; charset='.$charset);
77 77
 		}
78 78
 
79 79
 		$css = '';
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			. "--minipage-color-theme--s: $s;"
95 95
 			. "--minipage-color-theme--l: $l;}";
96 96
 		$vars = file_get_contents(find_in_theme('minipage.vars.css'));
97
-		$inline .= "\n" . trim($vars);
97
+		$inline .= "\n".trim($vars);
98 98
 		if (function_exists('minifier')) {
99 99
 			$inline = minifier($inline, 'css');
100 100
 		}
@@ -121,31 +121,31 @@  discard block
 block discarded – undo
121 121
 			}
122 122
 			$css = "$inline\n$css";
123 123
 			if (!empty($options['css'])) {
124
-				$css .= "\n" . $options['css'];
124
+				$css .= "\n".$options['css'];
125 125
 			}
126 126
 			$css = "<style type='text/css'>$css</style>";
127 127
 		} else {
128 128
 			$css = "<style type='text/css'>$inline</style>";
129 129
 			foreach ($files as $name) {
130 130
 				$file = timestamp(direction_css($name));
131
-				$css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n";
131
+				$css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n";
132 132
 			}
133 133
 			if (!empty($options['css'])) {
134
-				$css .= "<style type='text/css'>" . $options['css'] . "</style>";
134
+				$css .= "<style type='text/css'>".$options['css']."</style>";
135 135
 			}
136 136
 		}
137 137
 
138
-		return $doctype .
139
-			html_lang_attributes() .
140
-			"<head>\n" .
141
-			'<title>' .
142
-			textebrut($page_title) .
143
-			"</title>\n" .
144
-			"<meta name=\"viewport\" content=\"width=device-width\" />\n" .
145
-			$css .
146
-			(empty($options['head']) ? "" : $options['head']) .
147
-			"</head>\n" .
148
-			"<body{$onLoad} class=\"minipage" . ($this::TYPE ? ' minipage--' . $this::TYPE : '') . "\">\n" .
138
+		return $doctype.
139
+			html_lang_attributes().
140
+			"<head>\n".
141
+			'<title>'.
142
+			textebrut($page_title).
143
+			"</title>\n".
144
+			"<meta name=\"viewport\" content=\"width=device-width\" />\n".
145
+			$css.
146
+			(empty($options['head']) ? "" : $options['head']).
147
+			"</head>\n".
148
+			"<body{$onLoad} class=\"minipage".($this::TYPE ? ' minipage--'.$this::TYPE : '')."\">\n".
149 149
 			"\t<div class=\"minipage-bloc\">\n";
150 150
 	}
151 151
 
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	protected function ouvreCorps($options = []) {
158 158
 		$url_site = url_de_base();
159
-		$header = "<header>\n" .
160
-			"<h1><a href=\"" . attribut_html($url_site) . "\">" . interdire_scripts($GLOBALS['meta']['nom_site'] ?? '') . "</a></h1>\n";
159
+		$header = "<header>\n".
160
+			"<h1><a href=\"".attribut_html($url_site)."\">".interdire_scripts($GLOBALS['meta']['nom_site'] ?? '')."</a></h1>\n";
161 161
 
162 162
 		$titre = (isset($options['titre']) ? $options['titre'] : '');
163 163
 		if ($titre) {
164
-			$header .= "<h2>" . interdire_scripts($titre) . "</h2>";
164
+			$header .= "<h2>".interdire_scripts($titre)."</h2>";
165 165
 		}
166 166
 		$header .= "</header>";
167 167
 
168
-		return $header . "<div class='corps'>\n";
168
+		return $header."<div class='corps'>\n";
169 169
 	}
170 170
 
171 171
 	/**
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
 		if (isset($options['footer'])) {
180 180
 			$footer = $options['footer'];
181 181
 		} else {
182
-			$footer = "<a href=\"" . attribut_html($url_site) . "\">" . _T('retour') . "</a>\n";
182
+			$footer = "<a href=\"".attribut_html($url_site)."\">"._T('retour')."</a>\n";
183 183
 		}
184 184
 		if (!empty($footer)) {
185 185
 			$footer = "<footer>\n{$footer}</footer>";
186 186
 		}
187 187
 
188
-		return "</div>\n" . $footer;
188
+		return "</div>\n".$footer;
189 189
 	}
190 190
 
191 191
 
Please login to merge, or discard this patch.