Completed
Push — master ( abdc2a...4fc560 )
by cam
02:15
created
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/Admin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 			$titre = ($titre == 'install')
106 106
 				? _T('avis_espace_interdit')
107
-				: $titre . '&nbsp;: ' . _T('info_acces_interdit');
107
+				: $titre.'&nbsp;: '._T('info_acces_interdit');
108 108
 
109 109
 			$statut = $GLOBALS['visiteur_session']['statut'] ?? '';
110 110
 			$nom = $GLOBALS['visiteur_session']['nom'] ?? '';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				$footer = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site'] ?? '');
124 124
 			}
125 125
 
126
-			spip_log($nom . " $titre " . $_SERVER['REQUEST_URI'], 'minipres');
126
+			spip_log($nom." $titre ".$_SERVER['REQUEST_URI'], 'minipres');
127 127
 
128 128
 			$options['footer'] = $footer;
129 129
 			if (empty($corps)) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 			foreach ($_POST as $v => $c) {
155 155
 				$url = parametre_url($url, $v, $c, '&');
156 156
 			}
157
-			ajax_retour('<div>' . $titre . redirige_formulaire($url) . '</div>', false);
157
+			ajax_retour('<div>'.$titre.redirige_formulaire($url).'</div>', false);
158 158
 			return '';
159 159
 		}
160 160
 	}
Please login to merge, or discard this patch.