Completed
Push — master ( 4ccfda...548ed0 )
by cam
01:16
created
ecrire/inc/completer_traduction.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
 		$champs[] = 'virtuel';
56 56
 	}
57 57
 
58
-	$data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad));
58
+	$data = sql_fetsel('*', $desc['table'], $_id_table.'='.intval($id_trad));
59 59
 
60 60
 	foreach ($champs as $c) {
61 61
 		$set[$c] = $data[$c];
Please login to merge, or discard this patch.
ecrire/inc/cvt_autosave.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,15 +47,15 @@  discard block
 block discarded – undo
47 47
 		$je_suis_poste = $flux['args']['je_suis_poste'];
48 48
 
49 49
 		$cle_autosave = serialize($cle_autosave);
50
-		$cle_autosave = $form . '_' . md5($cle_autosave);
50
+		$cle_autosave = $form.'_'.md5($cle_autosave);
51 51
 
52 52
 		// si on a un backup en session et qu'on est au premier chargement, non poste
53 53
 		// on restitue les donnees
54 54
 		if (
55
-			isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])
55
+			isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])
56 56
 			and !$je_suis_poste
57 57
 		) {
58
-			parse_str($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars);
58
+			parse_str($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave], $vars);
59 59
 			foreach ($vars as $key => $val) {
60 60
 				if (isset($flux['data'][$key])) {
61 61
 					$flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map(
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 		if ($je_suis_poste and _request('autosave') === $cle_autosave and function_exists('terminer_actualiser_sessions')) {
72 72
 			terminer_actualiser_sessions();
73 73
 			// et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide
74
-			if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) {
75
-				session_set('session_autosave_' . $cle_autosave, null);
74
+			if (isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])) {
75
+				session_set('session_autosave_'.$cle_autosave, null);
76 76
 				// en court sleep pour etre certain que la concurrence est finie
77 77
 				sleep(1);
78 78
 				terminer_actualiser_sessions();
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		 */
86 86
 		$flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />"
87 87
 			. '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){
88
-		  $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'] . '/"}).addClass("autosaveon");
88
+		  $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'].'/"}).addClass("autosaveon");
89 89
 			});/*]]>*/</script>';
90 90
 	}
91 91
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	// on elimine les donnees de la session
108 108
 	if ($cle_autosave = _request('autosave')) {
109 109
 		include_spip('inc/session');
110
-		session_set('session_autosave_' . $cle_autosave, null);
110
+		session_set('session_autosave_'.$cle_autosave, null);
111 111
 	}
112 112
 
113 113
 	if (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']) {
Please login to merge, or discard this patch.
ecrire/inc/roles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			$role = $roles['roles']['defaut'];
151 151
 		}
152 152
 		// where
153
-		$cond = ["$colonne_role=" . sql_quote($role)];
153
+		$cond = ["$colonne_role=".sql_quote($role)];
154 154
 	}
155 155
 
156 156
 	return [$role, $colonne_role, $cond];
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	if ($colonne_role) {
186 186
 		// on ajoute la condition du role aux autres conditions.
187 187
 		if ($role != '*') {
188
-			$cond[] = "$colonne_role=" . sql_quote($role);
188
+			$cond[] = "$colonne_role=".sql_quote($role);
189 189
 		}
190 190
 	}
191 191
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 	$all = sql_allfetsel(
370 370
 		"DISTINCT $colone_role",
371 371
 		$l,
372
-		'objet=' . sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source)
372
+		'objet='.sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source)
373 373
 	);
374 374
 	$done[$hash] = array_map('reset', $all);
375 375
 
Please login to merge, or discard this patch.
ecrire/inc/chercher_rubrique.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	if (isset($data[$root])) { # pas de racine sauf pour les rubriques
147 147
 	$r = "<option$selected value='$root' class='$class' style='$style'>$espace"
148 148
 			. $data[$root]
149
-			. '</option>' . "\n";
149
+			. '</option>'."\n";
150 150
 	} else {
151 151
 		$r = '';
152 152
 	}
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	}
175 175
 
176 176
 	// et voila le travail
177
-	return $r . $sous;
177
+	return $r.$sous;
178 178
 }
179 179
 
180 180
 /**
@@ -221,12 +221,12 @@  discard block
 block discarded – undo
221 221
 	while ($r = sql_fetch($q)) {
222 222
 		if (autoriser('voir', 'rubrique', $r['id_rubrique'])) {
223 223
 			// titre largeur maxi a 50
224
-			$titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50);
224
+			$titre = couper(supprimer_tags(typo($r['titre'])).' ', 50);
225 225
 			if (
226 226
 				$GLOBALS['meta']['multi_rubriques'] == 'oui'
227 227
 				and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0)
228 228
 			) {
229
-				$titre .= ' [' . traduire_nom_langue($r['lang']) . ']';
229
+				$titre .= ' ['.traduire_nom_langue($r['lang']).']';
230 230
 			}
231 231
 			$data[$r['id_rubrique']] = $titre;
232 232
 			$enfants[$r['id_parent']][] = $r['id_rubrique'];
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
 	$att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'";
254 254
 
255 255
 	if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) {
256
-		$r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2];
256
+		$r = "<input$att type='hidden' value='".$r[1]."' />".$r[2];
257 257
 	} else {
258
-		$r = '<select' . $att . " size='1'>\n$opt</select>\n";
258
+		$r = '<select'.$att." size='1'>\n$opt</select>\n";
259 259
 	}
260 260
 
261 261
 	# message pour neuneus (a supprimer ?)
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') {
298 298
 
299 299
 	if ($id_rubrique) {
300
-		$titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
300
+		$titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
301 301
 	} else {
302 302
 		if ($type == 'auteur') {
303 303
 			$titre = '&nbsp;';
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	}
308 308
 
309 309
 	$titre = str_replace('&amp;', '&', entites_html(textebrut(typo($titre))));
310
-	$init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'";
310
+	$init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'";
311 311
 
312 312
 	$url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do"
313 313
 		. (!$idem ? '' : "&exclus=$idem")
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 		. " jQuery(this).toggleClass('toggled'); "
357 357
 		. "return charger_node_url_si_vide('"
358 358
 		. $url
359
-		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>"
359
+		. "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>"
360 360
 		. $img_icone
361 361
 		. "</a><img src='"
362 362
 		. chemin_image('loader.svg')
Please login to merge, or discard this patch.
ecrire/inc/meta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			renouvelle_alea();
66 66
 			$new = false;
67 67
 		} else {
68
-			spip_log("impossible d'ecrire dans " . $cache);
68
+			spip_log("impossible d'ecrire dans ".$cache);
69 69
 		}
70 70
 	}
71 71
 	// et refaire le cache si on a du lire en base
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	if (!isset($touch[$table])) {
167 167
 		touch_meta($antidate, $table);
168 168
 	}
169
-	sql_delete('spip_' . $table, "nom='$nom'", '', 'continue');
169
+	sql_delete('spip_'.$table, "nom='$nom'", '', 'continue');
170 170
 	unset($GLOBALS[$table][$nom]);
171 171
 	if (!isset($touch[$table])) {
172 172
 		touch_meta($antidate, $table);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		return;
198 198
 	}
199 199
 	include_spip('base/abstract_sql');
200
-	$res = sql_select('*', 'spip_' . $table, 'nom=' . sql_quote($nom), '', '', '', '', '', 'continue');
200
+	$res = sql_select('*', 'spip_'.$table, 'nom='.sql_quote($nom), '', '', '', '', '', 'continue');
201 201
 	// table pas encore installee, travailler en php seulement
202 202
 	if (!$res) {
203 203
 		$GLOBALS[$table][$nom] = $valeur;
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 		$r['impt'] = sql_quote($importable, '', 'text');
232 232
 	}
233 233
 	if ($row) {
234
-		sql_update('spip_' . $table, $r, 'nom=' . sql_quote($nom));
234
+		sql_update('spip_'.$table, $r, 'nom='.sql_quote($nom));
235 235
 	} else {
236
-		sql_insert('spip_' . $table, '(' . join(',', array_keys($r)) . ')', '(' . join(',', array_values($r)) . ')');
236
+		sql_insert('spip_'.$table, '('.join(',', array_keys($r)).')', '('.join(',', array_values($r)).')');
237 237
 	}
238 238
 	if (!isset($touch[$table])) {
239 239
 		touch_meta($antidate, $table);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
  *     Nom du fichier cache
251 251
  **/
252 252
 function cache_meta($table = 'meta') {
253
-	return ($table == 'meta') ? _FILE_META : (_DIR_CACHE . $table . '.php');
253
+	return ($table == 'meta') ? _FILE_META : (_DIR_CACHE.$table.'.php');
254 254
 }
255 255
 
256 256
 /**
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/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.