Completed
Push — master ( e9ce2d...38e4b2 )
by cam
01:04
created
ecrire/base/upgrade.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	if ($GLOBALS['spip_version_base'] != $GLOBALS['meta']['version_installee']) {
57 57
 		if (!is_numeric(_request('reinstall'))) {
58 58
 			include_spip('base/create');
59
-			spip_log('recree les tables eventuellement disparues', 'maj.' . _LOG_INFO_IMPORTANTE);
59
+			spip_log('recree les tables eventuellement disparues', 'maj.'._LOG_INFO_IMPORTANTE);
60 60
 			creer_base();
61 61
 		}
62 62
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			exit;
70 70
 		}
71 71
 	}
72
-	spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.' . _LOG_INFO_IMPORTANTE);
72
+	spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.'._LOG_INFO_IMPORTANTE);
73 73
 
74 74
 	// supprimer quelques fichiers temporaires qui peuvent se retrouver invalides
75 75
 	@spip_unlink(_CACHE_RUBRIQUES);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	@spip_unlink(_CACHE_PLUGINS_OPT);
79 79
 	@spip_unlink(_CACHE_PLUGINS_FCT);
80 80
 	@spip_unlink(_CACHE_CHEMIN);
81
-	@spip_unlink(_DIR_TMP . 'plugin_xml_cache.gz');
81
+	@spip_unlink(_DIR_TMP.'plugin_xml_cache.gz');
82 82
 
83 83
 	include_spip('inc/auth');
84 84
 	auth_synchroniser_distant();
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 	$version_installee = $GLOBALS['meta']['version_installee'] ?? null;
118 118
 
119 119
 	spip_log(
120
-		"Version anterieure: $version_installee. Courante: " . $GLOBALS['spip_version_base'],
121
-		'maj.' . _LOG_INFO_IMPORTANTE
120
+		"Version anterieure: $version_installee. Courante: ".$GLOBALS['spip_version_base'],
121
+		'maj.'._LOG_INFO_IMPORTANTE
122 122
 	);
123 123
 	if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) {
124 124
 		sql_replace(
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
 	$res = maj_while($version_installee, $cible, $GLOBALS['maj'], 'version_installee', 'meta', $redirect, $debut_page);
152 152
 	if ($res) {
153 153
 		if (!is_array($res)) {
154
-			spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_INFO_ERREUR);
154
+			spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_INFO_ERREUR);
155 155
 		} else {
156
-			echo _T('avis_operation_echec') . ' ' . join(' ', $res);
156
+			echo _T('avis_operation_echec').' '.join(' ', $res);
157 157
 			echo install_fin_html();
158 158
 		}
159 159
 	}
@@ -241,9 +241,9 @@  discard block
 block discarded – undo
241 241
 		$res = maj_while($current_version, $version_cible, $maj, $nom_meta_base_version, $table_meta, $redirect);
242 242
 		if ($res) {
243 243
 			if (!is_array($res)) {
244
-				spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_INFO_ERREUR);
244
+				spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_INFO_ERREUR);
245 245
 			} else {
246
-				echo '<p>' . _T('avis_operation_echec') . ' ' . join(' ', $res) . '</p>';
246
+				echo '<p>'._T('avis_operation_echec').' '.join(' ', $res).'</p>';
247 247
 			}
248 248
 		}
249 249
 	}
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	echo(install_debut_html($titre));
300 300
 	// script de rechargement auto sur timeout
301 301
 	$redirect = generer_url_ecrire('upgrade', "reinstall=$installee&meta=$meta&table=$table", true);
302
-	echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . ($timeout * 1000) . ')');
302
+	echo http_script("window.setTimeout('location.href=\"".$redirect."\";',".($timeout * 1000).')');
303 303
 	echo "<div style='text-align: left'>\n";
304 304
 	if (ob_get_level()) {
305 305
 		ob_flush();
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 				return [$v, $etape];
389 389
 			}
390 390
 			$n = time() - $time;
391
-			spip_log("$table $meta: $v en $n secondes", 'maj.' . _LOG_INFO_IMPORTANTE);
391
+			spip_log("$table $meta: $v en $n secondes", 'maj.'._LOG_INFO_IMPORTANTE);
392 392
 			if ($meta) {
393 393
 				ecrire_meta($meta, $installee = $v, 'oui', $table);
394 394
 			}
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 	if ($meta) {
405 405
 		ecrire_meta($meta, $cible, 'oui', $table);
406 406
 	}
407
-	spip_log("MAJ terminee. $meta: $installee", 'maj.' . _LOG_INFO_IMPORTANTE);
407
+	spip_log("MAJ terminee. $meta: $installee", 'maj.'._LOG_INFO_IMPORTANTE);
408 408
 
409 409
 	return [];
410 410
 }
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
  * @return int
430 430
  */
431 431
 function serie_alter($serie, $q = [], $meta = '', $table = 'meta', $redirect = '') {
432
-	$meta2 = $meta . '_maj_' . $serie;
432
+	$meta2 = $meta.'_maj_'.$serie;
433 433
 	$etape = 0;
434 434
 	if (isset($GLOBALS[$table][$meta2])) {
435 435
 		$etape = intval($GLOBALS[$table][$meta2]);
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 				and function_exists($f = array_shift($r))
443 443
 			) {
444 444
 				// note: $r (arguments de la fonction $f) peut avoir des données tabulaires
445
-				spip_log("$msg: $f " . @join(',', $r), 'maj.' . _LOG_INFO_IMPORTANTE);
445
+				spip_log("$msg: $f ".@join(',', $r), 'maj.'._LOG_INFO_IMPORTANTE);
446 446
 				// pour les fonctions atomiques sql_xx
447 447
 				// on enregistre le meta avant de lancer la fonction,
448 448
 				// de maniere a eviter de boucler sur timeout
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
 					relance_maj($meta, $table, $redirect);
461 461
 				}
462 462
 				ecrire_meta($meta2, $i + 1, 'non', $table);
463
-				spip_log("$meta2: ok", 'maj.' . _LOG_INFO_IMPORTANTE);
463
+				spip_log("$meta2: ok", 'maj.'._LOG_INFO_IMPORTANTE);
464 464
 			} else {
465 465
 				if (!is_array($r)) {
466
-					spip_log("maj $i format incorrect", 'maj.' . _LOG_ERREUR);
466
+					spip_log("maj $i format incorrect", 'maj.'._LOG_ERREUR);
467 467
 				} else {
468
-					spip_log("maj $i fonction $f non definie", 'maj.' . _LOG_ERREUR);
468
+					spip_log("maj $i fonction $f non definie", 'maj.'._LOG_ERREUR);
469 469
 				}
470 470
 				// en cas d'erreur serieuse, on s'arrete
471 471
 				// mais on permet de passer par dessus en rechargeant la page.
Please login to merge, or discard this patch.
ecrire/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 // Determiner l'action demandee
36 36
 //
37 37
 
38
-$exec = (string)_request('exec');
38
+$exec = (string) _request('exec');
39 39
 $reinstall = (!is_null(_request('reinstall'))) ? _request('reinstall') : ($exec == 'install' ? 'oui' : null);
40 40
 //
41 41
 // Les scripts d'insallation n'authentifient pas, forcement,
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 			or (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']['statut'] == '0minirezo')
122 122
 		)
123 123
 	) {
124
-		spip_log('Quand la meta admin vaut ' .
125
-			$GLOBALS['meta']['admin'] .
126
-			' seul un admin peut se connecter et sans AJAX.' .
124
+		spip_log('Quand la meta admin vaut '.
125
+			$GLOBALS['meta']['admin'].
126
+			' seul un admin peut se connecter et sans AJAX.'.
127 127
 			' En cas de probleme, detruire cette meta.');
128 128
 		die(_T('info_travaux_texte'));
129 129
 	}
Please login to merge, or discard this patch.
ecrire/install/etape_ldap1.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 					'valeur' => $adresse_ldap
59 59
 				],
60 60
 				'port_ldap' => [
61
-					'label' => _T('entree_port_annuaire') . '<br />' . _T('texte_port_annuaire'),
61
+					'label' => _T('entree_port_annuaire').'<br />'._T('texte_port_annuaire'),
62 62
 					'valeur' => $port_ldap
63 63
 				],
64 64
 				'tls_ldap' => [
65
-					'label' => '<b>' . _T('tls_ldap') . '</b>',
65
+					'label' => '<b>'._T('tls_ldap').'</b>',
66 66
 					'valeur' => $tls_ldap,
67 67
 					'alternatives' => [
68 68
 						'non' => _T('item_non'),
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			]
81 81
 		)
82 82
 
83
-		. "\n<p>" . _T('texte_acces_ldap_anonyme_1') . '</p>'
83
+		. "\n<p>"._T('texte_acces_ldap_anonyme_1').'</p>'
84 84
 		. fieldset(
85 85
 			_T('connexion_ldap'),
86 86
 			[
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
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$test_dir .= '/';
82 82
 		}
83 83
 		if (!in_array($test_dir, $GLOBALS['test_dirs'])) {
84
-			$GLOBALS['test_dirs'][] = _DIR_RACINE . $test_dir;
84
+			$GLOBALS['test_dirs'][] = _DIR_RACINE.$test_dir;
85 85
 		}
86 86
 	} else {
87 87
 		if (!_FILE_CONNECT) {
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
 	foreach ($GLOBALS['test_dirs'] as $i => $my_dir) {
97 97
 		$test = test_ecrire($my_dir);
98 98
 		if (!$test) {
99
-			$m = preg_replace(',^' . _DIR_RACINE . ',', '', $my_dir);
99
+			$m = preg_replace(',^'._DIR_RACINE.',', '', $my_dir);
100 100
 			if (@file_exists($my_dir)) {
101
-				$bad_dirs['<li>' . $m . '</li>'] = 1;
101
+				$bad_dirs['<li>'.$m.'</li>'] = 1;
102 102
 			} else {
103
-				$absent_dirs['<li>' . $m . '</li>'] = 1;
103
+				$absent_dirs['<li>'.$m.'</li>'] = 1;
104 104
 			}
105 105
 		} else {
106 106
 			$chmod = max($chmod, $test);
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
 	if ($bad_dirs or $absent_dirs) {
111 111
 		if (!_FILE_CONNECT) {
112 112
 			$titre = _T('dirs_preliminaire');
113
-			$continuer = ' ' . _T('dirs_commencer') . '.';
113
+			$continuer = ' '._T('dirs_commencer').'.';
114 114
 		} else {
115 115
 			$titre = _T('dirs_probleme_droits');
116 116
 		}
117 117
 
118 118
 
119
-		$res = "<div align='right'>" . menu_langues('var_lang_ecrire') . "</div>\n";
119
+		$res = "<div align='right'>".menu_langues('var_lang_ecrire')."</div>\n";
120 120
 
121 121
 		if ($bad_dirs) {
122 122
 			$res .=
123 123
 				_T(
124 124
 					'dirs_repertoires_suivants',
125 125
 					['bad_dirs' => join("\n", array_keys($bad_dirs))]
126
-				) .
127
-				'<b>' . _T('login_recharger') . '</b>.';
126
+				).
127
+				'<b>'._T('login_recharger').'</b>.';
128 128
 		}
129 129
 
130 130
 		if ($absent_dirs) {
@@ -132,22 +132,21 @@  discard block
 block discarded – undo
132 132
 				_T(
133 133
 					'dirs_repertoires_absents',
134 134
 					['bad_dirs' => join("\n", array_keys($absent_dirs))]
135
-				) .
136
-				'<b>' . _T('login_recharger') . '</b>.';
135
+				).
136
+				'<b>'._T('login_recharger').'</b>.';
137 137
 		}
138
-		$res = '<p>' . $continuer . $res . aider('install0', true) . '</p>';
138
+		$res = '<p>'.$continuer.$res.aider('install0', true).'</p>';
139 139
 
140 140
 		$t = _T('login_recharger');
141
-		$t = (!$test_dir ? '' :
142
-				"<input type='hidden' name='test_dir' value='" . spip_htmlspecialchars($test_dir, ENT_QUOTES) . "' />")
141
+		$t = (!$test_dir ? '' : "<input type='hidden' name='test_dir' value='".spip_htmlspecialchars($test_dir, ENT_QUOTES)."' />")
143 142
 			. "<input type='hidden' name='etape' value='chmod' />"
144
-			. "<div style='text-align: right'><input type='submit' value='" . attribut_html($t) . "' /></div>";
143
+			. "<div style='text-align: right'><input type='submit' value='".attribut_html($t)."' /></div>";
145 144
 
146
-		echo minipres($titre, $res . generer_form_ecrire('install', $t));
145
+		echo minipres($titre, $res.generer_form_ecrire('install', $t));
147 146
 	} else {
148 147
 		$deja = (_FILE_CONNECT and analyse_fichier_connection(_FILE_CONNECT));
149 148
 		if (!$deja) {
150
-			redirige_url_ecrire('install', 'etape=1&chmod=' . $chmod);
149
+			redirige_url_ecrire('install', 'etape=1&chmod='.$chmod);
151 150
 		} else {
152 151
 			redirige_url_ecrire();
153 152
 		}
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
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	// creer le repertoire cache, qui sert partout !
46 46
 	// deja fait en etape 4 en principe, on garde au cas ou
47 47
 	if (!@file_exists(_DIR_CACHE)) {
48
-		$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
48
+		$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
49 49
 		$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
50 50
 	}
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	if ($msg) {
56 56
 		$cible = _T('public:accueil_site');
57 57
 		$cible = generer_form_ecrire('accueil', '', '', $cible);
58
-		echo minipres('AUTO', $msg . $cible);
58
+		echo minipres('AUTO', $msg.$cible);
59 59
 		// ok, deboucher dans l'espace prive
60 60
 	} else {
61 61
 		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/install/etape_4.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 	// creer le repertoire cache, qui sert partout !
23 23
 	if (!@file_exists(_DIR_CACHE)) {
24
-		$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
24
+		$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
25 25
 		$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
26 26
 	}
27 27
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	echo '<p>'
40 40
 		. _T(
41 41
 			'plugin_info_plugins_dist_1',
42
-			['plugins_dist' => '<tt>' . joli_repertoire(_DIR_PLUGINS_DIST) . '</tt>']
42
+			['plugins_dist' => '<tt>'.joli_repertoire(_DIR_PLUGINS_DIST).'</tt>']
43 43
 		)
44 44
 		. '</p>';
45 45
 
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
@@ -52,29 +52,28 @@  discard block
 block discarded – undo
52 52
 	$conn = "\$GLOBALS['ldap_base'] = '$base_ldap';\n"
53 53
 		. "\$GLOBALS['ldap_link'] = @ldap_connect('$adresse_ldap','$port_ldap');\n"
54 54
 		. "@ldap_set_option(\$GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'$protocole_ldap');\n"
55
-		. (($tls_ldap != 'oui') ? '' :
56
-			"@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
55
+		. (($tls_ldap != 'oui') ? '' : "@ldap_start_tls(\$GLOBALS['ldap_link']);\n")
57 56
 		. "@ldap_bind(\$GLOBALS['ldap_link'],'$login_ldap','$pass_ldap');\n";
58 57
 
59 58
 	$champs = is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [];
60 59
 	$res = '';
61 60
 	foreach ($champs as $champ => $v) {
62
-		$nom = 'ldap_' . $champ;
61
+		$nom = 'ldap_'.$champ;
63 62
 		$val = trim(_request($nom));
64 63
 		if (preg_match('/^\w*$/', $val)) {
65 64
 			if ($val) {
66 65
 				$val = _q($val);
67 66
 			}
68 67
 		} else {
69
-			$val = 'array(' . _q(preg_split('/\W+/', $val)) . ')';
68
+			$val = 'array('._q(preg_split('/\W+/', $val)).')';
70 69
 		};
71 70
 		if ($val) {
72
-			$res .= "'$champ' => " . $val . ',';
71
+			$res .= "'$champ' => ".$val.',';
73 72
 		}
74 73
 	}
75 74
 	$conn .= "\$GLOBALS['ldap_champs'] = array($res);\n";
76 75
 
77
-	install_fichier_connexion(_DIR_CONNECT . _FILE_LDAP, $conn);
76
+	install_fichier_connexion(_DIR_CONNECT._FILE_LDAP, $conn);
78 77
 }
79 78
 
80 79
 function etape_ldap5_suite() {
@@ -87,7 +86,7 @@  discard block
 block discarded – undo
87 86
 	);
88 87
 
89 88
 	echo generer_form_ecrire('install', (
90
-		"<input type='hidden' name='etape' value='3' />" .
89
+		"<input type='hidden' name='etape' value='3' />".
91 90
 		"<input type='hidden' name='ldap_present' value='true' />"
92 91
 		. bouton_suivant()));
93 92
 
Please login to merge, or discard this patch.
ecrire/genie/maintenance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@
 block discarded – undo
107 107
 function message_crash_tables() {
108 108
 	if ($crash = verifier_crash_tables()) {
109 109
 		return
110
-			'<strong>' . _T('texte_recuperer_base') . '</strong><br />'
111
-			. ' <tt>' . join(', ', $crash) . '</tt><br />'
110
+			'<strong>'._T('texte_recuperer_base').'</strong><br />'
111
+			. ' <tt>'.join(', ', $crash).'</tt><br />'
112 112
 			. generer_form_ecrire(
113 113
 				'base_repair',
114 114
 				_T('texte_crash_base'),
Please login to merge, or discard this patch.
ecrire/inc/filtres_mime.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	static $t1 = ['&', '<', '>'];
121 121
 	static $t2 = ['&amp;', '&lt;', '&gt;'];
122 122
 
123
-	return '<pre>' . str_replace($t1, $t2, $t) . '</pre>';
123
+	return '<pre>'.str_replace($t1, $t2, $t).'</pre>';
124 124
 }
125 125
 
126 126
 /**
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 	foreach ($lignes as &$l) {
141 141
 		$l = join('|', $l);
142 142
 	}
143
-	$corps = join("\n", $lignes) . "\n";
144
-	$corps = $caption .
145
-		"\n|{{" .
146
-		join('}}|{{', $entete) .
147
-		'}}|' .
148
-		"\n|" .
143
+	$corps = join("\n", $lignes)."\n";
144
+	$corps = $caption.
145
+		"\n|{{".
146
+		join('}}|{{', $entete).
147
+		'}}|'.
148
+		"\n|".
149 149
 		str_replace("\n", "|\n|", $corps);
150 150
 	include_spip('inc/texte');
151 151
 
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
 		}
188 188
 	}
189 189
 	// Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ?
190
-	$t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t));
190
+	$t = safehtml(preg_replace(',<script'.'.*?</script>,is', '', $t));
191 191
 
192
-	return (!$style ? '' : "\n<style>" . $style . '</style>') . $t;
192
+	return (!$style ? '' : "\n<style>".$style.'</style>').$t;
193 193
 }
194 194
 
195 195
 /**
Please login to merge, or discard this patch.