Completed
Push — master ( 51674a...9b54d2 )
by cam
01:35
created
ecrire/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 /** Drapeau indiquant que l'on est dans l'espace privé */
19 19
 define('_ESPACE_PRIVE', true);
20 20
 if (!defined('_ECRIRE_INC_VERSION')) {
21
-	include __DIR__ . '/inc_version.php';
21
+	include __DIR__.'/inc_version.php';
22 22
 }
23 23
 
24 24
 include_spip('inc/cookie');
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 // Determiner l'action demandee
28 28
 //
29 29
 
30
-$exec = (string)_request('exec');
30
+$exec = (string) _request('exec');
31 31
 $reinstall = (is_null(_request('reinstall'))) ? ($exec == 'install' ? 'oui' : null) : _request('reinstall');
32 32
 //
33 33
 // Les scripts d'insallation n'authentifient pas, forcement,
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 			&& !(isset($GLOBALS['visiteur_session'])
113 113
 			&& $GLOBALS['visiteur_session']['statut'] == '0minirezo')
114 114
 	) {
115
-		spip_log('Quand la meta admin vaut ' .
116
-			$GLOBALS['meta']['admin'] .
117
-			' seul un admin peut se connecter et sans AJAX.' .
115
+		spip_log('Quand la meta admin vaut '.
116
+			$GLOBALS['meta']['admin'].
117
+			' seul un admin peut se connecter et sans AJAX.'.
118 118
 			' En cas de probleme, detruire cette meta.');
119 119
 		die(_T('info_travaux_texte'));
120 120
 	}
Please login to merge, or discard this patch.
ecrire/exec/base_delete_all.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
 			spip_log('Erreur base de donnees');
36 36
 			echo minipres(
37 37
 				_T('info_travaux_titre'),
38
-				_T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>'
38
+				_T('titre_probleme_technique').'<p><tt>'.sql_errno().' '.sql_error().'</tt></p>'
39 39
 			);
40 40
 		} else {
41 41
 			$res = base_saisie_tables('delete', $res);
42 42
 			include_spip('inc/headers');
43
-			$res = "\n<ol style='text-align:left'><li>\n" .
44
-				implode("</li>\n<li>", $res) .
43
+			$res = "\n<ol style='text-align:left'><li>\n".
44
+				implode("</li>\n<li>", $res).
45 45
 				'</li></ol>';
46 46
 			$admin = charger_fonction('admin', 'inc');
47 47
 			$res = $admin('delete_all', _T('titre_page_delete_all'), $res);
Please login to merge, or discard this patch.
ecrire/exec/upgrade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			. '</b><p> '
44 44
 			. _T(
45 45
 				'texte_nouvelle_version_spip_2',
46
-				['connect' => '<tt>' . _FILE_CONNECT . '</tt>']
46
+				['connect' => '<tt>'._FILE_CONNECT.'</tt>']
47 47
 			)
48 48
 			. generer_form_ecrire(
49 49
 				'upgrade',
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			$commentaire = _T('texte_mise_a_niveau_base_1');
79 79
 		}
80 80
 
81
-		$commentaire .= '<br />[' . $GLOBALS['meta']['version_installee'] . '/' . $GLOBALS['spip_version_base'] . ']';
81
+		$commentaire .= '<br />['.$GLOBALS['meta']['version_installee'].'/'.$GLOBALS['spip_version_base'].']';
82 82
 
83 83
 		$_POST['reinstall'] = 'non'; // pour copy_request dans admin
84 84
 		include_spip('inc/headers');
Please login to merge, or discard this patch.
ecrire/exec/fond.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 
27 27
 $fond = _request('exec');
28
-$GLOBALS['delais'] = 0;// pas de cache !
28
+$GLOBALS['delais'] = 0; // pas de cache !
29 29
 // Securite
30 30
 if (strstr((string) $fond, '/')) {
31 31
 	if (
Please login to merge, or discard this patch.
ecrire/exec/info_plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 		include_spip('inc/minipres');
26 26
 		echo minipres();
27 27
 	} else {
28
-		$plug = _DIR_RACINE . htmlspecialchars((string) _request('plugin'));
28
+		$plug = _DIR_RACINE.htmlspecialchars((string) _request('plugin'));
29 29
 		$get_infos = charger_fonction('get_infos', 'plugins');
30 30
 		$dir = '';
31 31
 		if (str_starts_with($plug, (string) _DIR_PLUGINS)) {
Please login to merge, or discard this patch.
ecrire/exec/rechercher.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
 	$where = preg_split(',\s+,', $type);
64 64
 	if ($where) {
65 65
 		foreach ($where as $k => $v) {
66
-			$where[$k] = "'%" . substr(str_replace('%', '\%', sql_quote($v, '', 'string')), 1, -1) . "%'";
66
+			$where[$k] = "'%".substr(str_replace('%', '\%', sql_quote($v, '', 'string')), 1, -1)."%'";
67 67
 		}
68
-		$where_titre = ('(titre LIKE ' . implode(' AND titre LIKE ', $where) . ')');
69
-		$where_desc = ('(descriptif LIKE ' . implode(' AND descriptif LIKE ', $where) . ')');
70
-		$where_id = ('(id_rubrique = ' . (int) $type . ')');
68
+		$where_titre = ('(titre LIKE '.implode(' AND titre LIKE ', $where).')');
69
+		$where_desc = ('(descriptif LIKE '.implode(' AND descriptif LIKE ', $where).')');
70
+		$where_id = ('(id_rubrique = '.(int) $type.')');
71 71
 
72 72
 		if ($exclus) {
73 73
 			include_spip('inc/rubriques');
74
-			$where_exclus = ' AND ' . sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT');
74
+			$where_exclus = ' AND '.sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT');
75 75
 		} else {
76 76
 			$where_exclus = '';
77 77
 		}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 	if ($points) {
103 103
 		arsort($points);
104
-		$style = " style='background-image: url(" . chemin_image('secteur-12.png') . ")'";
104
+		$style = " style='background-image: url(".chemin_image('secteur-12.png').")'";
105 105
 		foreach ($rub as $k => $v) {
106 106
 			$rub[$k]['atts'] = ($v['id_parent'] ? $style : '')
107 107
 				. " class='petite-rubrique'";
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	if (!$ids) {
135 135
 		return "<br /><br /><div style='padding: 5px; color: red;'><b>"
136 136
 		. spip_htmlentities($type)
137
-		. '</b> :  ' . _T('avis_aucun_resultat') . '</div>';
137
+		. '</b> :  '._T('avis_aucun_resultat').'</div>';
138 138
 	}
139 139
 
140 140
 	$ret = '';
141 141
 	$info = generer_url_ecrire('informer', "type=rubrique&rac=$rac&id=");
142 142
 
143
-	$onClick = "aff_selection(this.firstChild.title,'$rac" . "_selection','$info', event)";
143
+	$onClick = "aff_selection(this.firstChild.title,'$rac"."_selection','$info', event)";
144 144
 
145 145
 	$ondbClick = "$do(this.firstChild.firstChild.nodeValue,this.firstChild.title,'selection_rubrique', 'id_parent');";
146 146
 
Please login to merge, or discard this patch.
ecrire/exec/admin_plugin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
 	// message d'erreur au retour d'une operation
121 121
 	if ($erreur) {
122
-		echo "<div class='error'>" . spip_htmlspecialchars($erreur) . '</div>';
122
+		echo "<div class='error'>".spip_htmlspecialchars($erreur).'</div>';
123 123
 	}
124 124
 	if ($erreur_activation) {
125 125
 		echo "<div class='error'>$erreur_activation</div>";
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
 	if ($quoi !== 'actifs') {
147 147
 		$lpf = liste_plugin_files();
148 148
 		if ($lpf) {
149
-			echo '<p>' . _T('texte_presente_plugin') . '</p>';
149
+			echo '<p>'._T('texte_presente_plugin').'</p>';
150 150
 		} else {
151 151
 			if (!@is_dir(_DIR_PLUGINS)) {
152
-				echo '<p>' . _T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)])
153
-					. ' &mdash; ' . _T('plugin_info_automatique_creer') . '</p>';
152
+				echo '<p>'._T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)])
153
+					. ' &mdash; '._T('plugin_info_automatique_creer').'</p>';
154 154
 			}
155 155
 		}
156 156
 		$lcpaffiche = $lpf;
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 		if (defined('_DIR_PLUGINS_SUPPL')) {
172 172
 			$nb += is_countable($lcpas) ? count($lcpas) : 0;
173 173
 		}
174
-		echo '<h3>' . sinon(
174
+		echo '<h3>'.sinon(
175 175
 			singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'),
176 176
 			_T('plugins_actif_aucun')
177
-		) . '</h3>';
177
+		).'</h3>';
178 178
 	}
179 179
 
180 180
 	if (empty($format)) {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
 	if ($corps) {
193 193
 		$corps .= "\n<div class='boutons' style='display:none;'>"
194
-			. "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer')
194
+			. "<input type='submit' class='submit save' value='"._T('bouton_enregistrer')
195 195
 			. "' />"
196 196
 			. '</div>';
197 197
 	}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 		. debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist')
266 266
 		. '<p>'
267 267
 		. _T('plugin_info_plugins_dist_1', ['plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST)])
268
-		. '<br />' . _T('plugin_info_plugins_dist_2')
268
+		. '<br />'._T('plugin_info_plugins_dist_2')
269 269
 		. '</p>'
270 270
 		. $liste
271 271
 		. fin_cadre_trait_couleur()
@@ -288,11 +288,11 @@  discard block
 block discarded – undo
288 288
 	$res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees'));
289 289
 	$res .= '<dl>';
290 290
 	foreach ($libs as $lib => $rep) {
291
-		$res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n";
291
+		$res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n";
292 292
 	}
293 293
 	$res .= '</dl>';
294 294
 
295
-	return $res . fin_cadre_enfonce();
295
+	return $res.fin_cadre_enfonce();
296 296
 }
297 297
 
298 298
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	$libs = [];
307 307
 	foreach (array_reverse(creer_chemin()) as $d) {
308 308
 		if (
309
-			is_dir($dir = $d . 'lib/')
309
+			is_dir($dir = $d.'lib/')
310 310
 			&& ($t = opendir($dir))
311 311
 		) {
312 312
 			while (($f = readdir($t)) !== false) {
Please login to merge, or discard this patch.
ecrire/action/instituer_langue_objet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 		if ($changer_lang != 'herit') {
45 45
 			$set['lang'] = $changer_lang;
46
-			sql_updateq($table_objet_sql, $set, "$id_table_objet=" . (int) $id, [], $serveur);
46
+			sql_updateq($table_objet_sql, $set, "$id_table_objet=".(int) $id, [], $serveur);
47 47
 			include_spip('inc/rubriques'); // pour calculer_langues_rubriques et calculer_langues_utilisees
48 48
 			if ($table_objet_sql == 'spip_rubriques') {
49 49
 				calculer_langues_rubriques();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$langues = calculer_langues_utilisees($serveur);
52 52
 			ecrire_meta('langues_utilisees', $langues);
53 53
 		} else {
54
-			$langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique);
54
+			$langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique);
55 55
 			if (!$langue_parent) {
56 56
 				$langue_parent = $GLOBALS['meta']['langue_site'];
57 57
 			}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 			if (isset($set['langue_choisie'])) {
61 61
 				$set['langue_choisie'] = 'non';
62 62
 			}
63
-			sql_updateq($table_objet_sql, $set, "$id_table_objet=" . (int) $id, [], $serveur);
63
+			sql_updateq($table_objet_sql, $set, "$id_table_objet=".(int) $id, [], $serveur);
64 64
 			if ($table_objet_sql == 'spip_rubriques') {
65 65
 				include_spip('inc/rubriques');
66 66
 				calculer_langues_rubriques();
Please login to merge, or discard this patch.
ecrire/action/tester.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 			(string) _PNMSCALE_COMMAND
75 75
 		);
76 76
 
77
-		$vignette = _ROOT_IMG_PACK . 'test.jpg';
78
-		$dest = _DIR_VAR . 'test-jpg.jpg';
79
-		$commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
77
+		$vignette = _ROOT_IMG_PACK.'test.jpg';
78
+		$dest = _DIR_VAR.'test-jpg.jpg';
79
+		$commande = "$jpegtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
80 80
 		spip_log($commande);
81 81
 		exec($commande);
82 82
 		if (($taille = @getimagesize($dest)) && $taille[1] == 10) {
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 		}
85 85
 		$giftopnm_command = str_replace('pnmscale', 'giftopnm', (string) _PNMSCALE_COMMAND);
86 86
 		$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', (string) _PNMSCALE_COMMAND);
87
-		$vignette = _ROOT_IMG_PACK . 'test.gif';
88
-		$dest = _DIR_VAR . 'test-gif.jpg';
89
-		$commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
87
+		$vignette = _ROOT_IMG_PACK.'test.gif';
88
+		$dest = _DIR_VAR.'test-gif.jpg';
89
+		$commande = "$giftopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
90 90
 		spip_log($commande);
91 91
 		exec($commande);
92 92
 		if (($taille = @getimagesize($dest)) && $taille[1] == 10) {
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 		}
95 95
 
96 96
 		$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', (string) _PNMSCALE_COMMAND);
97
-		$vignette = _ROOT_IMG_PACK . 'test.png';
98
-		$dest = _DIR_VAR . 'test-gif.jpg';
99
-		$commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
97
+		$vignette = _ROOT_IMG_PACK.'test.png';
98
+		$dest = _DIR_VAR.'test-gif.jpg';
99
+		$commande = "$pngtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
100 100
 		spip_log($commande);
101 101
 		exec($commande);
102 102
 		if (($taille = @getimagesize($dest)) && $taille[1] == 10) {
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 		include_spip('inc/filtres');
112 112
 		include_spip('inc/filtres_images_mini');
113 113
 		$taille_preview = 150;
114
-		$image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
114
+		$image = _image_valeurs_trans(_DIR_IMG_PACK.'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
115 115
 
116
-		$image['fichier_dest'] = _DIR_VAR . "test_$arg";
116
+		$image['fichier_dest'] = _DIR_VAR."test_$arg";
117 117
 
118 118
 		if (
119 119
 			($preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true))
Please login to merge, or discard this patch.