Completed
Push — master ( c3f20e...6d7580 )
by cam
01:15
created
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.
ecrire/action/purger.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			supprime_invalideurs();
62 62
 			@spip_unlink(_CACHE_RUBRIQUES);
63 63
 			@spip_unlink(_CACHE_CHEMIN);
64
-			@spip_unlink(_DIR_TMP . 'plugin_xml_cache.gz');
64
+			@spip_unlink(_DIR_TMP.'plugin_xml_cache.gz');
65 65
 			// on ne supprime que _CACHE_PLUGINS_OPT qui declenche la reconstruction des 3
66 66
 			// _CACHE_PIPELINES _CACHE_PLUGINS_PATH et _CACHE_PLUGINS_FCT
67 67
 			// pour eviter des problemes de concurence
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 			@spip_unlink(_CACHE_PLUGINS_OPT);
73 73
 			purger_repertoire(_DIR_CACHE, ['subdir' => true]);
74 74
 			purger_repertoire(_DIR_AIDE);
75
-			purger_repertoire(_DIR_VAR . 'cache-css');
76
-			purger_repertoire(_DIR_VAR . 'cache-js');
75
+			purger_repertoire(_DIR_VAR.'cache-css');
76
+			purger_repertoire(_DIR_VAR.'cache-js');
77 77
 			break;
78 78
 
79 79
 		case 'squelettes':
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 			break;
82 82
 
83 83
 		case 'vignettes':
84
-			purger_repertoire(_DIR_VAR . 'cache-gd2', ['subdir' => true]);
85
-			purger_repertoire(_DIR_VAR . 'cache-texte', ['subdir' => true]);
86
-			purger_repertoire(_DIR_VAR . 'cache-vignettes', ['subdir' => true]);
87
-			purger_repertoire(_DIR_VAR . 'cache-TeX', ['subdir' => true]);
84
+			purger_repertoire(_DIR_VAR.'cache-gd2', ['subdir' => true]);
85
+			purger_repertoire(_DIR_VAR.'cache-texte', ['subdir' => true]);
86
+			purger_repertoire(_DIR_VAR.'cache-vignettes', ['subdir' => true]);
87
+			purger_repertoire(_DIR_VAR.'cache-TeX', ['subdir' => true]);
88 88
 			supprime_invalideurs();
89 89
 			purger_repertoire(_DIR_CACHE, ['subdir' => true]);
90 90
 			break;
Please login to merge, or discard this patch.
ecrire/action/editer_rubrique.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			$id_rubrique,
151 151
 			[
152 152
 			'data' => $set,
153
-			'nonvide' => ['titre' => _T('titre_nouvelle_rubrique') . ' ' . _T('info_numero_abbreviation') . $id_rubrique]
153
+			'nonvide' => ['titre' => _T('titre_nouvelle_rubrique').' '._T('info_numero_abbreviation').$id_rubrique]
154 154
 			],
155 155
 			$c
156 156
 		)
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 				)
255 255
 			) {
256 256
 				if ($s['statut'] != 'new') {
257
-					spip_log("deplacement de $id_rubrique vers $id_parent refuse a " . $GLOBALS['visiteur_session']['id_auteur'] . ' ' . $GLOBALS['visiteur_session']['statut']);
257
+					spip_log("deplacement de $id_rubrique vers $id_parent refuse a ".$GLOBALS['visiteur_session']['id_auteur'].' '.$GLOBALS['visiteur_session']['statut']);
258 258
 				}
259 259
 			} elseif (editer_rubrique_breves($id_rubrique, $id_parent, $c)) {
260 260
 				$statut_ancien = $s['statut'];
Please login to merge, or discard this patch.
ecrire/action/confirmer_inscription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 			if (autoriser('ecrire', '', '', $auteur['id_auteur'])) {
56 56
 				// poser un cookie admin aussi
57 57
 				$cookie = charger_fonction('cookie', 'action');
58
-				$cookie('@' . $GLOBALS['visiteur_session']['login']);
58
+				$cookie('@'.$GLOBALS['visiteur_session']['login']);
59 59
 				$GLOBALS['redirect'] = _DIR_RESTREINT_ABS;
60 60
 			} else {
61 61
 				$GLOBALS['redirect'] = $GLOBALS['meta']['adresse_site'];
Please login to merge, or discard this patch.
ecrire/action/referencer_traduction.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$id_lier = sql_getfetsel(
57 57
 			'id_trad',
58 58
 			$table_objet_sql,
59
-			"$id_table_objet=" . intval($id_trad) . " AND NOT($id_table_objet=" . intval($id_objet) . ')'
59
+			"$id_table_objet=".intval($id_trad)." AND NOT($id_table_objet=".intval($id_objet).')'
60 60
 		);
61 61
 		if ($id_lier === null) {
62 62
 			spip_log("echec lien de trad vers objet $objet/$id_objet incorrect ($id_trad)");
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 			sql_updateq($table_objet_sql, ['id_trad' => $id_trad], "id_trad = $id_lier");
76 76
 		} // sinon ajouter notre objet dans le groupe
77 77
 		else {
78
-			sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=" . intval($id_objet));
78
+			sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=".intval($id_objet));
79 79
 		}
80 80
 	} // on a fourni un id_trad nul : sortir id_objet du groupe de trad
81 81
 	else {
82
-		$old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=" . intval($id_objet));
82
+		$old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=".intval($id_objet));
83 83
 		// supprimer le lien de traduction
84
-		sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=" . intval($id_objet));
84
+		sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=".intval($id_objet));
85 85
 
86 86
 		// Verifier si l'ancien groupe ne comporte plus qu'un seul objet. Alors mettre a zero.
87
-		$cpt = sql_countsel($table_objet_sql, 'id_trad=' . intval($old_id_trad));
87
+		$cpt = sql_countsel($table_objet_sql, 'id_trad='.intval($old_id_trad));
88 88
 		if ($cpt == 1) {
89
-			sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad=' . intval($old_id_trad));
89
+			sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad='.intval($old_id_trad));
90 90
 		}
91 91
 	}
92 92
 
Please login to merge, or discard this patch.
ecrire/action/confirmer_email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 		$redirect = _request('redirect') and !$arg == sql_getfetsel(
43 43
 			'email',
44 44
 			'spip_auteurs',
45
-			'id_auteur=' . intval($GLOBALS['visiteur_session'])
45
+			'id_auteur='.intval($GLOBALS['visiteur_session'])
46 46
 		)
47 47
 	) {
48 48
 		$GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', '');
Please login to merge, or discard this patch.
ecrire/action/supprimer_rubrique.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	return;
21 21
 }
22 22
 
23
-include_spip('inc/charsets');  # pour le nom de fichier
23
+include_spip('inc/charsets'); # pour le nom de fichier
24 24
 
25 25
 /**
26 26
  * Effacer une rubrique
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	if (intval($id_rubrique)) {
39
-		sql_delete('spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
39
+		sql_delete('spip_rubriques', 'id_rubrique='.intval($id_rubrique));
40 40
 		// Les admin restreints qui n'administraient que cette rubrique
41 41
 		// deviennent redacteurs
42 42
 		// (il y a sans doute moyen de faire ca avec un having)
43 43
 
44
-		$q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=" . intval($id_rubrique));
44
+		$q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=".intval($id_rubrique));
45 45
 		while ($r = sql_fetch($q)) {
46 46
 			$id_auteur = $r['id_auteur'];
47 47
 			// degrader avant de supprimer la restriction d'admin
48 48
 			// section critique sur les droits
49 49
 			$n = sql_countsel(
50 50
 				'spip_auteurs_liens',
51
-				"objet='rubrique' AND id_objet!=" . intval($id_rubrique) . ' AND id_auteur=' . intval($id_auteur)
51
+				"objet='rubrique' AND id_objet!=".intval($id_rubrique).' AND id_auteur='.intval($id_auteur)
52 52
 			);
53 53
 			if (!$n) {
54 54
 				include_spip('action/editer_auteur');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			}
57 57
 			sql_delete(
58 58
 				'spip_auteurs_liens',
59
-				"objet='rubrique' AND id_objet=" . intval($id_rubrique) . ' AND id_auteur=' . intval($id_auteur)
59
+				"objet='rubrique' AND id_objet=".intval($id_rubrique).' AND id_auteur='.intval($id_auteur)
60 60
 			);
61 61
 		}
62 62
 		// menu_rubriques devra recalculer
Please login to merge, or discard this patch.