Completed
Push — master ( 4fa0dc...b74578 )
by cam
01:19
created
ecrire/install/etape_3b.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,17 +86,17 @@  discard block
 block discarded – undo
86 86
 		$cles = \Spip\Chiffrer\SpipCles::instance();
87 87
 		$secret = $cles->getSecretAuth();
88 88
 
89
-		$id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login=' . sql_quote($login));
89
+		$id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login='.sql_quote($login));
90 90
 		if ($id_auteur !== null) {
91 91
 			// c'est un auteur connu : si on a pas de secret il faut absolument qu'il se reconnecte avec le meme mot de passe
92 92
 			// pour restaurer la copie des cles
93 93
 			if (!$secret && !auth_spip_initialiser_secret()) {
94
-				$row = sql_fetsel('backup_cles, pass', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur);
94
+				$row = sql_fetsel('backup_cles, pass', 'spip_auteurs', 'id_auteur='.(int) $id_auteur);
95 95
 				if (empty($row['backup_cles']) || !$cles->restore($row['backup_cles'], $pass, $row['pass'], $id_auteur)) {
96 96
 					$echec = _T('avis_connexion_erreur_fichier_cle_manquant_1');
97 97
 					echouer_etape_3b($echec);
98 98
 				}
99
-				spip_log("Les cles secretes ont ete restaurées avec le backup du webmestre #$id_auteur", 'auth' . _LOG_INFO_IMPORTANTE);
99
+				spip_log("Les cles secretes ont ete restaurées avec le backup du webmestre #$id_auteur", 'auth'._LOG_INFO_IMPORTANTE);
100 100
 				$cles->save();
101 101
 			}
102 102
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 				'email' => $email,
106 106
 				'login' => $login,
107 107
 				'statut' => '0minirezo'
108
-			], 'id_auteur=' . (int) $id_auteur);
108
+			], 'id_auteur='.(int) $id_auteur);
109 109
 			// le passer webmestre separement du reste, au cas ou l'alter n'aurait pas fonctionne
110 110
 			@sql_updateq('spip_auteurs', ['webmestre' => 'oui'], "id_auteur=$id_auteur");
111 111
 			if (!auth_spip_modifier_pass($login, $pass, $id_auteur)) {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		include_spip('inc/auth');
146 146
 		$auteur = auth_identifier_login($login, $pass);
147 147
 		if (!$auteur || !auth_loger($auteur)) {
148
-			spip_log("login automatique impossible $auth_spip $session" . (is_countable($row) ? count($row) : 0));
148
+			spip_log("login automatique impossible $auth_spip $session".(is_countable($row) ? count($row) : 0));
149 149
 		}
150 150
 	}
151 151
 
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 function echouer_etape_3b($echec) {
168 168
 	echo minipres(
169 169
 		'AUTO',
170
-		info_progression_etape(3, 'etape_', 'install/', true) .
171
-		"<div class='error'><h3>$echec</h3>\n" .
172
-		'<p>' . _T('avis_connexion_echec_2') . '</p>' .
170
+		info_progression_etape(3, 'etape_', 'install/', true).
171
+		"<div class='error'><h3>$echec</h3>\n".
172
+		'<p>'._T('avis_connexion_echec_2').'</p>'.
173 173
 		'</div>'
174 174
 	);
175 175
 	exit;
Please login to merge, or discard this patch.
ecrire/install/etape_ldap4.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 	if ($fail) {
40 40
 		echo info_etape(_T('info_chemin_acces_annuaire')),
41 41
 		info_progression_etape(3, 'etape_ldap', 'install/', true),
42
-			"<div class='error'><p><b>" . _T('avis_operation_echec') . '</b></p><p>' . _T('avis_chemin_invalide_1'),
43
-			' (<tt>' . spip_htmlspecialchars($base_ldap) . '</tt>) ' . _T('avis_chemin_invalide_2') . '</p></div>';
42
+			"<div class='error'><p><b>"._T('avis_operation_echec').'</b></p><p>'._T('avis_chemin_invalide_1'),
43
+			' (<tt>'.spip_htmlspecialchars($base_ldap).'</tt>) '._T('avis_chemin_invalide_2').'</p></div>';
44 44
 	} else {
45 45
 		info_etape(_T('info_reglage_ldap'));
46 46
 		echo info_progression_etape(4, 'etape_ldap', 'install/');
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 
54 54
 		$res = install_propager(['adresse_ldap', 'port_ldap', 'login_ldap', 'pass_ldap', 'protocole_ldap', 'tls_ldap'])
55 55
 			. "<input type='hidden' name='etape' value='ldap5' />"
56
-			. "<input type='hidden' name='base_ldap' value='" . spip_htmlentities($base_ldap) . "' />"
56
+			. "<input type='hidden' name='base_ldap' value='".spip_htmlentities($base_ldap)."' />"
57 57
 			. fieldset(
58 58
 				_T('info_statut_utilisateurs_1'),
59 59
 				[
60 60
 					'statut_ldap' => [
61
-						'label' => _T('info_statut_utilisateurs_2') . '<br />',
61
+						'label' => _T('info_statut_utilisateurs_2').'<br />',
62 62
 						'valeur' => $statut_ldap,
63 63
 						'alternatives' => $statuts
64 64
 					]
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 
76 76
 function liste_statuts_ldap() {
77 77
 	$recom = [
78
-		'info_administrateurs' => ('<b>' . _T('info_administrateur_1') . '</b> ' . _T('info_administrateur_2') . '<br />'),
79
-		'info_redacteurs' => ('<b>' . _T('info_redacteur_1') . '</b> ' . _T('info_redacteur_2') . '<br />'),
80
-		'info_visiteurs' => ('<b>' . _T('info_visiteur_1') . '</b> ' . _T('info_visiteur_2') . '<br />')
78
+		'info_administrateurs' => ('<b>'._T('info_administrateur_1').'</b> '._T('info_administrateur_2').'<br />'),
79
+		'info_redacteurs' => ('<b>'._T('info_redacteur_1').'</b> '._T('info_redacteur_2').'<br />'),
80
+		'info_visiteurs' => ('<b>'._T('info_visiteur_1').'</b> '._T('info_visiteur_2').'<br />')
81 81
 	];
82 82
 
83 83
 	$res = [];
@@ -93,13 +93,13 @@  discard block
 block discarded – undo
93 93
 function install_ldap_correspondances() {
94 94
 	$champs = [];
95 95
 	foreach (is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [] as $champ => $v) {
96
-		$nom = 'ldap_' . $champ;
96
+		$nom = 'ldap_'.$champ;
97 97
 		$val = is_array($v) ? implode(',', $v) : (string) $v;
98 98
 		$champs[$nom] = [
99
-			'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]) . '<br />',
99
+			'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]).'<br />',
100 100
 			'valeur' => $val
101 101
 		];
102 102
 	}
103 103
 
104
-	return $champs ? fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2') . '<br /><br />') : '';
104
+	return $champs ? fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2').'<br /><br />') : '';
105 105
 }
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,19 +154,19 @@  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') || $GLOBALS['table_prefix'] != 'spip')
167
-			? '<h3>' . _T('install_table_prefix_hebergeur') . '  <tt>' . $GLOBALS['table_prefix'] . '</tt>' . '</h3>'
168
-			: '<fieldset><legend>' . _T('texte_choix_table_prefix') . "</legend>\n"
169
-			. "<p><label for='table_prefix'>" . _T('info_table_prefix') . '</label></p><p>'
167
+			? '<h3>'._T('install_table_prefix_hebergeur').'  <tt>'.$GLOBALS['table_prefix'].'</tt>'.'</h3>'
168
+			: '<fieldset><legend>'._T('texte_choix_table_prefix')."</legend>\n"
169
+			. "<p><label for='table_prefix'>"._T('info_table_prefix').'</label></p><p>'
170 170
 			. "\n<input type='text' id='tprefix' name='tprefix' class='text' value='"
171 171
 			. 'spip' # valeur par defaut
172 172
 			. "' size='20' /></p></fieldset>"
Please login to merge, or discard this patch.
ecrire/install/etape_ldap5.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,29 +51,28 @@  discard block
 block discarded – undo
51 51
 	$conn = "\$GLOBALS['ldap_base'] = '$base_ldap';\n"
52 52
 		. "\$GLOBALS['ldap_link'] = @ldap_connect('$adresse_ldap','$port_ldap');\n"
53 53
 		. "@ldap_set_option(\$GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'$protocole_ldap');\n"
54
-		. (($tls_ldap != 'oui') ? '' :
55
-			"@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
54
+		. (($tls_ldap != 'oui') ? '' : "@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
56 55
 		. "@ldap_bind(\$GLOBALS['ldap_link'],'$login_ldap','$pass_ldap');\n";
57 56
 
58 57
 	$champs = is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [];
59 58
 	$res = '';
60 59
 	foreach (array_keys($champs) as $champ) {
61
-		$nom = 'ldap_' . $champ;
60
+		$nom = 'ldap_'.$champ;
62 61
 		$val = trim(_request($nom));
63 62
 		if (preg_match('/^\w*$/', $val)) {
64 63
 			if ($val) {
65 64
 				$val = _q($val);
66 65
 			}
67 66
 		} else {
68
-			$val = 'array(' . _q(preg_split('/\W+/', $val)) . ')';
67
+			$val = 'array('._q(preg_split('/\W+/', $val)).')';
69 68
 		};
70 69
 		if ($val) {
71
-			$res .= "'$champ' => " . $val . ',';
70
+			$res .= "'$champ' => ".$val.',';
72 71
 		}
73 72
 	}
74 73
 	$conn .= "\$GLOBALS['ldap_champs'] = array($res);\n";
75 74
 
76
-	install_fichier_connexion(_DIR_CONNECT . _FILE_LDAP, $conn);
75
+	install_fichier_connexion(_DIR_CONNECT._FILE_LDAP, $conn);
77 76
 }
78 77
 
79 78
 function etape_ldap5_suite() {
@@ -86,7 +85,7 @@  discard block
 block discarded – undo
86 85
 	);
87 86
 
88 87
 	echo generer_form_ecrire('install', (
89
-		"<input type='hidden' name='etape' value='3' />" .
88
+		"<input type='hidden' name='etape' value='3' />".
90 89
 		"<input type='hidden' name='ldap_present' value='true' />"
91 90
 		. bouton_suivant()));
92 91
 
Please login to merge, or discard this patch.
ecrire/install/etape_chmod.php 1 patch
Spacing   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$test_dir .= '/';
77 77
 		}
78 78
 		if (!in_array($test_dir, $GLOBALS['test_dirs'])) {
79
-			$GLOBALS['test_dirs'][] = _DIR_RACINE . $test_dir;
79
+			$GLOBALS['test_dirs'][] = _DIR_RACINE.$test_dir;
80 80
 		}
81 81
 	} else {
82 82
 		if (!_FILE_CONNECT) {
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
 	foreach ($GLOBALS['test_dirs'] as $i => $my_dir) {
92 92
 		$test = test_ecrire($my_dir);
93 93
 		if (!$test) {
94
-			$m = preg_replace(',^' . _DIR_RACINE . ',', '', $my_dir);
94
+			$m = preg_replace(',^'._DIR_RACINE.',', '', $my_dir);
95 95
 			if (@file_exists($my_dir)) {
96
-				$bad_dirs['<li>' . $m . '</li>'] = 1;
96
+				$bad_dirs['<li>'.$m.'</li>'] = 1;
97 97
 			} else {
98
-				$absent_dirs['<li>' . $m . '</li>'] = 1;
98
+				$absent_dirs['<li>'.$m.'</li>'] = 1;
99 99
 			}
100 100
 		} else {
101 101
 			$chmod = max($chmod, $test);
@@ -105,21 +105,21 @@  discard block
 block discarded – undo
105 105
 	if ($bad_dirs || $absent_dirs) {
106 106
 		if (!_FILE_CONNECT) {
107 107
 			$titre = _T('dirs_preliminaire');
108
-			$continuer = ' ' . _T('dirs_commencer') . '.';
108
+			$continuer = ' '._T('dirs_commencer').'.';
109 109
 		} else {
110 110
 			$titre = _T('dirs_probleme_droits');
111 111
 		}
112 112
 
113 113
 
114
-		$res = "<div align='right'>" . menu_langues('var_lang_ecrire') . "</div>\n";
114
+		$res = "<div align='right'>".menu_langues('var_lang_ecrire')."</div>\n";
115 115
 
116 116
 		if ($bad_dirs) {
117 117
 			$res .=
118 118
 				_T(
119 119
 					'dirs_repertoires_suivants',
120 120
 					['bad_dirs' => implode("\n", array_keys($bad_dirs))]
121
-				) .
122
-				'<b>' . _T('login_recharger') . '</b>.';
121
+				).
122
+				'<b>'._T('login_recharger').'</b>.';
123 123
 		}
124 124
 
125 125
 		if ($absent_dirs) {
@@ -127,22 +127,21 @@  discard block
 block discarded – undo
127 127
 				_T(
128 128
 					'dirs_repertoires_absents',
129 129
 					['bad_dirs' => implode("\n", array_keys($absent_dirs))]
130
-				) .
131
-				'<b>' . _T('login_recharger') . '</b>.';
130
+				).
131
+				'<b>'._T('login_recharger').'</b>.';
132 132
 		}
133
-		$res = '<p>' . $continuer . $res . aider('install0', true) . '</p>';
133
+		$res = '<p>'.$continuer.$res.aider('install0', true).'</p>';
134 134
 
135 135
 		$t = _T('login_recharger');
136
-		$t = ($test_dir ? "<input type='hidden' name='test_dir' value='" . spip_htmlspecialchars($test_dir, ENT_QUOTES) . "' />" :
137
-				'')
136
+		$t = ($test_dir ? "<input type='hidden' name='test_dir' value='".spip_htmlspecialchars($test_dir, ENT_QUOTES)."' />" : '')
138 137
 			. "<input type='hidden' name='etape' value='chmod' />"
139
-			. "<div style='text-align: right'><input type='submit' value='" . attribut_html($t) . "' /></div>";
138
+			. "<div style='text-align: right'><input type='submit' value='".attribut_html($t)."' /></div>";
140 139
 
141
-		echo minipres($titre, $res . generer_form_ecrire('install', $t));
140
+		echo minipres($titre, $res.generer_form_ecrire('install', $t));
142 141
 	} else {
143 142
 		$deja = (_FILE_CONNECT && analyse_fichier_connection(_FILE_CONNECT));
144 143
 		if (!$deja) {
145
-			redirige_url_ecrire('install', 'etape=1&chmod=' . $chmod);
144
+			redirige_url_ecrire('install', 'etape=1&chmod='.$chmod);
146 145
 		} else {
147 146
 			redirige_url_ecrire();
148 147
 		}
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)) {
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
 			ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap);
57 57
 		}
58 58
 		if ($tls && !ldap_start_tls($ldap_link)) {
59
-			$erreur = 'ldap_start_tls(' . spip_htmlspecialchars($ldap_link)
60
-				. ' ' . spip_htmlspecialchars($adresse_ldap)
61
-				. ', ' . spip_htmlspecialchars($port_ldap) . ')';
59
+			$erreur = 'ldap_start_tls('.spip_htmlspecialchars($ldap_link)
60
+				. ' '.spip_htmlspecialchars($adresse_ldap)
61
+				. ', '.spip_htmlspecialchars($port_ldap).')';
62 62
 			$ldap_link = false;
63 63
 		}
64 64
 		if ($ldap_link) {
65 65
 			$ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap);
66
-			$erreur = "ldap_bind('" . spip_htmlspecialchars($ldap_link)
67
-				. "', '" . spip_htmlspecialchars($login_ldap)
68
-				. "', '" . spip_htmlspecialchars($pass_ldap)
69
-				. "'): " . spip_htmlspecialchars($adresse_ldap)
70
-				. ', ' . spip_htmlspecialchars($port_ldap);
66
+			$erreur = "ldap_bind('".spip_htmlspecialchars($ldap_link)
67
+				. "', '".spip_htmlspecialchars($login_ldap)
68
+				. "', '".spip_htmlspecialchars($pass_ldap)
69
+				. "'): ".spip_htmlspecialchars($adresse_ldap)
70
+				. ', '.spip_htmlspecialchars($port_ldap);
71 71
 		}
72 72
 	}
73 73
 
@@ -75,22 +75,22 @@  discard block
 block discarded – undo
75 75
 		echo info_etape(
76 76
 			_T('titre_connexion_ldap'),
77 77
 			info_progression_etape(2, 'etape_ldap', 'install/')
78
-		),  _T('info_connexion_ldap_ok');
78
+		), _T('info_connexion_ldap_ok');
79 79
 		echo generer_form_ecrire('install', (
80 80
 			"\n<input type='hidden' name='etape' value='ldap3' />"
81
-			. "\n<input type='hidden' name='adresse_ldap' value=\"" . spip_htmlspecialchars($adresse_ldap) . '" />'
82
-			. "\n<input type='hidden' name='port_ldap' value=\"" . spip_htmlspecialchars($port_ldap) . '" />'
83
-			. "\n<input type='hidden' name='login_ldap' value=\"" . spip_htmlspecialchars($login_ldap) . '" />'
84
-			. "\n<input type='hidden' name='pass_ldap' value=\"" . spip_htmlspecialchars($pass_ldap) . '" />'
85
-			. "\n<input type='hidden' name='protocole_ldap' value=\"" . spip_htmlspecialchars($protocole_ldap) . '" />'
86
-			. "\n<input type='hidden' name='tls_ldap' value=\"" . spip_htmlspecialchars($tls_ldap) . '" />'
81
+			. "\n<input type='hidden' name='adresse_ldap' value=\"".spip_htmlspecialchars($adresse_ldap).'" />'
82
+			. "\n<input type='hidden' name='port_ldap' value=\"".spip_htmlspecialchars($port_ldap).'" />'
83
+			. "\n<input type='hidden' name='login_ldap' value=\"".spip_htmlspecialchars($login_ldap).'" />'
84
+			. "\n<input type='hidden' name='pass_ldap' value=\"".spip_htmlspecialchars($pass_ldap).'" />'
85
+			. "\n<input type='hidden' name='protocole_ldap' value=\"".spip_htmlspecialchars($protocole_ldap).'" />'
86
+			. "\n<input type='hidden' name='tls_ldap' value=\"".spip_htmlspecialchars($tls_ldap).'" />'
87 87
 			. bouton_suivant()));
88 88
 	} else {
89 89
 		echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true),
90
-			"<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . '</p>',
91
-			'<p>' . _T('avis_connexion_ldap_echec_2') .
92
-			"<br />\n" . _T('avis_connexion_ldap_echec_3') .
93
-			'<br /><br />' . $erreur . '<b> ?</b></p></div>';
90
+			"<div class='error'><p>"._T('avis_connexion_ldap_echec_1').'</p>',
91
+			'<p>'._T('avis_connexion_ldap_echec_2').
92
+			"<br />\n"._T('avis_connexion_ldap_echec_3').
93
+			'<br /><br />'.$erreur.'<b> ?</b></p></div>';
94 94
 	}
95 95
 
96 96
 	echo $minipage->installFinPage();
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 ? (double)$r['valeur'] : 0;
149
+		$version_installee = $r ? (double) $r['valeur'] : 0;
150 150
 		if (!$version_installee || $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/public.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	if (!defined('_DIR_RESTREINT_ABS')) {
30 30
 		if (
31 31
 			defined('_DIR_RESTREINT')
32
-			&& @file_exists(_ROOT_RESTREINT . 'inc_version.php')
32
+			&& @file_exists(_ROOT_RESTREINT.'inc_version.php')
33 33
 		) {
34
-			include_once _ROOT_RESTREINT . 'inc_version.php';
34
+			include_once _ROOT_RESTREINT.'inc_version.php';
35 35
 		} else {
36 36
 			die('inc_version absent ?');
37 37
 		}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		} // fond demande dans l'url par page=xxxx ?
43 43
 		else {
44 44
 			if (isset($_GET[_SPIP_PAGE])) {
45
-				$fond = (string)$_GET[_SPIP_PAGE];
45
+				$fond = (string) $_GET[_SPIP_PAGE];
46 46
 
47 47
 				// Securite
48 48
 				if (
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			// lancer les taches sur affichage final, comme le cron
102 102
 			// mais sans rien afficher
103 103
 			$GLOBALS['html'] = false; // ne rien afficher
104
-			pipeline('affichage_final' . _PIPELINE_SUFFIX, '');
104
+			pipeline('affichage_final'._PIPELINE_SUFFIX, '');
105 105
 			exit; // le hit est fini !
106 106
 		}
107 107
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	// Content-Type ?
119 119
 	if (!isset($page['entetes']['Content-Type'])) {
120 120
 		$charset = $GLOBALS['meta']['charset'] ?? 'utf-8';
121
-		$page['entetes']['Content-Type'] = 'text/html; charset=' . $charset;
121
+		$page['entetes']['Content-Type'] = 'text/html; charset='.$charset;
122 122
 		$html = true;
123 123
 	} else {
124 124
 		$html = preg_match(',^\s*text/html,', $page['entetes']['Content-Type']);
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 
145 145
 	// traitements sur les entetes avant envoi
146 146
 	// peut servir pour le plugin de stats
147
-	$page['entetes'] = pipeline('affichage_entetes_final' . _PIPELINE_SUFFIX, $page['entetes']);
147
+	$page['entetes'] = pipeline('affichage_entetes_final'._PIPELINE_SUFFIX, $page['entetes']);
148 148
 
149 149
 
150 150
 	// eval $page et affecte $res
151
-	include _ROOT_RESTREINT . 'public/evaluer_page.php';
151
+	include _ROOT_RESTREINT.'public/evaluer_page.php';
152 152
 	envoyer_entetes($page['entetes']);
153 153
 	if ($res === false) {
154 154
 		include_spip('inc/autoriser');
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	//
168 168
 	// (c'est ici qu'on fait var_recherche, validation, boutons d'admin,
169 169
 	// cf. public/assembler.php)
170
-	echo pipeline('affichage_final' . _PIPELINE_SUFFIX, $page['texte']);
170
+	echo pipeline('affichage_final'._PIPELINE_SUFFIX, $page['texte']);
171 171
 
172 172
 	if ($lang) {
173 173
 		lang_select();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		if ($html && ($affiche_boutons_admin || $debug)) {
184 184
 			$var_mode_affiche = _request('var_mode_affiche');
185 185
 			$var_mode_objet = _request('var_mode_objet');
186
-			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet . 'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
186
+			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet.'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
187 187
 			echo erreur_squelette(false);
188 188
 		}
189 189
 	} else {
Please login to merge, or discard this patch.
ecrire/public/cacher.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 function generer_nom_fichier_cache($contexte, $page) {
27 27
 	$u = md5(var_export([$contexte, $page], true));
28 28
 
29
-	return $u . '.cache';
29
+	return $u.'.cache';
30 30
 }
31 31
 
32 32
 /**
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 	}
59 59
 	else {
60 60
 		// en lecture on essaye pas de creer les repertoires, on va au plus vite
61
-		$rep = _DIR_CACHE . "calcul/$d/";
61
+		$rep = _DIR_CACHE."calcul/$d/";
62 62
 	}
63 63
 
64
-	return $rep . $u . '.cache';
64
+	return $rep.$u.'.cache';
65 65
 }
66 66
 
67 67
 /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		);
114 114
 	}
115 115
 
116
-	return crc32($GLOBALS['meta']['cache_signature'] . $page['texte']);
116
+	return crc32($GLOBALS['meta']['cache_signature'].$page['texte']);
117 117
 }
118 118
 
119 119
 /**
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 		// "cache sessionne" ; sa date indique la date de validite
264 264
 		// des caches sessionnes
265 265
 		if (!$tmp = lire_cache($chemin_cache)) {
266
-			spip_log('Creation cache sessionne ' . $chemin_cache);
266
+			spip_log('Creation cache sessionne '.$chemin_cache);
267 267
 			$tmp = [
268 268
 				'invalideurs' => ['session' => ''],
269 269
 				'lastmodified' => $_SERVER['REQUEST_TIME']
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
 	// l'enregistrer, compresse ou non...
290 290
 	$ok = ecrire_cache($chemin_cache, $pagez);
291 291
 
292
-	spip_log((_IS_BOT ? 'Bot:' : '') . "Creation du cache $chemin_cache pour "
293
-		. $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)'), _LOG_INFO);
292
+	spip_log((_IS_BOT ? 'Bot:' : '')."Creation du cache $chemin_cache pour "
293
+		. $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)'), _LOG_INFO);
294 294
 
295 295
 	// Inserer ses invalideurs
296 296
 	include_spip('inc/invalideur');
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 function nettoyer_petit_cache($prefix, $duree = 300) {
310 310
 	// determiner le repertoire a purger : 'tmp/CACHE/rech/'
311 311
 	$dircache = sous_repertoire(_DIR_CACHE, $prefix);
312
-	if (spip_touch($dircache . 'purger_' . $prefix, $duree, true)) {
312
+	if (spip_touch($dircache.'purger_'.$prefix, $duree, true)) {
313 313
 		foreach (preg_files($dircache, '[.]txt$') as $f) {
314 314
 			if ($_SERVER['REQUEST_TIME'] - (@file_exists($f) ? @filemtime($f) : 0) > $duree) {
315 315
 				spip_unlink($f);
@@ -402,9 +402,9 @@  discard block
 block discarded – undo
402 402
 		include_spip('inc/invalideur');
403 403
 		retire_caches($chemin_cache);
404 404
 		# API invalideur inutile
405
-		supprimer_fichier(_DIR_CACHE . $chemin_cache);
405
+		supprimer_fichier(_DIR_CACHE.$chemin_cache);
406 406
 		if (isset($chemin_cache_session) && $chemin_cache_session) {
407
-			supprimer_fichier(_DIR_CACHE . $chemin_cache_session);
407
+			supprimer_fichier(_DIR_CACHE.$chemin_cache_session);
408 408
 		}
409 409
 	}
410 410
 
@@ -420,9 +420,9 @@  discard block
 block discarded – undo
420 420
 		$page = ['contexte_implicite' => $contexte_implicite]; // ignorer le cache deja lu
421 421
 		include_spip('inc/invalideur');
422 422
 		retire_caches($chemin_cache); # API invalideur inutile
423
-		supprimer_fichier(_DIR_CACHE . $chemin_cache);
423
+		supprimer_fichier(_DIR_CACHE.$chemin_cache);
424 424
 		if (isset($chemin_cache_session) && $chemin_cache_session) {
425
-			supprimer_fichier(_DIR_CACHE . $chemin_cache_session);
425
+			supprimer_fichier(_DIR_CACHE.$chemin_cache_session);
426 426
 		}
427 427
 	}
428 428
 
Please login to merge, or discard this patch.