Completed
Push — master ( 350a8b...37aa61 )
by cam
01:39
created
ecrire/genie/mail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		$headers = '';
51 51
 		if (isset($page['entetes']) && (is_countable($page['entetes']) ? count($page['entetes']) : 0)) {
52 52
 			foreach ($page['entetes'] as $k => $v) {
53
-				$headers .= (strlen((string) $v) ? "$k: $v" : $k) . "\n";
53
+				$headers .= (strlen((string) $v) ? "$k: $v" : $k)."\n";
54 54
 			}
55 55
 		}
56 56
 
Please login to merge, or discard this patch.
ecrire/public.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	if (!defined('_DIR_RESTREINT_ABS')) {
30 30
 		if (
31 31
 			defined('_DIR_RESTREINT')
32
-			&& @file_exists(_ROOT_RESTREINT . 'inc_version.php')
32
+			&& @file_exists(_ROOT_RESTREINT.'inc_version.php')
33 33
 		) {
34
-			include_once _ROOT_RESTREINT . 'inc_version.php';
34
+			include_once _ROOT_RESTREINT.'inc_version.php';
35 35
 		} else {
36 36
 			die('inc_version absent ?');
37 37
 		}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		} // fond demande dans l'url par page=xxxx ?
43 43
 		else {
44 44
 			if (isset($_GET[_SPIP_PAGE])) {
45
-				$fond = (string)$_GET[_SPIP_PAGE];
45
+				$fond = (string) $_GET[_SPIP_PAGE];
46 46
 
47 47
 				// Securite
48 48
 				if (
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			// lancer les taches sur affichage final, comme le cron
102 102
 			// mais sans rien afficher
103 103
 			$GLOBALS['html'] = false; // ne rien afficher
104
-			pipeline('affichage_final' . _PIPELINE_SUFFIX, '');
104
+			pipeline('affichage_final'._PIPELINE_SUFFIX, '');
105 105
 			exit; // le hit est fini !
106 106
 		}
107 107
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	// Content-Type ?
119 119
 	if (!isset($page['entetes']['Content-Type'])) {
120 120
 		$charset = $GLOBALS['meta']['charset'] ?? 'utf-8';
121
-		$page['entetes']['Content-Type'] = 'text/html; charset=' . $charset;
121
+		$page['entetes']['Content-Type'] = 'text/html; charset='.$charset;
122 122
 		$html = true;
123 123
 	} else {
124 124
 		$html = preg_match(',^\s*text/html,', (string) $page['entetes']['Content-Type']);
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 
145 145
 	// traitements sur les entetes avant envoi
146 146
 	// peut servir pour le plugin de stats
147
-	$page['entetes'] = pipeline('affichage_entetes_final' . _PIPELINE_SUFFIX, $page['entetes']);
147
+	$page['entetes'] = pipeline('affichage_entetes_final'._PIPELINE_SUFFIX, $page['entetes']);
148 148
 
149 149
 
150 150
 	// eval $page et affecte $res
151
-	include _ROOT_RESTREINT . 'public/evaluer_page.php';
151
+	include _ROOT_RESTREINT.'public/evaluer_page.php';
152 152
 	envoyer_entetes($page['entetes']);
153 153
 	if ($res === false) {
154 154
 		include_spip('inc/autoriser');
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	//
168 168
 	// (c'est ici qu'on fait var_recherche, validation, boutons d'admin,
169 169
 	// cf. public/assembler.php)
170
-	echo pipeline('affichage_final' . _PIPELINE_SUFFIX, $page['texte']);
170
+	echo pipeline('affichage_final'._PIPELINE_SUFFIX, $page['texte']);
171 171
 
172 172
 	if ($lang) {
173 173
 		lang_select();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		if ($html && ($affiche_boutons_admin || $debug)) {
184 184
 			$var_mode_affiche = _request('var_mode_affiche');
185 185
 			$var_mode_objet = _request('var_mode_objet');
186
-			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet . 'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
186
+			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet.'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
187 187
 			echo erreur_squelette(false);
188 188
 		}
189 189
 	} else {
Please login to merge, or discard this patch.
ecrire/balise/formulaire_.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
 			foreach ($erreurs as $k => $v) {
312 312
 				if (is_string($v) && strlen(trim($v)) && !str_starts_with((string) $k, '_')) {
313 313
 					// on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form
314
-					$valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>';
314
+					$valeurs['erreurs'][$k] = "<span role='alert'>".$erreurs[$k].'</span>';
315 315
 				}
316 316
 			}
317 317
 		}
Please login to merge, or discard this patch.
ecrire/balise/info_.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@
 block discarded – undo
53 53
 		$_params = '[';
54 54
 		$nb_params = is_countable($p->param[0]) ? count($p->param[0]) : 0; // 1ère valeur vide donc 1 en plus
55 55
 		for ($i = 3; $i < $nb_params; $i++) {
56
-			$_params .= interprete_argument_balise($i, $p) . ',';
56
+			$_params .= interprete_argument_balise($i, $p).',';
57 57
 		}
58 58
 		$_params .= ']';
59 59
 
60 60
 		$info_sql = strtolower(substr((string) $info, 5));
61
-		$code = "generer_objet_info($id_objet, $type_objet, '$info_sql', " . ($p->etoile ? _q($p->etoile) : "''") . ", $_params)";
61
+		$code = "generer_objet_info($id_objet, $type_objet, '$info_sql', ".($p->etoile ? _q($p->etoile) : "''").", $_params)";
62 62
 		$p->code = champ_sql($info, $p, $code);
63 63
 		$p->interdire_scripts = true;
64 64
 
Please login to merge, or discard this patch.
ecrire/balise/url_logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,5 +72,5 @@
 block discarded – undo
72 72
 		return '';
73 73
 	}
74 74
 
75
-	return generer_url_action('logout', 'logout=public&url=' . rawurlencode((string) ($cible ?: self('&'))));
75
+	return generer_url_action('logout', 'logout=public&url='.rawurlencode((string) ($cible ?: self('&'))));
76 76
 }
Please login to merge, or discard this patch.
ecrire/balise/url_.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 function generer_generer_url_arg($type, $p, $_id) {
75 75
 	if ($s = trouver_nom_serveur_distant($p)) {
76 76
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
77
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
77
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
78 78
 			return $f($type, $_id, $s);
79 79
 		}
80 80
 		if (!$GLOBALS['connexions'][strtolower((string) $s)]['spip_connect_version']) {
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 		# exception des urls de documents sur un serveur distant...
85 85
 		if ($type == 'document') {
86 86
 			return
87
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
88
-				"quete_meta('dir_img', $s) . \n\t" .
87
+				"quete_meta('adresse_site', $s) . '/' .\n\t".
88
+				"quete_meta('dir_img', $s) . \n\t".
89 89
 				"quete_fichier($_id,$s)";
90 90
 		}
91 91
 		$s = ", '', '', $s, quete_meta('type_urls', $s)";
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
  */
226 226
 function balise_URL_SITE_SPIP_dist($p) {
227 227
 	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
228
-	$p->code = 'spip_htmlspecialchars(' . $p->code . ')';
228
+	$p->code = 'spip_htmlspecialchars('.$p->code.')';
229 229
 	$p->interdire_scripts = false;
230 230
 
231 231
 	return $p;
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 	if ($s = trouver_nom_serveur_distant($p)) {
267 267
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
268 268
 		// elle devra aussi traiter le cas derogatoire type=page
269
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
269
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
270 270
 			if ($args && $args !== "''") {
271 271
 				$code .= ", $args";
272 272
 			}
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 			$p->code = $code;
275 275
 			return $p;
276 276
 		}
277
-		$s = 'connect=' . addslashes((string) $s);
277
+		$s = 'connect='.addslashes((string) $s);
278 278
 		$args = (($args && $args !== "''") ? "$args . '&$s'" : "'$s'");
279 279
 	}
280 280
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		$code = "generer_url_public($code, $args$noentities)";
290 290
 	}
291 291
 	$p->code = $code;
292
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
292
+	spip_log("Calcul url page : connect vaut $s ca donne :".$p->code." args $args", _LOG_INFO);
293 293
 
294 294
 	#$p->interdire_scripts = true;
295 295
 	return $p;
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 			$fonc .= ",$args$noentities";
334 334
 		}
335 335
 	}
336
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
336
+	$p->code = 'generer_url_ecrire('.$fonc.')';
337 337
 	$p->interdire_scripts = false;
338 338
 
339 339
 	return $p;
@@ -368,17 +368,17 @@  discard block
 block discarded – undo
368 368
 
369 369
 	$args = interprete_argument_balise(2, $p);
370 370
 	if ($args != "''" && $args !== null) {
371
-		$p->code .= ',' . $args;
371
+		$p->code .= ','.$args;
372 372
 	}
373 373
 	$redirect = interprete_argument_balise(3, $p);
374 374
 	if ($redirect != "''" && $redirect !== null) {
375 375
 		if ($args == "''" || $args === null) {
376 376
 			$p->code .= ",''";
377 377
 		}
378
-		$p->code .= ',' . $redirect;
378
+		$p->code .= ','.$redirect;
379 379
 	}
380 380
 
381
-	$p->code = 'generer_action_auteur(' . $p->code . ')';
381
+	$p->code = 'generer_action_auteur('.$p->code.')';
382 382
 	$p->interdire_scripts = false;
383 383
 
384 384
 	return $p;
Please login to merge, or discard this patch.
ecrire/balise/logo_.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		if ($fichier) {
110 110
 			$code = "quete_logo_file($doc, $qconnect)";
111 111
 		} else {
112
-			$code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
112
+			$code = "quete_logo_document($doc, ".($lien ?: "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
113 113
 		}
114 114
 		// (x=non-faux ? y : '') pour affecter x en retournant y
115 115
 		if ($p->descr['documents']) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 	// demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
134 134
 	if ($coord_x || $coord_y) {
135
-		$code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
135
+		$code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))";
136 136
 	}
137 137
 
138 138
 	$p->code = $code;
Please login to merge, or discard this patch.
ecrire/balise/menu_lang_ecrire.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	include_spip('inc/lang');
100 100
 
101 101
 	if ($GLOBALS['spip_lang'] != $default) {
102
-		$opt = lang_select($default);  # et remplace
102
+		$opt = lang_select($default); # et remplace
103 103
 		if ($GLOBALS['spip_lang'] != $default) {
104
-			$default = '';  # annule tout choix par defaut
104
+			$default = ''; # annule tout choix par defaut
105 105
 			if ($opt) {
106 106
 				lang_select();
107 107
 			}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	# lien a partir de /
112 112
 	$cible = parametre_url(self(), 'lang', '', '&');
113
-	$post = generer_url_action('converser', 'redirect=' . rawurlencode((string) $cible), true);
113
+	$post = generer_url_action('converser', 'redirect='.rawurlencode((string) $cible), true);
114 114
 
115 115
 	return [
116 116
 		'formulaires/menu_lang',
Please login to merge, or discard this patch.
ecrire/balise/formulaire_admin.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 				return '';
100 100
 			}
101 101
 			foreach ($debug['sourcefile'] as $k => $v) {
102
-				if (str_contains((string) $v, 'administration.') && isset($debug['resultat'][$k . 'tout'])) {
103
-					return $debug['resultat'][$k . 'tout'];
102
+				if (str_contains((string) $v, 'administration.') && isset($debug['resultat'][$k.'tout'])) {
103
+					return $debug['resultat'][$k.'tout'];
104 104
 				}
105 105
 			}
106 106
 
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
 			&& ($id = (int) $id)
178 178
 			&& ($desc = $trouver_table(table_objet_sql($type)))
179 179
 		) {
180
-			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . (int) $id);
180
+			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".(int) $id);
181 181
 			if ($id) {
182 182
 				$env[$_id_type] = $id;
183 183
 				$env['objet'] = $type;
184 184
 				$env['id_objet'] = $id;
185
-				$env['voir_' . $obj] = str_replace('&amp;', '&', (string) generer_objet_url($id, $obj, '', '', false));
185
+				$env['voir_'.$obj] = str_replace('&amp;', '&', (string) generer_objet_url($id, $obj, '', '', false));
186 186
 				if (
187 187
 					isset($desc['field']['id_rubrique'])
188 188
 					&& $type != 'rubrique'
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
235 235
 	$notpub = sql_in('statut', ['prop', 'prive']);
236 236
 
237 237
 	if ($type == 'article' && $GLOBALS['meta']['post_dates'] != 'oui') {
238
-		$notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ')';
238
+		$notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).')';
239 239
 	}
240 240
 
241
-	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . '=' . $id . " AND ($notpub)");
241
+	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type).'='.$id." AND ($notpub)");
242 242
 }
243 243
 
244 244
 
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
 	$alang = '';
253 253
 	if (!empty($_COOKIE['spip_admin'])) {
254 254
 		$email_or_login = preg_replace(',^@,', '', (string) $_COOKIE['spip_admin']);
255
-		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email=' . sql_quote($email_or_login));
255
+		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email='.sql_quote($email_or_login));
256 256
 		if (!$alang) {
257
-			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login=' . sql_quote($email_or_login));
257
+			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login='.sql_quote($email_or_login));
258 258
 		}
259 259
 	}
260 260
 	if (!$alang) {
@@ -279,9 +279,8 @@  discard block
 block discarded – undo
279 279
 
280 280
 	return ((!isset($GLOBALS['xhtml']) || $GLOBALS['xhtml'] !== 'true') ?
281 281
 		(parametre_url(self(), 'var_mode', 'debug', '&')
282
-			. '&var_mode_affiche=validation') :
283
-		('http://validator.w3.org/check?uri='
284
-			. rawurlencode('http://' . $_SERVER['HTTP_HOST'] . nettoyer_uri())));
282
+			. '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri='
283
+			. rawurlencode('http://'.$_SERVER['HTTP_HOST'].nettoyer_uri())));
285 284
 }
286 285
 
287 286
 /**
Please login to merge, or discard this patch.