Completed
Pull Request — master (#39)
by
unknown
09:06
created
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 = array();
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
 			$plugin));
53 53
 	ecrire_plugin_actifs($plugin);
54 54
 
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
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	if ($err = objet_modifier_champs('rubrique', $id_rubrique,
143 143
 		array(
144 144
 			'data' => $set,
145
-			'nonvide' => array('titre' => _T('titre_nouvelle_rubrique') . " " . _T('info_numero_abbreviation') . $id_rubrique)
145
+			'nonvide' => array('titre' => _T('titre_nouvelle_rubrique')." "._T('info_numero_abbreviation').$id_rubrique)
146 146
 		),
147 147
 		$c)
148 148
 	) {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 			)
241 241
 			) {
242 242
 				if ($s['statut'] != 'new') {
243
-					spip_log("deplacement de $id_rubrique vers $id_parent refuse a " . $GLOBALS['visiteur_session']['id_auteur'] . ' ' . $GLOBALS['visiteur_session']['statut']);
243
+					spip_log("deplacement de $id_rubrique vers $id_parent refuse a ".$GLOBALS['visiteur_session']['id_auteur'].' '.$GLOBALS['visiteur_session']['statut']);
244 244
 				}
245 245
 			} elseif (editer_rubrique_breves($id_rubrique, $id_parent, $c)) {
246 246
 				$statut_ancien = $s['statut'];
Please login to merge, or discard this patch.
ecrire/action/editer_objet.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
  * @return mixed|string
76 76
  */
77 77
 function objet_modifier($objet, $id, $set = null) {
78
-	if (include_spip('action/editer_' . $objet)
79
-		and function_exists($modifier = $objet . "_modifier")
78
+	if (include_spip('action/editer_'.$objet)
79
+		and function_exists($modifier = $objet."_modifier")
80 80
 	) {
81 81
 		return $modifier($id, $set);
82 82
 	}
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
  * @return bool|int
160 160
  */
161 161
 function objet_inserer($objet, $id_parent = null, $set = null) {
162
-	if (include_spip('action/editer_' . $objet)
163
-		and function_exists($inserer = $objet . "_inserer")
162
+	if (include_spip('action/editer_'.$objet)
163
+		and function_exists($inserer = $objet."_inserer")
164 164
 	) {
165 165
 		return $inserer($id_parent, $set);
166 166
 	}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			$row = sql_fetsel("id_rubrique, id_secteur, lang", "spip_rubriques", "id_parent=0", '', '0+titre,titre', "1");
182 182
 			$id_rubrique = $row['id_rubrique'];
183 183
 		} else {
184
-			$row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=" . intval($id_rubrique));
184
+			$row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=".intval($id_rubrique));
185 185
 		}
186 186
 
187 187
 		$champs['id_rubrique'] = $id_rubrique;
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
  * @return string
288 288
  */
289 289
 function objet_instituer($objet, $id, $c, $calcul_rub = true) {
290
-	if (include_spip('action/editer_' . $objet)
291
-		and function_exists($instituer = $objet . "_instituer")
290
+	if (include_spip('action/editer_'.$objet)
291
+		and function_exists($instituer = $objet."_instituer")
292 292
 	) {
293 293
 		return $instituer($id, $c, $calcul_rub);
294 294
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	$sel[] = ($champ_date ? "$champ_date as date" : "'' as date");
318 318
 	$sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : "0 as id_rubrique");
319 319
 
320
-	$row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id));
320
+	$row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.intval($id));
321 321
 
322 322
 	$id_rubrique = $row['id_rubrique'];
323 323
 	$statut_ancien = $statut = $row['statut'];
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 			if ($s != 'publie' and autoriser('modifier', $objet, $id)) {
340 340
 				$statut = $champs['statut'] = $s;
341 341
 			} else {
342
-				spip_log("editer_objet $id refus " . join(' ', $c));
342
+				spip_log("editer_objet $id refus ".join(' ', $c));
343 343
 			}
344 344
 		}
345 345
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 		and isset($c['id_parent'])
368 368
 		and $id_parent = $c['id_parent']
369 369
 		and $id_parent != $id_rubrique
370
-		and (sql_fetsel('1', "spip_rubriques", "id_rubrique=" . intval($id_parent)))
370
+		and (sql_fetsel('1', "spip_rubriques", "id_rubrique=".intval($id_parent)))
371 371
 	) {
372 372
 		$champs['id_rubrique'] = $id_parent;
373 373
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 	// changer aussi son secteur et sa langue (si heritee)
463 463
 	if (isset($champs['id_rubrique'])) {
464 464
 
465
-		$row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=" . sql_quote($champs['id_rubrique']));
465
+		$row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=".sql_quote($champs['id_rubrique']));
466 466
 		$langue = $row_rub['lang'];
467 467
 
468 468
 		if (isset($desc['field']['id_secteur'])) {
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 
472 472
 		if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) {
473 473
 			if (sql_fetsel('1', $table_sql,
474
-				id_table_objet($objet) . "=" . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue))) {
474
+				id_table_objet($objet)."=".intval($id)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue))) {
475 475
 				$champs['lang'] = $langue;
476 476
 			}
477 477
 		}
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 	if (!$champs) {
481 481
 		return;
482 482
 	}
483
-	sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id));
483
+	sql_updateq($table_sql, $champs, id_table_objet($objet).'='.intval($id));
484 484
 
485 485
 	// Changer le statut des rubriques concernees
486 486
 	if ($cond) {
Please login to merge, or discard this patch.
ecrire/action/cookie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	if ($change_session == 'oui') {
60 60
 		$session = charger_fonction('session', 'inc');
61 61
 		$session(true);
62
-		spip_log("statut 204 pour " . $_SERVER['REQUEST_URI']);
62
+		spip_log("statut 204 pour ".$_SERVER['REQUEST_URI']);
63 63
 		http_status(204); // No Content
64 64
 		return;
65 65
 	}
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			ask_php_auth(_T('info_connexion_refusee'),
78 78
 				_T('login_login_pass_incorrect'),
79 79
 				_T('login_retour_site'),
80
-				"url=" . rawurlencode($redirect),
80
+				"url=".rawurlencode($redirect),
81 81
 				_T('login_nouvelle_tentative'),
82 82
 				(strpos($url, _DIR_RESTREINT_ABS) !== false));
83 83
 		}
Please login to merge, or discard this patch.
ecrire/action/super_cron.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 			isset($parts['port']) ? $parts['port'] : 80,
43 43
 			$errno, $errstr, 30);
44 44
 		if ($fp) {
45
-			$out = "GET " . $parts['path'] . "?" . $parts['query'] . " HTTP/1.1\r\n";
46
-			$out .= "Host: " . $parts['host'] . "\r\n";
45
+			$out = "GET ".$parts['path']."?".$parts['query']." HTTP/1.1\r\n";
46
+			$out .= "Host: ".$parts['host']."\r\n";
47 47
 			$out .= "Connection: Close\r\n\r\n";
48 48
 			fwrite($fp, $out);
49 49
 			fclose($fp);
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
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	// verifier avant de rediriger pour invalider le message de confirmation
40 40
 	// si ca n'a pas marche
41 41
 	if ($redirect = _request('redirect') and !$arg == sql_getfetsel('email', 'spip_auteurs',
42
-			'id_auteur=' . intval($GLOBALS['visiteur_session']))
42
+			'id_auteur='.intval($GLOBALS['visiteur_session']))
43 43
 	) {
44 44
 		$GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', '');
45 45
 	}
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/menu_rubriques.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 	// si pas acces a ecrire, pas acces au menu
39 39
 	// on renvoi un 401 qui fait echouer la requete ajax silencieusement
40 40
 	if (!autoriser('ecrire')) {
41
-		$retour = "<ul class='cols_1'><li class='toutsite'><a href='" . generer_url_ecrire('accueil') . "'>" . _T('public:lien_connecter') . "</a></li></ul>";
41
+		$retour = "<ul class='cols_1'><li class='toutsite'><a href='".generer_url_ecrire('accueil')."'>"._T('public:lien_connecter')."</a></li></ul>";
42 42
 		include_spip('inc/actions');
43 43
 		ajax_retour($retour);
44 44
 		exit;
45 45
 	}
46 46
 
47 47
 	if ($date = intval(_request('date'))) {
48
-		header("Last-Modified: " . gmdate("D, d M Y H:i:s", $date) . " GMT");
48
+		header("Last-Modified: ".gmdate("D, d M Y H:i:s", $date)." GMT");
49 49
 	}
50 50
 
51 51
 	$r = gen_liste_rubriques();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		and !strstr($_SERVER['SERVER_SOFTWARE'], 'IIS/')
55 55
 	) {
56 56
 		include_spip('inc/headers');
57
-		header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']);
57
+		header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']);
58 58
 		http_status(304);
59 59
 		exit;
60 60
 	} else {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
  *     Code HTML présentant la liste des rubriques
76 76
  **/
77 77
 function menu_rubriques($complet = true) {
78
-	$ret = "<li class='toutsite'><a href='" . generer_url_ecrire('plan') . "'>" . _T('info_tout_site') . "</a></li>";
78
+	$ret = "<li class='toutsite'><a href='".generer_url_ecrire('plan')."'>"._T('info_tout_site')."</a></li>";
79 79
 
80 80
 	if (!$complet) {
81 81
 		return "<ul class='cols_1'>$ret\n</ul>\n";
Please login to merge, or discard this patch.
ecrire/action/tester.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			} else {
45 45
 				# Attention GD sait lire le gif mais pas forcement l'ecrire
46 46
 				if (function_exists('ImageCreateFromGIF')) {
47
-					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
47
+					$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK."test.gif");
48 48
 					if ($srcImage) {
49 49
 						$gd_formats_read_gif = ",gif";
50 50
 						ImageDestroy($srcImage);
@@ -65,21 +65,21 @@  discard block
 block discarded – undo
65 65
 			# les formats disponibles en ecriture... (cf. inc_logos)
66 66
 
67 67
 			if (function_exists('ImageCreateFromJPEG')) {
68
-				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK . "test.jpg");
68
+				$srcImage = @ImageCreateFromJPEG(_ROOT_IMG_PACK."test.jpg");
69 69
 				if ($srcImage) {
70 70
 					$gd_formats[] = "jpg";
71 71
 					ImageDestroy($srcImage);
72 72
 				}
73 73
 			}
74 74
 			if (function_exists('ImageCreateFromGIF')) {
75
-				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK . "test.gif");
75
+				$srcImage = @ImageCreateFromGIF(_ROOT_IMG_PACK."test.gif");
76 76
 				if ($srcImage) {
77 77
 					$gd_formats[] = "gif";
78 78
 					ImageDestroy($srcImage);
79 79
 				}
80 80
 			}
81 81
 			if (function_exists('ImageCreateFromPNG')) {
82
-				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK . "test.png");
82
+				$srcImage = @ImageCreateFromPNG(_ROOT_IMG_PACK."test.png");
83 83
 				if ($srcImage) {
84 84
 					$gd_formats[] = "png";
85 85
 					ImageDestroy($srcImage);
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 			}
88 88
 		}
89 89
 
90
-		if (! empty($gd_formats)) {
90
+		if (!empty($gd_formats)) {
91 91
 			$gd_formats = join(",", $gd_formats);
92 92
 		}
93
-		ecrire_meta("gd_formats_read", $gd_formats . $gd_formats_read_gif);
93
+		ecrire_meta("gd_formats_read", $gd_formats.$gd_formats_read_gif);
94 94
 		ecrire_meta("gd_formats", $gd_formats);
95 95
 	} // verifier les formats netpbm
96 96
 	else {
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 			$pnmtojpeg_command = str_replace("pnmscale",
109 109
 				"pnmtojpeg", _PNMSCALE_COMMAND);
110 110
 
111
-			$vignette = _ROOT_IMG_PACK . "test.jpg";
112
-			$dest = _DIR_VAR . "test-jpg.jpg";
113
-			$commande = "$jpegtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
111
+			$vignette = _ROOT_IMG_PACK."test.jpg";
112
+			$dest = _DIR_VAR."test-jpg.jpg";
113
+			$commande = "$jpegtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
114 114
 			spip_log($commande);
115 115
 			exec($commande);
116 116
 			if ($taille = @getimagesize($dest)) {
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 			}
121 121
 			$giftopnm_command = str_replace("pnmscale", "giftopnm", _PNMSCALE_COMMAND);
122 122
 			$pnmtojpeg_command = str_replace("pnmscale", "pnmtojpeg", _PNMSCALE_COMMAND);
123
-			$vignette = _ROOT_IMG_PACK . "test.gif";
124
-			$dest = _DIR_VAR . "test-gif.jpg";
125
-			$commande = "$giftopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
123
+			$vignette = _ROOT_IMG_PACK."test.gif";
124
+			$dest = _DIR_VAR."test-gif.jpg";
125
+			$commande = "$giftopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
126 126
 			spip_log($commande);
127 127
 			exec($commande);
128 128
 			if ($taille = @getimagesize($dest)) {
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 			}
133 133
 
134 134
 			$pngtopnm_command = str_replace("pnmscale", "pngtopnm", _PNMSCALE_COMMAND);
135
-			$vignette = _ROOT_IMG_PACK . "test.png";
136
-			$dest = _DIR_VAR . "test-gif.jpg";
137
-			$commande = "$pngtopnm_command $vignette | " . _PNMSCALE_COMMAND . " -width 10 | $pnmtojpeg_command > $dest";
135
+			$vignette = _ROOT_IMG_PACK."test.png";
136
+			$dest = _DIR_VAR."test-gif.jpg";
137
+			$commande = "$pngtopnm_command $vignette | "._PNMSCALE_COMMAND." -width 10 | $pnmtojpeg_command > $dest";
138 138
 			spip_log($commande);
139 139
 			exec($commande);
140 140
 			if ($taille = @getimagesize($dest)) {
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 		include_spip('inc/filtres');
159 159
 		include_spip('inc/filtres_images_mini');
160 160
 		$taille_preview = 150;
161
-		$image = _image_valeurs_trans(_DIR_IMG_PACK . 'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
161
+		$image = _image_valeurs_trans(_DIR_IMG_PACK.'test_image.jpg', "reduire-$taille_preview-$taille_preview", 'jpg');
162 162
 
163
-		$image['fichier_dest'] = _DIR_VAR . "test_$arg";
163
+		$image['fichier_dest'] = _DIR_VAR."test_$arg";
164 164
 
165 165
 		if ($preview = _image_creer_vignette($image, $taille_preview, $taille_preview, $arg, true)
166 166
 			and ($preview['width'] * $preview['height'] > 0)
Please login to merge, or discard this patch.