Completed
Pull Request — master (#36)
by
unknown
06:08
created
ecrire/inc/acces.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
  *     Mot de passe
32 32
  **/
33 33
 function creer_pass_aleatoire($longueur = 8, $sel = '') {
34
-	$seed = (int)round(((float)microtime() + 1) * time());
34
+	$seed = (int) round(((float) microtime() + 1) * time());
35 35
 
36 36
 	mt_srand($seed);
37 37
 	srand($seed);
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 			if (!$s) {
44 44
 				$s = rand();
45 45
 			}
46
-			$s = substr(md5(uniqid($s) . $sel), 0, 16);
46
+			$s = substr(md5(uniqid($s).$sel), 0, 16);
47 47
 		}
48
-		$r = unpack('Cr', pack('H2', $s . $s));
48
+		$r = unpack('Cr', pack('H2', $s.$s));
49 49
 		$x = $r['r'] & 63;
50 50
 		if ($x < 10) {
51 51
 			$x = chr($x + 48);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	static $seeded;
84 84
 
85 85
 	if (!$seeded) {
86
-		$seed = (int)round(((float)microtime() + 1) * time());
86
+		$seed = (int) round(((float) microtime() + 1) * time());
87 87
 		mt_srand($seed);
88 88
 		srand($seed);
89 89
 		$seeded = true;
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 	foreach ($args as $val => $var) {
193 193
 		if ($var) {
194 194
 			if ($val <> 'statut') {
195
-				$a .= ':' . $val . '-' . $var;
195
+				$a .= ':'.$val.'-'.$var;
196 196
 			}
197
-			$b .= $val . '=' . $var . '&';
197
+			$b .= $val.'='.$var.'&';
198 198
 		}
199 199
 	}
200 200
 	$a = substr($a, 1);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
  *     Clé
225 225
  **/
226 226
 function afficher_low_sec($id_auteur, $action = '') {
227
-	return substr(md5($action . low_sec($id_auteur)), 0, 8);
227
+	return substr(md5($action.low_sec($id_auteur)), 0, 8);
228 228
 }
229 229
 
230 230
 /**
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
  */
266 266
 function initialiser_sel() {
267 267
 	if (CRYPT_MD5) {
268
-		$GLOBALS['htsalt'] = '$1$' . creer_pass_aleatoire();
268
+		$GLOBALS['htsalt'] = '$1$'.creer_pass_aleatoire();
269 269
 	} else {
270 270
 		return '';
271 271
 	}
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
  *     - void sinon.
286 286
  **/
287 287
 function ecrire_acces() {
288
-	$htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME;
289
-	$htpasswd = _DIR_TMP . _AUTH_USER_FILE;
288
+	$htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME;
289
+	$htpasswd = _DIR_TMP._AUTH_USER_FILE;
290 290
 
291 291
 	// Cette variable de configuration peut etre posee par un plugin
292 292
 	// par exemple acces_restreint ;
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		and !@file_exists($htaccess)
297 297
 	) {
298 298
 		spip_unlink($htpasswd);
299
-		spip_unlink($htpasswd . '-admin');
299
+		spip_unlink($htpasswd.'-admin');
300 300
 		return;
301 301
 	}
302 302
 
@@ -313,15 +313,15 @@  discard block
 block discarded – undo
313 313
 	$s = sql_select('login, htpass, statut', 'spip_auteurs', sql_in('statut', array('1comite', '0minirezo', 'nouveau')));
314 314
 	while ($t = sql_fetch($s)) {
315 315
 		if (strlen($t['login']) and strlen($t['htpass'])) {
316
-			$p1 .= $t['login'] . ':' . $t['htpass'] . "\n";
316
+			$p1 .= $t['login'].':'.$t['htpass']."\n";
317 317
 			if ($t['statut'] == '0minirezo') {
318
-				$p2 .= $t['login'] . ':' . $t['htpass'] . "\n";
318
+				$p2 .= $t['login'].':'.$t['htpass']."\n";
319 319
 			}
320 320
 		}
321 321
 	}
322 322
 	if ($p1) {
323 323
 		ecrire_fichier($htpasswd, $p1);
324
-		ecrire_fichier($htpasswd . '-admin', $p2);
324
+		ecrire_fichier($htpasswd.'-admin', $p2);
325 325
 		spip_log("Ecriture de $htpasswd et $htpasswd-admin");
326 326
 	}
327 327
 }
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
  * @return boolean
355 355
  */
356 356
 function verifier_htaccess($rep, $force = false) {
357
-	$htaccess = rtrim($rep, '/') . '/' . _ACCESS_FILE_NAME;
357
+	$htaccess = rtrim($rep, '/').'/'._ACCESS_FILE_NAME;
358 358
 	if (((@file_exists($htaccess)) or defined('_TEST_DIRS')) and !$force) {
359 359
 		return true;
360 360
 	}
@@ -381,19 +381,19 @@  discard block
 block discarded – undo
381 381
 		fputs($ht, $deny);
382 382
 		fclose($ht);
383 383
 		@chmod($htaccess, _SPIP_CHMOD & 0666);
384
-		$t = rtrim($rep, '/') . '/.ok';
384
+		$t = rtrim($rep, '/').'/.ok';
385 385
 		if ($ht = @fopen($t, 'w')) {
386 386
 			@fclose($ht);
387 387
 			include_spip('inc/distant');
388 388
 			$t = substr($t, strlen(_DIR_RACINE));
389
-			$t = url_de_base() . $t;
389
+			$t = url_de_base().$t;
390 390
 			$ht = recuperer_lapage($t, false, 'HEAD', 0);
391 391
 			// htaccess inoperant si on a recupere des entetes HTTP
392 392
 			// (ignorer la reussite si connexion par fopen)
393 393
 			$ht = !(isset($ht[0]) and $ht[0]);
394 394
 		}
395 395
 	}
396
-	spip_log("Creation de $htaccess " . ($ht ? ' reussie' : ' manquee'));
396
+	spip_log("Creation de $htaccess ".($ht ? ' reussie' : ' manquee'));
397 397
 
398 398
 	return $ht;
399 399
 }
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
 	$dirs = sql_allfetsel('extension', 'spip_types_documents');
420 420
 	$dirs[] = array('extension' => 'distant');
421 421
 	foreach ($dirs as $e) {
422
-		if (is_dir($dir = _DIR_IMG . $e['extension'])) {
422
+		if (is_dir($dir = _DIR_IMG.$e['extension'])) {
423 423
 			if ($f) {
424 424
 				verifier_htaccess($dir);
425 425
 			} else {
426
-				spip_unlink($dir . '/' . _ACCESS_FILE_NAME);
426
+				spip_unlink($dir.'/'._ACCESS_FILE_NAME);
427 427
 			}
428 428
 		}
429 429
 	}
Please login to merge, or discard this patch.
ecrire/inc/cvt_configurer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	) {
39 39
 		// Pour tous les formulaires CONFIGURER, ayant une fonction charger ou pas, on teste si autorisé
40 40
 		include_spip('inc/autoriser');
41
-		if (!autoriser('configurer', '_' . substr($form, 11))) {
41
+		if (!autoriser('configurer', '_'.substr($form, 11))) {
42 42
 			return false;
43 43
 		}
44 44
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		and !charger_fonction("traiter", "formulaires/$form/", true) // sans fonction traiter()
72 72
 	) {
73 73
 		$trace = cvtconf_formulaires_configurer_enregistre($form, $flux['args']['args']);
74
-		$flux['data'] = array('message_ok' => _T('config_info_enregistree') . $trace, 'editable' => true);
74
+		$flux['data'] = array('message_ok' => _T('config_info_enregistree').$trace, 'editable' => true);
75 75
 	}
76 76
 
77 77
 	return $flux;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		$prefixe = $valeurs['_meta_prefixe'];
146 146
 	}
147 147
 	if (isset($valeurs['_meta_stockage'])) {
148
-		$stockage = $valeurs['_meta_stockage'] . '::';
148
+		$stockage = $valeurs['_meta_stockage'].'::';
149 149
 	}
150 150
 
151 151
 	// si on indique juste une table, il faut vider les autres proprietes
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	$valeurs = array('editable' => ' ');
170 170
 
171 171
 	// sinon cas analyse du squelette
172
-	if ($f = find_in_path($form . '.' . _EXTENSION_SQUELETTES, 'formulaires/')
172
+	if ($f = find_in_path($form.'.'._EXTENSION_SQUELETTES, 'formulaires/')
173 173
 		and lire_fichier($f, $contenu)
174 174
 	) {
175 175
 
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
 		lire_metas($table);
225 225
 	}
226 226
 
227
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
227
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
228 228
 	$table = ($table) ? "/$table/" : "";
229
-	$casier = ($casier) ? rtrim($casier, '/') . '/' : ""; // slash final, sinon rien
229
+	$casier = ($casier) ? rtrim($casier, '/').'/' : ""; // slash final, sinon rien
230 230
 
231 231
 	foreach ($store as $k => $v) {
232 232
 		ecrire_config("$stockage$table$prefixe$casier$k", $v);
233 233
 		if (_request('var_mode') == 'configurer' and autoriser('webmestre')) {
234
-			$trace .= "<br />table $table : " . $prefixe . $k . " = $v;";
234
+			$trace .= "<br />table $table : ".$prefixe.$k." = $v;";
235 235
 		}
236 236
 	}
237 237
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	list($table, $casier, $prefixe, $stockage) = cvtconf_definir_configurer_conteneur($form, $valeurs);
249 249
 
250 250
 	$table = ($table) ? "/$table/" : "";
251
-	$prefixe = ($prefixe ? $prefixe . '_' : '');
251
+	$prefixe = ($prefixe ? $prefixe.'_' : '');
252 252
 	if ($casier) {
253 253
 		$meta = lire_config("$stockage$table$prefixe$casier");
254 254
 		$prefixe = '';
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
 	foreach ($valeurs as $k => $v) {
261 261
 		if (substr($k, 0, 1) !== '_') {
262
-			$valeurs[$k] = (isset($meta[$prefixe . $k]) ? $meta[$prefixe . $k] : null);
262
+			$valeurs[$k] = (isset($meta[$prefixe.$k]) ? $meta[$prefixe.$k] : null);
263 263
 		}
264 264
 	}
265 265
 }
Please login to merge, or discard this patch.
ecrire/inc/auth.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	}
60 60
 
61 61
 	$n = intval(sql_errno());
62
-	spip_log("Erreur base de donnees $n " . sql_error());
62
+	spip_log("Erreur base de donnees $n ".sql_error());
63 63
 
64 64
 	return $n ? $n : 1;
65 65
 }
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 		// erreur SQL a afficher
86 86
 		$raison = minipres(
87 87
 			_T('info_travaux_titre'),
88
-			_T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>'
88
+			_T('titre_probleme_technique').'<p><tt>'.sql_errno().' '.sql_error().'</tt></p>'
89 89
 		);
90 90
 	} elseif (@$raison['statut']) {
91 91
 		// un simple visiteur n'a pas acces a l'espace prive
92
-		spip_log('connexion refusee a ' . @$raison['id_auteur']);
92
+		spip_log('connexion refusee a '.@$raison['id_auteur']);
93 93
 		$raison = minipres(_T('avis_erreur_connexion'), _T('avis_erreur_visiteur'));
94 94
 	} else {
95 95
 		// auteur en fin de droits ...
@@ -178,8 +178,7 @@  discard block
 block discarded – undo
178 178
 	$where = (is_numeric($id_auteur)
179 179
 		/*AND $id_auteur>0*/ // reprise lors des restaurations
180 180
 	) ?
181
-		"id_auteur=$id_auteur" :
182
-		(!strlen($GLOBALS['connect_login']) ? '' : 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text'));
181
+		"id_auteur=$id_auteur" : (!strlen($GLOBALS['connect_login']) ? '' : 'login='.sql_quote($GLOBALS['connect_login'], '', 'text'));
183 182
 
184 183
 	if (!$where) {
185 184
 		return '';
@@ -221,7 +220,7 @@  discard block
 block discarded – undo
221 220
 	$GLOBALS['connect_login'] = $row['login'];
222 221
 	$GLOBALS['connect_statut'] = $row['statut'];
223 222
 
224
-	$GLOBALS['visiteur_session'] = array_merge((array)$GLOBALS['visiteur_session'], $row);
223
+	$GLOBALS['visiteur_session'] = array_merge((array) $GLOBALS['visiteur_session'], $row);
225 224
 
226 225
 	// au cas ou : ne pas memoriser les champs sensibles
227 226
 	unset($GLOBALS['visiteur_session']['pass']);
@@ -290,7 +289,7 @@  discard block
 block discarded – undo
290 289
  * @return string
291 290
  */
292 291
 function auth_a_loger() {
293
-	$redirect = generer_url_public('login', 'url=' . rawurlencode(self('&', true)), '&');
292
+	$redirect = generer_url_public('login', 'url='.rawurlencode(self('&', true)), '&');
294 293
 
295 294
 	// un echec au "bonjour" (login initial) quand le statut est
296 295
 	// inconnu signale sans doute un probleme de cookies
@@ -328,7 +327,7 @@  discard block
 block discarded – undo
328 327
 	}
329 328
 
330 329
 	if (abs(strtotime($date) - $connect_quand) >= 60) {
331
-		sql_updateq('spip_auteurs', array('en_ligne' => $date), 'id_auteur=' . intval($row['id_auteur']));
330
+		sql_updateq('spip_auteurs', array('en_ligne' => $date), 'id_auteur='.intval($row['id_auteur']));
332 331
 		$row['en_ligne'] = $date;
333 332
 	}
334 333
 
@@ -435,14 +434,14 @@  discard block
 block discarded – undo
435 434
 function auth_informer_login($login, $serveur = '') {
436 435
 	if (!$login
437 436
 		or !$login_base = auth_retrouver_login($login, $serveur)
438
-		or !$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
437
+		or !$row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
439 438
 	) {
440 439
 
441 440
 		// generer de fausses infos, mais credibles, pour eviter une attaque
442 441
 		// https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691
443 442
 		include_spip('inc/securiser_action');
444
-		$fauxalea1 = md5('fauxalea' . secret_du_site() . $login . floor(date('U') / 86400));
445
-		$fauxalea2 = md5('fauxalea' . secret_du_site() . $login . ceil(date('U') / 86400));
443
+		$fauxalea1 = md5('fauxalea'.secret_du_site().$login.floor(date('U') / 86400));
444
+		$fauxalea2 = md5('fauxalea'.secret_du_site().$login.ceil(date('U') / 86400));
446 445
 
447 446
 		$row = array(
448 447
 			'login' => $login,
@@ -564,7 +563,7 @@  discard block
 block discarded – undo
564 563
 	sql_updateq(
565 564
 		'spip_auteurs',
566 565
 		array('prefs' => serialize($p)),
567
-		'id_auteur=' . intval($auteur['id_auteur'])
566
+		'id_auteur='.intval($auteur['id_auteur'])
568 567
 	);
569 568
 
570 569
 	//  bloquer ici le visiteur qui tente d'abuser de ses droits
@@ -728,7 +727,7 @@  discard block
 block discarded – undo
728 727
 		return false;
729 728
 	}
730 729
 
731
-	$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login, $serveur, 'text'), '', '', '', '', $serveur);
730
+	$row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login, $serveur, 'text'), '', '', '', '', $serveur);
732 731
 
733 732
 	if (!$row) {
734 733
 		if (spip_connect_ldap($serveur)
@@ -780,11 +779,11 @@  discard block
 block discarded – undo
780 779
 	$retour = $retour ? $retour : _T('icone_retour');
781 780
 	$corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] ";
782 781
 	if ($url) {
783
-		$corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]";
782
+		$corps .= "[<a href='".generer_url_action('cookie', "essai_auth_http=oui&$url")."'>$re</a>]";
784 783
 	}
785 784
 
786 785
 	if ($lien) {
787
-		$corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]';
786
+		$corps .= " [<a href='$ecrire'>"._T('login_espace_prive').'</a>]';
788 787
 	}
789 788
 	include_spip('inc/minipres');
790 789
 	echo minipres($pb, $corps);
Please login to merge, or discard this patch.
ecrire/inc/preselectionner_parent_nouvel_objet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@
 block discarded – undo
47 47
 		$id_rubrique = $row_rub['id_rubrique'];
48 48
 	}
49 49
 	// si le choix ne convient pas, on cherche dans un secteur
50
-	if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) {
50
+	if (!autoriser('creer'.$objet.'dans', 'rubrique', $id_rubrique)) {
51 51
 		$id_rubrique = '';
52 52
 		// manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises
53 53
 		$res = sql_select("id_rubrique", "spip_rubriques", "id_parent=0");
54 54
 		while (!$id_rubrique and $row_rub = sql_fetch($res)) {
55
-			if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) {
55
+			if (autoriser('creer'.$objet.'dans', 'rubrique', $row_rub['id_rubrique'])) {
56 56
 				$id_rubrique = $row_rub['id_rubrique'];
57 57
 			}
58 58
 		}
Please login to merge, or discard this patch.
ecrire/inc/lien.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	return $r ? $r : traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo);
103 103
 }
104 104
 
105
-define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS');
105
+define('_EXTRAIRE_LIEN', ',^\s*(?:'._PROTOCOLES_STD.'):?/?/?\s*$,iS');
106 106
 
107 107
 // http://code.spip.net/@traiter_lien_explicite
108 108
 function traiter_lien_explicite($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) {
@@ -119,19 +119,19 @@  discard block
 block discarded – undo
119 119
 		$lien_court = charger_fonction('lien_court', 'inc');
120 120
 		$texte = $lien_court($texte);
121 121
 		if ($echappe_typo) {
122
-			$texte = "<html>" . quote_amp($texte) . "</html>";
122
+			$texte = "<html>".quote_amp($texte)."</html>";
123 123
 		}
124 124
 	}
125 125
 
126 126
 	// petites corrections d'URL
127 127
 	if (preg_match('/^www\.[^@]+$/S', $lien)) {
128
-		$lien = "http://" . $lien;
128
+		$lien = "http://".$lien;
129 129
 	} else {
130 130
 		if (strpos($lien, "@") && email_valide($lien)) {
131 131
 			if (!$texte) {
132 132
 				$texte = $lien;
133 133
 			}
134
-			$lien = "mailto:" . $lien;
134
+			$lien = "mailto:".$lien;
135 135
 		}
136 136
 	}
137 137
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 }
148 148
 
149 149
 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, $connect = '') {
150
-	if (function_exists($f = 'glossaire_' . $ancre)) {
150
+	if (function_exists($f = 'glossaire_'.$ancre)) {
151 151
 		$url = $f($texte, $id);
152 152
 	} else {
153 153
 		$url = glossaire_std($texte);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	if (!($match = typer_raccourci($ref))) {
162 162
 		return false;
163 163
 	}
164
-	@list($type, , $id, , $args, , $ancre) = $match;
164
+	@list($type,, $id,, $args,, $ancre) = $match;
165 165
 	// attention dans le cas des sites le lien doit pointer non pas sur
166 166
 	// la page locale du site, mais directement sur le site lui-meme
167 167
 	if ($f = charger_fonction("implicite_$type", "liens", true)) {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$r['titre'] = $texte;
189 189
 	}
190 190
 	if (!@$r['titre']) {
191
-		$r['titre'] = _T($type) . " $id";
191
+		$r['titre'] = _T($type)." $id";
192 192
 	}
193 193
 	if ($pour == 'titre') {
194 194
 		return $r['titre'];
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	// dans le cas d'un lien vers un doc, ajouter le type='mime/type'
199 199
 	if ($type == 'document'
200 200
 		and $mime = sql_getfetsel('mime_type', 'spip_types_documents',
201
-			"extension IN (" . sql_get_select("extension", "spip_documents", "id_document=" . sql_quote($id)) . ")",
201
+			"extension IN (".sql_get_select("extension", "spip_documents", "id_document=".sql_quote($id)).")",
202 202
 			'', '', '', '', $connect)
203 203
 	) {
204 204
 		$r['mime'] = $mime;
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
 	'(<([a-z_-]{3,})' # <modele
296 296
 	. '\s*([0-9]*)\s*' # id
297 297
 	. '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>)
298
-	. '\s*/?' . '>)' # fin du modele >
298
+	. '\s*/?'.'>)' # fin du modele >
299 299
 	. '\s*(<\/a>)?' # eventuel </a>
300 300
 );
301 301
 
302
-define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS');
302
+define('_RACCOURCI_MODELE_DEBUT', '@^'._RACCOURCI_MODELE.'@isS');
303 303
 
304 304
 // http://code.spip.net/@traiter_modeles
305 305
 function traiter_modeles($texte, $doublons = false, $echap = '', $connect = '', $liens = null, $env = array()) {
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 						if (test_espace_prive()) {
372 372
 							$modele = entites_html(substr($texte, $a, $cherche));
373 373
 							if (!is_null($liens)) {
374
-								$modele = "<pre>" . str_replace($liens[0], $liens[1], $modele) . "</pre>";
374
+								$modele = "<pre>".str_replace($liens[0], $liens[1], $modele)."</pre>";
375 375
 							}
376 376
 						}
377 377
 					}
Please login to merge, or discard this patch.
ecrire/inc/cookie.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	// liste des cookies en httponly (a passer en define si besoin)
47 47
 	$httponly = in_array($name, explode(' ', 'spip_session'));
48 48
 
49
-	$name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'] . '_', $name);
49
+	$name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'].'_', $name);
50 50
 	if ($path == 'AUTO') {
51 51
 		$path = defined('_COOKIE_PATH') ? _COOKIE_PATH : preg_replace(',^\w+://[^/]*,', '', url_de_base());
52 52
 	}
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	}
124 124
 	foreach ($_COOKIE as $name => $value) {
125 125
 		if (substr($name, 0, $prefix_long) == $cookie_prefix) {
126
-			$spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name);
126
+			$spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name);
127 127
 			$_COOKIE[$spipname] = $value;
128 128
 			$GLOBALS[$spipname] = $value;
129 129
 		}
Please login to merge, or discard this patch.
ecrire/inc/minipres.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			lire_fichier($file, $c);
75 75
 			$css .= $c;
76 76
 		}
77
-		$css = "<style type='text/css'>" . $css . "</style>";
77
+		$css = "<style type='text/css'>".$css."</style>";
78 78
 	} else {
79 79
 		foreach ($files as $name) {
80 80
 			$file = direction_css(find_in_theme($name));
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 		define('_DOCTYPE_ECRIRE', '');
88 88
 	}
89 89
 
90
-	return _DOCTYPE_ECRIRE .
91
-	html_lang_attributes() .
92
-	"<head>\n" .
93
-	"<title>" .
94
-	textebrut($titre) .
95
-	"</title>\n" .
96
-	"<meta name='viewport' content='width=device-width' />\n" .
97
-	$css .
90
+	return _DOCTYPE_ECRIRE.
91
+	html_lang_attributes().
92
+	"<head>\n".
93
+	"<title>".
94
+	textebrut($titre).
95
+	"</title>\n".
96
+	"<meta name='viewport' content='width=device-width' />\n".
97
+	$css.
98 98
 	"</head>
99
-<body" . $onLoad . " class='minipres'>
99
+<body" . $onLoad." class='minipres'>
100 100
 	<div id='minipres'>
101 101
 	<h1>" .
102
-	$titre .
102
+	$titre.
103 103
 	"</h1>
104 104
 	<div>\n";
105 105
 }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
 		$titre = ($titre == 'install')
183 183
 			? _T('avis_espace_interdit')
184
-			: $titre . '&nbsp;: ' . _T('info_acces_interdit');
184
+			: $titre.'&nbsp;: '._T('info_acces_interdit');
185 185
 
186 186
 		$statut = isset($GLOBALS['visiteur_session']['statut']) ? $GLOBALS['visiteur_session']['statut'] : '';
187 187
 		$nom = isset($GLOBALS['visiteur_session']['nom']) ? $GLOBALS['visiteur_session']['nom'] : '';
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$corps = generer_form_ecrire('accueil', '', '',
194 194
 			$statut ? _T('public:accueil_site') : _T('public:lien_connecter')
195 195
 		);
196
-		spip_log($nom . " $titre " . $_SERVER['REQUEST_URI']);
196
+		spip_log($nom." $titre ".$_SERVER['REQUEST_URI']);
197 197
 	}
198 198
 
199 199
 	if (!_AJAX) {
@@ -211,6 +211,6 @@  discard block
 block discarded – undo
211 211
 		foreach ($_POST as $v => $c) {
212 212
 			$url = parametre_url($url, $v, $c, '&');
213 213
 		}
214
-		ajax_retour("<div>" . $titre . redirige_formulaire($url) . "</div>", false);
214
+		ajax_retour("<div>".$titre.redirige_formulaire($url)."</div>", false);
215 215
 	}
216 216
 }
Please login to merge, or discard this patch.
ecrire/inc/chercher_logo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@
 block discarded – undo
39 39
 	# attention au cas $id = '0' pour LOGO_SITE_SPIP : utiliser intval()
40 40
 	
41 41
 	$type = type_du_logo($_id_objet);
42
-	$nom = $type . $mode . intval($id);
42
+	$nom = $type.$mode.intval($id);
43 43
 	
44 44
 	foreach ($GLOBALS['formats_logos'] as $format) {
45
-		if (@file_exists($d = (_DIR_LOGOS . $nom . '.' . $format))) {
45
+		if (@file_exists($d = (_DIR_LOGOS.$nom.'.'.$format))) {
46 46
 			return array($d, _DIR_LOGOS, $nom, $format, @filemtime($d));
47 47
 		}
48 48
 	}
Please login to merge, or discard this patch.
ecrire/inc/prepare_recherche.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 
80 80
 	if (!isset($cache[$serveur][$table][$recherche])) {
81 81
 		$hash_serv = ($serveur ? substr(md5($serveur), 0, 16) : '');
82
-		$hash = substr(md5($recherche . $table), 0, 16);
83
-		$where = "(resultats.recherche='$hash' AND resultats.table_objet=" . sql_quote($table) . " AND resultats.serveur='$hash_serv')";
82
+		$hash = substr(md5($recherche.$table), 0, 16);
83
+		$where = "(resultats.recherche='$hash' AND resultats.table_objet=".sql_quote($table)." AND resultats.serveur='$hash_serv')";
84 84
 		$row = sql_fetsel('UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(resultats.maj) AS fraicheur', 'spip_resultats AS resultats',
85 85
 			$where, '', 'fraicheur DESC', '0,1');
86 86
 		if (!$row
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		$whered = str_replace(array("resultats.recherche", "resultats.table_objet", "resultats.serveur"),
124 124
 			array("recherche", "table_objet", "serveur"), $where);
125 125
 		sql_delete('spip_resultats',
126
-			'NOT(' . sql_date_proche('maj', (0 - ($delai_fraicheur + 100)), " SECOND") . ") OR ($whered)");
126
+			'NOT('.sql_date_proche('maj', (0 - ($delai_fraicheur + 100)), " SECOND").") OR ($whered)");
127 127
 
128 128
 		// inserer les resultats dans la table de cache des resultats
129 129
 		if (count($points)) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		}
180 180
 
181 181
 		foreach ($listes_ids as $p => $ids) {
182
-			$select .= "+$p*(" .
182
+			$select .= "+$p*(".
183 183
 				sql_in("$table.$primary", $ids, '', $serveur)
184 184
 				. ") ";
185 185
 		}
Please login to merge, or discard this patch.