Completed
Push — master ( 8b5a3c...b0cbd6 )
by cam
01:56
created
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.
ecrire/action/editer_liens.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	$l = '';
53 53
 	if (
54 54
 		($primary = id_table_objet($objet))
55
-		&& $trouver_table($l = $table_sql . '_liens', '', true, ['log_missing' => false])
55
+		&& $trouver_table($l = $table_sql.'_liens', '', true, ['log_missing' => false])
56 56
 		&& !preg_match(',[^\w],', $primary)
57 57
 		&& !preg_match(',[^\w],', $l)
58 58
 	) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
  * @return int
212 212
  */
213 213
 function objet_optimiser_liens($objets_source, $objets_lies) {
214
-	spip_log('objet_optimiser_liens : ' . json_encode($objets_source, JSON_THROW_ON_ERROR) . ', ' . json_encode($objets_lies, JSON_THROW_ON_ERROR), 'genie' . _LOG_DEBUG);
214
+	spip_log('objet_optimiser_liens : '.json_encode($objets_source, JSON_THROW_ON_ERROR).', '.json_encode($objets_lies, JSON_THROW_ON_ERROR), 'genie'._LOG_DEBUG);
215 215
 	return objet_traiter_liaisons('lien_optimise', $objets_source, $objets_lies);
216 216
 }
217 217
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 					$where_meme_lien = implode(' AND ', $where_meme_lien);
438 438
 					// on decale les liens de rang_lien>=la valeur inseree pour faire la place
439 439
 					// sauf sur le meme lien avec un role eventuellement different
440
-					$w = lien_rang_where($table_lien, $primary, $id, $objet, $id_objet, ['rang_lien>=' . (int) $insertions['rang_lien'], "NOT($where_meme_lien)"]);
440
+					$w = lien_rang_where($table_lien, $primary, $id, $objet, $id_objet, ['rang_lien>='.(int) $insertions['rang_lien'], "NOT($where_meme_lien)"]);
441 441
 					sql_update($table_lien, ['rang_lien' => 'rang_lien+1'], $w);
442 442
 				}
443 443
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 					$rang = 1;
503 503
 					foreach ($liens as $lien) {
504 504
 						if (empty($deja_reordonne[$lien[$primary]][$lien['objet']][$lien['id_objet']])) {
505
-							$where = lien_where($primary, $lien[$primary], $lien['objet'], $lien['id_objet'], ['rang_lien!=' . (int) $rang]);
505
+							$where = lien_where($primary, $lien[$primary], $lien['objet'], $lien['id_objet'], ['rang_lien!='.(int) $rang]);
506 506
 							sql_updateq($table_lien, ['rang_lien' => $rang], $where);
507 507
 
508 508
 							if (empty($deja_reordonne[$lien[$primary]])) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 			addslashes($primary),
572 572
 			array_map('intval', $id_source),
573 573
 			$not
574
-		) : addslashes($primary) . ($not ? '<>' : '=') . (int) $id_source);
574
+		) : addslashes($primary).($not ? '<>' : '=').(int) $id_source);
575 575
 	} elseif ($not) {
576 576
 		$where[] = '0=1';
577 577
 	} // idiot mais quand meme
@@ -583,14 +583,14 @@  discard block
 block discarded – undo
583 583
 	}
584 584
 
585 585
 	if ($objet !== '*') {
586
-		$where[] = 'objet=' . sql_quote($objet);
586
+		$where[] = 'objet='.sql_quote($objet);
587 587
 	}
588 588
 	if ($id_objet !== '*') {
589 589
 		$where[] = (is_array($id_objet) ? sql_in(
590 590
 			'id_objet',
591 591
 			array_map('intval', $id_objet),
592 592
 			$not
593
-		) : 'id_objet' . ($not ? '<>' : '=') . (int) $id_objet);
593
+		) : 'id_objet'.($not ? '<>' : '=').(int) $id_objet);
594 594
 	} elseif ($not) {
595 595
 		$where[] = '0=1';
596 596
 	} // idiot mais quand meme
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
 function lien_rang_where($table_lien, $primary, $id_source, $objet, $id_objet, $cond = []) {
612 612
 
613 613
 	// si on veut compter les rangs autrement que le core ne le fait par defaut, fournir le where adhoc
614
-	if (function_exists($f = 'lien_rang_where_' . $table_lien)) {
614
+	if (function_exists($f = 'lien_rang_where_'.$table_lien)) {
615 615
 		return $f($primary, $id_source, $objet, $id_objet, $cond);
616 616
 	}
617 617
 
@@ -776,8 +776,8 @@  discard block
 block discarded – undo
776 776
 					// il faut les eliminier en repetant la condition dans le where L.objet='xxx'
777 777
 					"$table_lien AS L
778 778
 									LEFT JOIN $spip_table_objet AS O
779
-										ON (O.$id_table_objet=L.id_objet AND L.objet=" . sql_quote($type) . ')',
780
-					'L.objet=' . sql_quote($type) . " AND O.$id_table_objet IS NULL"
779
+										ON (O.$id_table_objet=L.id_objet AND L.objet=".sql_quote($type).')',
780
+					'L.objet='.sql_quote($type)." AND O.$id_table_objet IS NULL"
781 781
 				);
782 782
 				// sur une cle primaire composee, pas d'autres solutions que de virer un a un
783 783
 				while ($row = sql_fetch($res)) {
@@ -786,13 +786,13 @@  discard block
 block discarded – undo
786 786
 					}
787 787
 					$e = sql_delete(
788 788
 						$table_lien,
789
-						["$primary=" . $row['id'], 'id_objet=' . $row['id_objet'], 'objet=' . sql_quote($type)]
789
+						["$primary=".$row['id'], 'id_objet='.$row['id_objet'], 'objet='.sql_quote($type)]
790 790
 					);
791 791
 					if ($e != false) {
792 792
 						$dels += $e;
793 793
 						spip_log(
794
-							'lien_optimise: Entree ' . $row['id'] . '/' . $row['id_objet'] . "/$type supprimee dans la table $table_lien",
795
-							'genie' . _LOG_INFO_IMPORTANTE
794
+							'lien_optimise: Entree '.$row['id'].'/'.$row['id_objet']."/$type supprimee dans la table $table_lien",
795
+							'genie'._LOG_INFO_IMPORTANTE
796 796
 						);
797 797
 					}
798 798
 				}
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 					// sauf sur le meme lien avec un role eventuellement different
897 897
 					$where_meme_lien = lien_where($primary, $id, $objet, $id_objet);
898 898
 					$where_meme_lien = implode(' AND ', $where_meme_lien);
899
-					$w = lien_rang_where($table_lien, $primary, $id, $objet, $id_objet, ['rang_lien>=' . (int) $qualif['rang_lien'], "NOT($where_meme_lien)"]);
899
+					$w = lien_rang_where($table_lien, $primary, $id, $objet, $id_objet, ['rang_lien>='.(int) $qualif['rang_lien'], "NOT($where_meme_lien)"]);
900 900
 					sql_update($table_lien, ['rang_lien' => 'rang_lien+1'], $w);
901 901
 				}
902 902
 				// tous les liens de même rôle recoivent le rang indiqué aussi
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
  */
989 989
 function lien_propage_date_modif($objet, $ids) {
990 990
 	static $done = [];
991
-	$hash = md5($objet . serialize($ids));
991
+	$hash = md5($objet.serialize($ids));
992 992
 
993 993
 	// sql_updateq, peut être un rien lent.
994 994
 	// On évite de l'appeler 2 fois sur les mêmes choses
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
 		($desc = $trouver_table($table)) && isset($desc['field']['date_modif'])
1004 1004
 	) {
1005 1005
 		$primary = id_table_objet($objet);
1006
-		$where = (is_array($ids) ? sql_in($primary, array_map('intval', $ids)) : "$primary=" . (int) $ids);
1006
+		$where = (is_array($ids) ? sql_in($primary, array_map('intval', $ids)) : "$primary=".(int) $ids);
1007 1007
 		sql_updateq($table, ['date_modif' => date('Y-m-d H:i:s')], $where);
1008 1008
 	}
1009 1009
 
Please login to merge, or discard this patch.
ecrire/action/editer_logo.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	if ($logo) {
40 40
 		# TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base
41 41
 		if ((is_countable($logo) ? count($logo) : 0) < 6) {
42
-			spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
42
+			spip_log('Supprimer ancien logo '.json_encode($logo, JSON_THROW_ON_ERROR), 'logo');
43 43
 			spip_unlink($logo[0]);
44 44
 		}
45 45
 		elseif (
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		return 'etat invalide';
88 88
 	}
89 89
 	// chercher dans la base
90
-	$mode_document = 'logo' . $mode;
90
+	$mode_document = 'logo'.$mode;
91 91
 
92 92
 	include_spip('inc/documents');
93 93
 	$erreur = '';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$tmp_name = false;
104 104
 		if (file_exists($source)) {
105 105
 			$tmp_name = $source;
106
-		} elseif (file_exists($f = determine_upload() . $source)) {
106
+		} elseif (file_exists($f = determine_upload().$source)) {
107 107
 			$tmp_name = $f;
108 108
 		}
109 109
 		if (!$tmp_name) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 	if (!is_numeric($id_document)) {
140 140
 		$erreur = ($id_document ?: 'Erreur inconnue');
141
-		spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo');
141
+		spip_log("Erreur ajout logo : $erreur pour source=".json_encode($source, JSON_THROW_ON_ERROR), 'logo');
142 142
 		return $erreur;
143 143
 	}
144 144
 
@@ -171,23 +171,23 @@  discard block
 block discarded – undo
171 171
 	$GLOBALS['meta']['articles_modif'] = 'non';
172 172
 
173 173
 	foreach (['on', 'off'] as $mode) {
174
-		$nom_base = $type . $mode;
174
+		$nom_base = $type.$mode;
175 175
 		$dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG);
176 176
 
177
-		$files = glob($dir . $nom_base . '*');
177
+		$files = glob($dir.$nom_base.'*');
178 178
 		// est-ce que c'est une nouvelle tentative de migration ?
179 179
 		// dans ce cas les logos sont deja dans IMG/logo/
180 180
 		if (!(is_countable($files) ? count($files) : 0)) {
181
-			$files = glob($dir_logos . $nom_base . '*');
181
+			$files = glob($dir_logos.$nom_base.'*');
182 182
 			if (is_countable($files) ? count($files) : 0) {
183 183
 				// mais il faut verifier si ils ont pas deja ete migres pour tout ou partie
184 184
 				$filescheck = [];
185 185
 				foreach ($files as $file) {
186
-					$short = basename(dirname((string) $file)) . DIRECTORY_SEPARATOR . basename((string) $file);
186
+					$short = basename(dirname((string) $file)).DIRECTORY_SEPARATOR.basename((string) $file);
187 187
 					$filescheck[$short] = $file;
188 188
 				}
189 189
 				// trouver ceux deja migres
190
-				$deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'");
190
+				$deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck))." AND mode LIKE 'logo%'");
191 191
 				if (is_countable($deja) ? count($deja) : 0) {
192 192
 					$deja = array_column($deja, 'fichier');
193 193
 					$restant = array_diff(array_keys($filescheck), $deja);
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
 		}
208 208
 
209 209
 		$count = (is_countable($files) ? count($files) : 0);
210
-		spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
210
+		spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE);
211 211
 
212 212
 		$deja = [];
213 213
 		foreach ($files as $file) {
214
-			$logo = substr((string) $file, strlen($dir . $nom_base));
214
+			$logo = substr((string) $file, strlen($dir.$nom_base));
215 215
 			$logo = explode('.', $logo);
216 216
 			if (
217 217
 				is_numeric($logo[0])
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 				// if no logo in base
223 223
 				if (!$logo || (is_countable($logo) ? count($logo) : 0) < 6) {
224 224
 					foreach ($formats_logos as $format) {
225
-						if (@file_exists($d = ($dir . ($nom = $nom_base . (int) $id_objet . '.' . $format)))) {
225
+						if (@file_exists($d = ($dir.($nom = $nom_base.(int) $id_objet.'.'.$format)))) {
226 226
 							if (isset($desc['field']['date_modif'])) {
227 227
 								$date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet");
228 228
 							} else {
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 							// s'assurer que le logo a les bon droits au passage (evite un echec en cas de sanitization d'un svg)
232 232
 							@chmod($d, _SPIP_CHMOD & 0666);
233 233
 							// logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre
234
-							@rename($d, $dir_logos . $nom);
234
+							@rename($d, $dir_logos.$nom);
235 235
 							// et on le declare comme nouveau logo
236
-							logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom);
236
+							logo_modifier($objet, $id_objet, $mode, $dir_logos.$nom);
237 237
 							if ($date_modif) {
238 238
 								sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet");
239 239
 							}
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
 			// si le fichier est encore la on le move : rien a faire ici
247 247
 			// (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas)
248 248
 			if ($dir !== $dir_logos && file_exists($file)) {
249
-				@rename($file, $dir_logos_erreurs . basename((string) $file));
249
+				@rename($file, $dir_logos_erreurs.basename((string) $file));
250 250
 			}
251 251
 
252 252
 			$count--;
253 253
 			if ($count % 250 === 0) {
254
-				spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
254
+				spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE);
255 255
 			}
256 256
 
257 257
 			if ($time_limit && time() > $time_limit) {
Please login to merge, or discard this patch.
ecrire/action/api_transmettre.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
 	$res = ltrim((string) $res['texte']);
95 95
 	if (empty($res)) {
96
-		spip_log("$arg $qs resultat vide", 'transmettre' . _LOG_INFO_IMPORTANTE);
96
+		spip_log("$arg $qs resultat vide", 'transmettre'._LOG_INFO_IMPORTANTE);
97 97
 	}
98 98
 
99 99
 	echo $res;
Please login to merge, or discard this patch.