Completed
Push — master ( 1da3a1...d54839 )
by cam
01:28
created
ecrire/public.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 	if (!defined('_DIR_RESTREINT_ABS')) {
31 31
 		if (
32 32
 			defined('_DIR_RESTREINT')
33
-			and @file_exists(_ROOT_RESTREINT . 'inc_version.php')
33
+			and @file_exists(_ROOT_RESTREINT.'inc_version.php')
34 34
 		) {
35
-			include_once _ROOT_RESTREINT . 'inc_version.php';
35
+			include_once _ROOT_RESTREINT.'inc_version.php';
36 36
 		} else {
37 37
 			die('inc_version absent ?');
38 38
 		}
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		} // fond demande dans l'url par page=xxxx ?
44 44
 		else {
45 45
 			if (isset($_GET[_SPIP_PAGE])) {
46
-				$fond = (string)$_GET[_SPIP_PAGE];
46
+				$fond = (string) $_GET[_SPIP_PAGE];
47 47
 
48 48
 				// Securite
49 49
 				if (
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			// lancer les taches sur affichage final, comme le cron
108 108
 			// mais sans rien afficher
109 109
 			$GLOBALS['html'] = false; // ne rien afficher
110
-			pipeline('affichage_final' . _PIPELINE_SUFFIX, '');
110
+			pipeline('affichage_final'._PIPELINE_SUFFIX, '');
111 111
 			exit; // le hit est fini !
112 112
 		}
113 113
 	}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	// Content-Type ?
125 125
 	if (!isset($page['entetes']['Content-Type'])) {
126 126
 		$charset = isset($GLOBALS['meta']['charset']) ? $GLOBALS['meta']['charset'] : 'utf-8';
127
-		$page['entetes']['Content-Type'] = 'text/html; charset=' . $charset;
127
+		$page['entetes']['Content-Type'] = 'text/html; charset='.$charset;
128 128
 		$html = true;
129 129
 	} else {
130 130
 		$html = preg_match(',^\s*text/html,', $page['entetes']['Content-Type']);
@@ -150,11 +150,11 @@  discard block
 block discarded – undo
150 150
 
151 151
 	// traitements sur les entetes avant envoi
152 152
 	// peut servir pour le plugin de stats
153
-	$page['entetes'] = pipeline('affichage_entetes_final' . _PIPELINE_SUFFIX, $page['entetes']);
153
+	$page['entetes'] = pipeline('affichage_entetes_final'._PIPELINE_SUFFIX, $page['entetes']);
154 154
 
155 155
 
156 156
 	// eval $page et affecte $res
157
-	include _ROOT_RESTREINT . 'public/evaluer_page.php';
157
+	include _ROOT_RESTREINT.'public/evaluer_page.php';
158 158
 	envoyer_entetes($page['entetes']);
159 159
 	if ($res === false) {
160 160
 		include_spip('inc/autoriser');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	//
174 174
 	// (c'est ici qu'on fait var_recherche, validation, boutons d'admin,
175 175
 	// cf. public/assembler.php)
176
-	echo pipeline('affichage_final' . _PIPELINE_SUFFIX, $page['texte']);
176
+	echo pipeline('affichage_final'._PIPELINE_SUFFIX, $page['texte']);
177 177
 
178 178
 	if ($lang) {
179 179
 		lang_select();
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 		if ($html and ($affiche_boutons_admin or $debug)) {
190 190
 			$var_mode_affiche = _request('var_mode_affiche');
191 191
 			$var_mode_objet = _request('var_mode_objet');
192
-			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet . 'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
192
+			$GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet.'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : '');
193 193
 			echo erreur_squelette(false);
194 194
 		}
195 195
 	} else {
Please login to merge, or discard this patch.
ecrire/auth/ldap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass];
69 69
 
70 70
 	// Si l'utilisateur figure deja dans la base, y recuperer les infos
71
-	$r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur);
71
+	$r = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login)." AND source='ldap'", '', '', '', '', $serveur);
72 72
 
73 73
 	if ($r) {
74 74
 		return array_merge($r, $credentials_ldap);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	if ($r) {
93 93
 		return array_merge(
94 94
 			$credentials_ldap,
95
-			sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($r), '', '', '', '', $serveur)
95
+			sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($r), '', '', '', '', $serveur)
96 96
 		);
97 97
 	}
98 98
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	$connexion = spip_connect($serveur);
122 122
 	if (!is_array($connexion['ldap'])) {
123 123
 		if ($connexion['authentification']['ldap']) {
124
-			$f = _DIR_CONNECT . $connexion['authentification']['ldap'];
124
+			$f = _DIR_CONNECT.$connexion['authentification']['ldap'];
125 125
 			unset($GLOBALS['ldap_link']);
126 126
 			if (is_readable($f)) {
127 127
 				include_once($f);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 	$ldap_link = isset($ldap['link']) ? $ldap['link'] : null;
171 171
 	$ldap_base = isset($ldap['base']) ? $ldap['base'] : null;
172
-	$desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'] ;
172
+	$desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'];
173 173
 
174 174
 	$logins = is_array($desc['login']) ? $desc['login'] : [$desc['login']];
175 175
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	if (!ldap_bind($link, $dn, session_get('ldap_password'))) {
335 335
 		return false;
336 336
 	}
337
-	$encoded_pass = '{MD5}' . base64_encode(pack('H*', md5($new_pass)));
337
+	$encoded_pass = '{MD5}'.base64_encode(pack('H*', md5($new_pass)));
338 338
 	$success = ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]);
339 339
 
340 340
 	return $success;
Please login to merge, or discard this patch.
ecrire/auth/spip.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$row = sql_fetsel(
57 57
 			'alea_actuel, alea_futur',
58 58
 			'spip_auteurs',
59
-			'login=' . sql_quote($login, $serveur, 'text'),
59
+			'login='.sql_quote($login, $serveur, 'text'),
60 60
 			'',
61 61
 			'',
62 62
 			'',
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
 		if ($row) {
68 68
 			include_spip('auth/sha256.inc');
69
-			$shapass = spip_sha256($row['alea_actuel'] . $pass);
70
-			$shanext = spip_sha256($row['alea_futur'] . $pass);
71
-			$md5pass = md5($row['alea_actuel'] . $pass);
69
+			$shapass = spip_sha256($row['alea_actuel'].$pass);
70
+			$shanext = spip_sha256($row['alea_futur'].$pass);
71
+			$md5pass = md5($row['alea_actuel'].$pass);
72 72
 		}
73 73
 	}
74 74
 
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 	$row = sql_fetsel(
81 81
 		'*',
82 82
 		'spip_auteurs',
83
-		'login=' . sql_quote($login, $serveur, 'text') . ' AND pass=' . sql_quote(
83
+		'login='.sql_quote($login, $serveur, 'text').' AND pass='.sql_quote(
84 84
 			$shapass,
85 85
 			$serveur,
86 86
 			'text'
87
-		) . " AND statut<>'5poubelle'",
87
+		)." AND statut<>'5poubelle'",
88 88
 		'',
89 89
 		'',
90 90
 		'',
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 		$row = sql_fetsel(
98 98
 			'*',
99 99
 			'spip_auteurs',
100
-			'login=' . sql_quote($login, $serveur, 'text') . ' AND pass=' . sql_quote(
100
+			'login='.sql_quote($login, $serveur, 'text').' AND pass='.sql_quote(
101 101
 				$md5pass,
102 102
 				$serveur,
103 103
 				'text'
104
-			) . " AND statut<>'5poubelle'",
104
+			)." AND statut<>'5poubelle'",
105 105
 			'',
106 106
 			'',
107 107
 			'',
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 			'alea_actuel' => 'alea_futur',
124 124
 			'pass' => sql_quote($shanext, $serveur, 'text'),
125 125
 			'alea_futur' => sql_quote(creer_uniqid(), $serveur, 'text')
126
-		], 'id_auteur=' . $row['id_auteur'] . ' AND pass IN (' . sql_quote(
126
+		], 'id_auteur='.$row['id_auteur'].' AND pass IN ('.sql_quote(
127 127
 			$shapass,
128 128
 			$serveur,
129 129
 			'text'
130
-		) . ', ' . sql_quote($md5pass, $serveur, 'text') . ')', '', $serveur);
130
+		).', '.sql_quote($md5pass, $serveur, 'text').')', '', $serveur);
131 131
 		// En profiter pour verifier la securite de tmp/
132 132
 		// Si elle ne fonctionne pas a l'installation, prevenir
133 133
 		if (!verifier_htaccess(_DIR_TMP) and defined('_ECRIRE_INSTALL')) {
@@ -163,16 +163,16 @@  discard block
 block discarded – undo
163 163
 
164 164
 	// javascript qui gere la securite du login en evitant de faire circuler le pass en clair
165 165
 	$flux['data'] .=
166
-		($compat_md5 ? '<script type="text/javascript" src="' . _DIR_JAVASCRIPT . 'md5.js"></script>' : '')
167
-		. '<script type="text/javascript" src="' . _DIR_JAVASCRIPT . 'login-sha-min.js"></script>'
166
+		($compat_md5 ? '<script type="text/javascript" src="'._DIR_JAVASCRIPT.'md5.js"></script>' : '')
167
+		. '<script type="text/javascript" src="'._DIR_JAVASCRIPT.'login-sha-min.js"></script>'
168 168
 		. '<script type="text/javascript">/*<![CDATA[*/'
169
-		. "var login_info={'alea_actuel':'" . $flux['args']['contexte']['_alea_actuel'] . "',"
170
-		. "'alea_futur':'" . $flux['args']['contexte']['_alea_futur'] . "',"
171
-		. "'login':'" . $flux['args']['contexte']['var_login'] . "',"
172
-		. "'page_auteur': '" . generer_url_public('informer_auteur') . "',"
169
+		. "var login_info={'alea_actuel':'".$flux['args']['contexte']['_alea_actuel']."',"
170
+		. "'alea_futur':'".$flux['args']['contexte']['_alea_futur']."',"
171
+		. "'login':'".$flux['args']['contexte']['var_login']."',"
172
+		. "'page_auteur': '".generer_url_public('informer_auteur')."',"
173 173
 		. "'informe_auteur_en_cours':false,"
174 174
 		. "'attente_informe':0,"
175
-		. "'compat_md5':" . ($compat_md5 ? 'true' : 'false') . '};'
175
+		. "'compat_md5':".($compat_md5 ? 'true' : 'false').'};'
176 176
 		. "jQuery(function(){
177 177
 	jQuery('#var_login').change(actualise_auteur);
178 178
 	jQuery('form#formulaire_login').submit(login_submit);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		} else {
216 216
 			$n = sql_countsel(
217 217
 				'spip_auteurs',
218
-				'login=' . sql_quote($new_login) . ' AND id_auteur!=' . intval($id_auteur) . " AND statut!='5poubelle'",
218
+				'login='.sql_quote($new_login).' AND id_auteur!='.intval($id_auteur)." AND statut!='5poubelle'",
219 219
 				'',
220 220
 				'',
221 221
 				$serveur
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	}
244 244
 	if (
245 245
 		!$id_auteur = intval($id_auteur)
246
-		or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur)
246
+		or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur)
247 247
 	) {
248 248
 		return false;
249 249
 	}
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 		$anciens = sql_allfetsel(
259 259
 			'id_auteur',
260 260
 			'spip_auteurs',
261
-			'login=' . sql_quote($new_login, $serveur, 'text') . " AND statut='5poubelle'",
261
+			'login='.sql_quote($new_login, $serveur, 'text')." AND statut='5poubelle'",
262 262
 			'',
263 263
 			'',
264 264
 			'',
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
 		$r = sql_getfetsel(
293 293
 			'login',
294 294
 			'spip_auteurs',
295
-			"statut<>'5poubelle'" .
296
-			' AND (length(pass)>0)' .
295
+			"statut<>'5poubelle'".
296
+			' AND (length(pass)>0)'.
297 297
 			" AND (login=$l)",
298 298
 			'',
299 299
 			'',
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
 		return sql_getfetsel(
313 313
 			'login',
314 314
 			'spip_auteurs',
315
-			"statut<>'5poubelle'" .
316
-			' AND (length(pass)>0)' .
315
+			"statut<>'5poubelle'".
316
+			' AND (length(pass)>0)'.
317 317
 			" AND (login<>'' AND (nom=$l OR email=$l))",
318 318
 			'',
319 319
 			'',
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
 	if (
405 405
 		!$id_auteur = intval($id_auteur)
406
-		or !sql_fetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur)
406
+		or !sql_fetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur)
407 407
 	) {
408 408
 		return false;
409 409
 	}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	$htpass = generer_htpass($new_pass);
415 415
 	$alea_actuel = creer_uniqid();
416 416
 	$alea_futur = creer_uniqid();
417
-	$pass = spip_sha256($alea_actuel . $new_pass);
417
+	$pass = spip_sha256($alea_actuel.$new_pass);
418 418
 	$c['pass'] = $pass;
419 419
 	$c['htpass'] = $htpass;
420 420
 	$c['alea_actuel'] = $alea_actuel;
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 		or isset($champs['statut'])
451 451
 		or (isset($options['all']) and $options['all'])
452 452
 	) {
453
-		$htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME;
454
-		$htpasswd = _DIR_TMP . _AUTH_USER_FILE;
453
+		$htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME;
454
+		$htpasswd = _DIR_TMP._AUTH_USER_FILE;
455 455
 
456 456
 		// Cette variable de configuration peut etre posee par un plugin
457 457
 		// par exemple acces_restreint ;
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 			and !@file_exists($htaccess)
462 462
 		) {
463 463
 			spip_unlink($htpasswd);
464
-			spip_unlink($htpasswd . '-admin');
464
+			spip_unlink($htpasswd.'-admin');
465 465
 
466 466
 			return;
467 467
 		}
@@ -479,16 +479,16 @@  discard block
 block discarded – undo
479 479
 		);
480 480
 		while ($t = sql_fetch($s)) {
481 481
 			if (strlen($t['login']) and strlen($t['htpass'])) {
482
-				$p1 .= $t['login'] . ':' . $t['htpass'] . "\n";
482
+				$p1 .= $t['login'].':'.$t['htpass']."\n";
483 483
 				if ($t['statut'] == '0minirezo') {
484
-					$p2 .= $t['login'] . ':' . $t['htpass'] . "\n";
484
+					$p2 .= $t['login'].':'.$t['htpass']."\n";
485 485
 				}
486 486
 			}
487 487
 		}
488 488
 		sql_free($s);
489 489
 		if ($p1) {
490 490
 			ecrire_fichier($htpasswd, $p1);
491
-			ecrire_fichier($htpasswd . '-admin', $p2);
491
+			ecrire_fichier($htpasswd.'-admin', $p2);
492 492
 			spip_log("Ecriture de $htpasswd et $htpasswd-admin");
493 493
 		}
494 494
 	}
Please login to merge, or discard this patch.
ecrire/balise/logo_.php 1 patch
Spacing   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		if ($fichier) {
109 109
 			$code = "quete_logo_file($doc, $qconnect)";
110 110
 		} else {
111
-			$code = "quete_logo_document($doc, " . ($lien ? $lien : "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
111
+			$code = "quete_logo_document($doc, ".($lien ? $lien : "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)";
112 112
 		}
113 113
 		// (x=non-faux ? y : '') pour affecter x en retournant y
114 114
 		if ($p->descr['documents']) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 	// demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0}
127 127
 	if ($coord_x or $coord_y) {
128
-		$code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))";
128
+		$code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))";
129 129
 	}
130 130
 
131 131
 	$p->code = $code;
@@ -158,14 +158,12 @@  discard block
 block discarded – undo
158 158
  *     Code compilé retournant le chemin du logo ou le code HTML du logo.
159 159
  **/
160 160
 function logo_survol($id_objet, $_id_objet, $type, $align, $fichier, $_lien, $p, $suite) {
161
-	$code = "quete_logo('$id_objet', '" .
162
-		(($suite == '_SURVOL') ? 'off' :
163
-			(($suite == '_NORMAL') ? 'on' : 'ON')) .
164
-		"', $_id_objet," .
161
+	$code = "quete_logo('$id_objet', '".
162
+		(($suite == '_SURVOL') ? 'off' : (($suite == '_NORMAL') ? 'on' : 'ON')).
163
+		"', $_id_objet,".
165 164
 		(($suite == '_RUBRIQUE') ?
166
-			champ_sql('id_rubrique', $p) :
167
-			(($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")) .
168
-		', ' . intval($fichier) . ')';
165
+			champ_sql('id_rubrique', $p) : (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")).
166
+		', '.intval($fichier).')';
169 167
 
170 168
 	if ($fichier) {
171 169
 		return $code;
@@ -173,5 +171,5 @@  discard block
 block discarded – undo
173 171
 
174 172
 	$align = preg_replace(',\W,', '', $align);
175 173
 
176
-	return "quete_html_logo($code, '$align', " . ($_lien ? $_lien : "''") . ')';
174
+	return "quete_html_logo($code, '$align', ".($_lien ? $_lien : "''").')';
177 175
 }
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
@@ -73,5 +73,5 @@
 block discarded – undo
73 73
 		return '';
74 74
 	}
75 75
 
76
-	return generer_url_action('logout', 'logout=public&url=' . rawurlencode($cible ? $cible : self('&')));
76
+	return generer_url_action('logout', 'logout=public&url='.rawurlencode($cible ? $cible : self('&')));
77 77
 }
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($cible), '&');
113
+	$post = generer_url_action('converser', 'redirect='.rawurlencode($cible), '&');
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
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 			}
102 102
 			foreach ($debug['sourcefile'] as $k => $v) {
103 103
 				if (strpos($v, 'administration.') !== false) {
104
-					if (isset($debug['resultat'][$k . 'tout'])) {
105
-						return $debug['resultat'][$k . 'tout'];
104
+					if (isset($debug['resultat'][$k.'tout'])) {
105
+						return $debug['resultat'][$k.'tout'];
106 106
 					}
107 107
 				}
108 108
 			}
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 			and $id = intval($id)
181 181
 			and $desc = $trouver_table(table_objet_sql($type))
182 182
 		) {
183
-			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . intval($id));
183
+			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".intval($id));
184 184
 			if ($id) {
185 185
 				$env[$_id_type] = $id;
186 186
 				$env['objet'] = $type;
187 187
 				$env['id_objet'] = $id;
188
-				$env['voir_' . $obj] =
188
+				$env['voir_'.$obj] =
189 189
 					str_replace('&amp;', '&', generer_url_entite($id, $obj, '', '', false));
190 190
 				if (
191 191
 					isset($desc['field']['id_rubrique'])
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
 	$notpub = sql_in('statut', ['prop', 'prive']);
240 240
 
241 241
 	if ($type == 'article' and $GLOBALS['meta']['post_dates'] != 'oui') {
242
-		$notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ')';
242
+		$notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).')';
243 243
 	}
244 244
 
245
-	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . '=' . $id . " AND ($notpub)");
245
+	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type).'='.$id." AND ($notpub)");
246 246
 }
247 247
 
248 248
 
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 	$alang = '';
257 257
 	if (!empty($_COOKIE['spip_admin'])) {
258 258
 		$email_or_login = preg_replace(',^@,', '', $_COOKIE['spip_admin']);
259
-		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email=' . sql_quote($email_or_login));
259
+		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email='.sql_quote($email_or_login));
260 260
 		if (!$alang) {
261
-			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login=' . sql_quote($email_or_login));
261
+			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login='.sql_quote($email_or_login));
262 262
 		}
263 263
 	}
264 264
 	if (!$alang) {
@@ -283,9 +283,8 @@  discard block
 block discarded – undo
283 283
 
284 284
 	return ((!isset($GLOBALS['xhtml']) or $GLOBALS['xhtml'] !== 'true') ?
285 285
 		(parametre_url(self(), 'var_mode', 'debug', '&')
286
-			. '&var_mode_affiche=validation') :
287
-		('http://validator.w3.org/check?uri='
288
-			. rawurlencode('http://' . $_SERVER['HTTP_HOST'] . nettoyer_uri())));
286
+			. '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri='
287
+			. rawurlencode('http://'.$_SERVER['HTTP_HOST'].nettoyer_uri())));
289 288
 }
290 289
 
291 290
 /**
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
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 function generer_generer_url_arg($type, $p, $_id) {
76 76
 	if ($s = trouver_nom_serveur_distant($p)) {
77 77
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
78
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
78
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
79 79
 			return $f($type, $_id, $s);
80 80
 		}
81 81
 		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 		# exception des urls de documents sur un serveur distant...
86 86
 		if ($type == 'document') {
87 87
 			return
88
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
89
-				"quete_meta('dir_img', $s) . \n\t" .
88
+				"quete_meta('adresse_site', $s) . '/' .\n\t".
89
+				"quete_meta('dir_img', $s) . \n\t".
90 90
 				"quete_fichier($_id,$s)";
91 91
 		}
92 92
 		$s = ", '', '', $s, quete_meta('type_urls', $s)";
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
  */
231 231
 function balise_URL_SITE_SPIP_dist($p) {
232 232
 	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
233
-	$p->code = 'spip_htmlspecialchars(' . $p->code . ')';
233
+	$p->code = 'spip_htmlspecialchars('.$p->code.')';
234 234
 	$p->interdire_scripts = false;
235 235
 
236 236
 	return $p;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	if ($s = trouver_nom_serveur_distant($p)) {
272 272
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
273 273
 		// elle devra aussi traiter le cas derogatoire type=page
274
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
274
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
275 275
 			if ($args and $args !== "''") {
276 276
 				$code .= ", $args";
277 277
 			}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			$p->code = $code;
280 280
 			return $p;
281 281
 		}
282
-		$s = 'connect=' . addslashes($s);
282
+		$s = 'connect='.addslashes($s);
283 283
 		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
284 284
 	}
285 285
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		$code = "generer_url_public($code, $args$noentities)";
295 295
 	}
296 296
 	$p->code = $code;
297
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
297
+	spip_log("Calcul url page : connect vaut $s ca donne :".$p->code." args $args", _LOG_INFO);
298 298
 
299 299
 	#$p->interdire_scripts = true;
300 300
 	return $p;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			$fonc .= ",$args$noentities";
339 339
 		}
340 340
 	}
341
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
341
+	$p->code = 'generer_url_ecrire('.$fonc.')';
342 342
 	$p->interdire_scripts = false;
343 343
 
344 344
 	return $p;
@@ -373,17 +373,17 @@  discard block
 block discarded – undo
373 373
 
374 374
 	$args = interprete_argument_balise(2, $p);
375 375
 	if ($args != "''" && $args !== null) {
376
-		$p->code .= ',' . $args;
376
+		$p->code .= ','.$args;
377 377
 	}
378 378
 	$redirect = interprete_argument_balise(3, $p);
379 379
 	if ($redirect != "''" && $redirect !== null) {
380 380
 		if ($args == "''" || $args === null) {
381 381
 			$p->code .= ",''";
382 382
 		}
383
-		$p->code .= ',' . $redirect;
383
+		$p->code .= ','.$redirect;
384 384
 	}
385 385
 
386
-	$p->code = 'generer_action_auteur(' . $p->code . ')';
386
+	$p->code = 'generer_action_auteur('.$p->code.')';
387 387
 	$p->interdire_scripts = false;
388 388
 
389 389
 	return $p;
Please login to merge, or discard this patch.
ecrire/balise/formulaire_ecrire_auteur.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		);
87 87
 		foreach ($s as $row) {
88 88
 			if (email_valide($row['email'])) {
89
-				$r .= ', ' . $row['email'];
89
+				$r .= ', '.$row['email'];
90 90
 			}
91 91
 		}
92 92
 		$args[2] = substr($r, 2);
Please login to merge, or discard this patch.