Completed
Push — master ( 8ac1c9...4b0d59 )
by cam
01:18
created
ecrire/exec/rechercher.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
 	$where = preg_split(',\s+,', $type);
69 69
 	if ($where) {
70 70
 		foreach ($where as $k => $v) {
71
-			$where[$k] = "'%" . substr(str_replace('%', '\%', sql_quote($v, '', 'string')), 1, -1) . "%'";
71
+			$where[$k] = "'%".substr(str_replace('%', '\%', sql_quote($v, '', 'string')), 1, -1)."%'";
72 72
 		}
73
-		$where_titre = ('(titre LIKE ' . join(' AND titre LIKE ', $where) . ')');
74
-		$where_desc = ('(descriptif LIKE ' . join(' AND descriptif LIKE ', $where) . ')');
75
-		$where_id = ('(id_rubrique = ' . intval($type) . ')');
73
+		$where_titre = ('(titre LIKE '.join(' AND titre LIKE ', $where).')');
74
+		$where_desc = ('(descriptif LIKE '.join(' AND descriptif LIKE ', $where).')');
75
+		$where_id = ('(id_rubrique = '.intval($type).')');
76 76
 
77 77
 		if ($exclus) {
78 78
 			include_spip('inc/rubriques');
79
-			$where_exclus = ' AND ' . sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT');
79
+			$where_exclus = ' AND '.sql_in('id_rubrique', calcul_branche_in($exclus), 'NOT');
80 80
 		} else {
81 81
 			$where_exclus = '';
82 82
 		}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 	if ($points) {
108 108
 		arsort($points);
109
-		$style = " style='background-image: url(" . chemin_image('secteur-12.png') . ")'";
109
+		$style = " style='background-image: url(".chemin_image('secteur-12.png').")'";
110 110
 		foreach ($rub as $k => $v) {
111 111
 			$rub[$k]['atts'] = ($v['id_parent'] ? $style : '')
112 112
 				. " class='petite-rubrique'";
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
 	if (!$ids) {
140 140
 		return "<br /><br /><div style='padding: 5px; color: red;'><b>"
141 141
 		. spip_htmlentities($type)
142
-		. '</b> :  ' . _T('avis_aucun_resultat') . '</div>';
142
+		. '</b> :  '._T('avis_aucun_resultat').'</div>';
143 143
 	}
144 144
 
145 145
 	$ret = '';
146 146
 	$info = generer_url_ecrire('informer', "type=rubrique&rac=$rac&id=");
147 147
 
148
-	$onClick = "aff_selection(this.firstChild.title,'$rac" . "_selection','$info', event)";
148
+	$onClick = "aff_selection(this.firstChild.title,'$rac"."_selection','$info', event)";
149 149
 
150 150
 	$ondbClick = "$do(this.firstChild.firstChild.nodeValue,this.firstChild.title,'selection_rubrique', 'id_parent');";
151 151
 
Please login to merge, or discard this patch.
ecrire/exec/upgrade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			. '</b><p> '
45 45
 			. _T(
46 46
 				'texte_nouvelle_version_spip_2',
47
-				['connect' => '<tt>' . _FILE_CONNECT . '</tt>']
47
+				['connect' => '<tt>'._FILE_CONNECT.'</tt>']
48 48
 			)
49 49
 			. generer_form_ecrire(
50 50
 				'upgrade',
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			$GLOBALS['meta']['version_installee'] = 0.0;
66 66
 		} else {
67 67
 			$GLOBALS['meta']['version_installee'] =
68
-				(double)str_replace(',', '.', $GLOBALS['meta']['version_installee']);
68
+				(double) str_replace(',', '.', $GLOBALS['meta']['version_installee']);
69 69
 		}
70 70
 		# NB: str_replace car, sur club-internet, il semble que version_installe soit
71 71
 		# enregistree au format '1,812' et non '1.812'
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 			$commentaire = _T('texte_mise_a_niveau_base_1');
80 80
 		}
81 81
 
82
-		$commentaire .= '<br />[' . $GLOBALS['meta']['version_installee'] . '/' . $GLOBALS['spip_version_base'] . ']';
82
+		$commentaire .= '<br />['.$GLOBALS['meta']['version_installee'].'/'.$GLOBALS['spip_version_base'].']';
83 83
 
84 84
 		$_POST['reinstall'] = 'non'; // pour copy_request dans admin
85 85
 		include_spip('inc/headers');
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
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
 			spip_log('Erreur base de donnees');
37 37
 			echo minipres(
38 38
 				_T('info_travaux_titre'),
39
-				_T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>'
39
+				_T('titre_probleme_technique').'<p><tt>'.sql_errno().' '.sql_error().'</tt></p>'
40 40
 			);
41 41
 		} else {
42 42
 			$res = base_saisie_tables('delete', $res);
43 43
 			include_spip('inc/headers');
44
-			$res = "\n<ol style='text-align:left'><li>\n" .
45
-				join("</li>\n<li>", $res) .
44
+			$res = "\n<ol style='text-align:left'><li>\n".
45
+				join("</li>\n<li>", $res).
46 46
 				'</li></ol>';
47 47
 			$admin = charger_fonction('admin', 'inc');
48 48
 			$res = $admin('delete_all', _T('titre_page_delete_all'), $res);
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
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 
28 28
 $fond = _request('exec');
29
-$GLOBALS['delais'] = 0;// pas de cache !
29
+$GLOBALS['delais'] = 0; // pas de cache !
30 30
 // Securite
31 31
 if (strstr($fond, '/')) {
32 32
 	if (
Please login to merge, or discard this patch.
ecrire/action/activer_plugins.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 	// recuperer les plugins dans l'ordre des $_POST
33 33
 	$test = [];
34 34
 	foreach (liste_plugin_files() as $file) {
35
-		$test['s' . substr(md5(_DIR_PLUGINS . $file), 0, 16)] = $file;
35
+		$test['s'.substr(md5(_DIR_PLUGINS.$file), 0, 16)] = $file;
36 36
 	}
37 37
 	if (defined('_DIR_PLUGINS_SUPPL')) {
38 38
 		foreach (liste_plugin_files(_DIR_PLUGINS_SUPPL) as $file) {
39
-			$test['s' . substr(md5(_DIR_PLUGINS_SUPPL . $file), 0, 16)] = $file;
39
+			$test['s'.substr(md5(_DIR_PLUGINS_SUPPL.$file), 0, 16)] = $file;
40 40
 		}
41 41
 	}
42 42
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		}
49 49
 	}
50 50
 
51
-	spip_log("Changement des plugins actifs par l'auteur " . $GLOBALS['visiteur_session']['id_auteur'] . ': ' . join(
51
+	spip_log("Changement des plugins actifs par l'auteur ".$GLOBALS['visiteur_session']['id_auteur'].': '.join(
52 52
 		',',
53 53
 		$plugin
54 54
 	));
Please login to merge, or discard this patch.
ecrire/action/calculer_taille_cache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@
 block discarded – undo
43 43
 			'ecrire:taille_cache_image',
44 44
 			[
45 45
 				'dir' => joli_repertoire(_DIR_VAR),
46
-				'taille' => '<b>' . (taille_en_octets($taille) > 0 ? taille_en_octets($taille) : '0 octet') . '</b>'
46
+				'taille' => '<b>'.(taille_en_octets($taille) > 0 ? taille_en_octets($taille) : '0 octet').'</b>'
47 47
 			]
48 48
 		);
49 49
 	} else {
50 50
 		include_spip('inc/invalideur');
51 51
 		$taille =
52 52
 			calculer_taille_dossier(_DIR_CACHE_XML)
53
-			+ calculer_taille_dossier(_DIR_CACHE . 'skel/')
54
-			+ calculer_taille_dossier(_DIR_CACHE . 'wheels/')
55
-			+ calculer_taille_dossier(_DIR_CACHE . 'contextes/');
53
+			+ calculer_taille_dossier(_DIR_CACHE.'skel/')
54
+			+ calculer_taille_dossier(_DIR_CACHE.'wheels/')
55
+			+ calculer_taille_dossier(_DIR_CACHE.'contextes/');
56 56
 		$taille += intval(taille_du_cache());
57 57
 		if ($taille <= 150000) {
58 58
 			$res = _T('taille_cache_vide');
Please login to merge, or discard this patch.
ecrire/action/converser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		action_converser_post($lang);
61 61
 	} elseif ($lang = _request('var_lang_ecrire')) {
62 62
 		if ($update_session) {
63
-			sql_updateq('spip_auteurs', ['lang' => $lang], 'id_auteur = ' . $GLOBALS['visiteur_session']['id_auteur']);
63
+			sql_updateq('spip_auteurs', ['lang' => $lang], 'id_auteur = '.$GLOBALS['visiteur_session']['id_auteur']);
64 64
 			$GLOBALS['visiteur_session']['lang'] = $lang;
65 65
 			$session = charger_fonction('session', 'inc');
66 66
 			if ($spip_session = $session($GLOBALS['visiteur_session'])) {
Please login to merge, or discard this patch.
ecrire/action/tester.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			} else {
44 44
 				# Attention GD sait lire le gif mais pas forcement l'ecrire
45 45
 				if (function_exists('ImageCreateFromGIF')) {
46
-					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . 'test.gif');
46
+					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK.'test.gif');
47 47
 					if ($srcImage) {
48 48
 						$gd_formats_read_gif = ',gif';
49 49
 						ImageDestroy($srcImage);
@@ -67,28 +67,28 @@  discard block
 block discarded – undo
67 67
 			# les formats disponibles en ecriture... (cf. inc_logos)
68 68
 
69 69
 			if (function_exists('ImageCreateFromJPEG')) {
70
-				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK . 'test.jpg');
70
+				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK.'test.jpg');
71 71
 				if ($srcImage) {
72 72
 					$gd_formats[] = 'jpg';
73 73
 					ImageDestroy($srcImage);
74 74
 				}
75 75
 			}
76 76
 			if (function_exists('ImageCreateFromGIF')) {
77
-				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . 'test.gif');
77
+				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK.'test.gif');
78 78
 				if ($srcImage) {
79 79
 					$gd_formats[] = 'gif';
80 80
 					ImageDestroy($srcImage);
81 81
 				}
82 82
 			}
83 83
 			if (function_exists('ImageCreateFromPNG')) {
84
-				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK . 'test.png');
84
+				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK.'test.png');
85 85
 				if ($srcImage) {
86 86
 					$gd_formats[] = 'png';
87 87
 					ImageDestroy($srcImage);
88 88
 				}
89 89
 			}
90 90
 			if (function_exists('ImageCreateFromWEBP')) {
91
-				$srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK . 'test.webp');
91
+				$srcImage = @ImageCreateFromWEBP(_ROOT_IMG_PACK.'test.webp');
92 92
 				if ($srcImage) {
93 93
 					$gd_formats[] = 'webp';
94 94
 					ImageDestroy($srcImage);
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 			}
97 97
 		}
98 98
 
99
-		if (! empty($gd_formats)) {
99
+		if (!empty($gd_formats)) {
100 100
 			$gd_formats = join(',', $gd_formats);
101 101
 		}
102
-		ecrire_meta('gd_formats_read', $gd_formats . $gd_formats_read_gif);
102
+		ecrire_meta('gd_formats_read', $gd_formats.$gd_formats_read_gif);
103 103
 		ecrire_meta('gd_formats', $gd_formats);
104 104
 	} // verifier les formats netpbm
105 105
 	else {
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 				_PNMSCALE_COMMAND
124 124
 			);
125 125
 
126
-			$vignette = _ROOT_IMG_PACK . 'test.jpg';
127
-			$dest = _DIR_VAR . 'test-jpg.jpg';
128
-			$commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
126
+			$vignette = _ROOT_IMG_PACK.'test.jpg';
127
+			$dest = _DIR_VAR.'test-jpg.jpg';
128
+			$commande = "$jpegtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
129 129
 			spip_log($commande);
130 130
 			exec($commande);
131 131
 			if ($taille = @getimagesize($dest)) {
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 			}
136 136
 			$giftopnm_command = str_replace('pnmscale', 'giftopnm', _PNMSCALE_COMMAND);
137 137
 			$pnmtojpeg_command = str_replace('pnmscale', 'pnmtojpeg', _PNMSCALE_COMMAND);
138
-			$vignette = _ROOT_IMG_PACK . 'test.gif';
139
-			$dest = _DIR_VAR . 'test-gif.jpg';
140
-			$commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
138
+			$vignette = _ROOT_IMG_PACK.'test.gif';
139
+			$dest = _DIR_VAR.'test-gif.jpg';
140
+			$commande = "$giftopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
141 141
 			spip_log($commande);
142 142
 			exec($commande);
143 143
 			if ($taille = @getimagesize($dest)) {
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 			}
148 148
 
149 149
 			$pngtopnm_command = str_replace('pnmscale', 'pngtopnm', _PNMSCALE_COMMAND);
150
-			$vignette = _ROOT_IMG_PACK . 'test.png';
151
-			$dest = _DIR_VAR . 'test-gif.jpg';
152
-			$commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
150
+			$vignette = _ROOT_IMG_PACK.'test.png';
151
+			$dest = _DIR_VAR.'test-gif.jpg';
152
+			$commande = "$pngtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
153 153
 			spip_log($commande);
154 154
 			exec($commande);
155 155
 			if ($taille = @getimagesize($dest)) {
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 		include_spip('inc/filtres');
174 174
 		include_spip('inc/filtres_images_mini');
175 175
 		$taille_preview = 150;
176
-		$image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
176
+		$image = _image_valeurs_trans(_DIR_IMG_PACK.'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
177 177
 
178
-		$image['fichier_dest'] = _DIR_VAR . "test_$arg";
178
+		$image['fichier_dest'] = _DIR_VAR."test_$arg";
179 179
 
180 180
 		if (
181 181
 			$preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true)
Please login to merge, or discard this patch.
ecrire/action/logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 				_T('login_deconnexion_ok'),
90 90
 				_T('login_verifiez_navigateur'),
91 91
 				_T('login_retour_public'),
92
-				'redirect=' . _DIR_RESTREINT_ABS,
92
+				'redirect='._DIR_RESTREINT_ABS,
93 93
 				_T('login_test_navigateur'),
94 94
 				true
95 95
 			);
Please login to merge, or discard this patch.