Completed
Push — master ( 1ee6c1...34072e )
by cam
01:29
created
ecrire/inc_version.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
52 52
 
53 53
 /** chemin absolu vers la racine */
54
-define('_ROOT_RACINE', dirname(__DIR__) . '/');
54
+define('_ROOT_RACINE', dirname(__DIR__).'/');
55 55
 /** chemin absolu vers le repertoire de travail */
56
-define('_ROOT_CWD', getcwd() . '/');
56
+define('_ROOT_CWD', getcwd().'/');
57 57
 /** chemin absolu vers ecrire */
58
-define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
58
+define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT);
59 59
 
60 60
 // Icones
61 61
 if (!defined('_NOM_IMG_PACK')) {
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 	define('_NOM_IMG_PACK', 'images/');
64 64
 }
65 65
 /** le chemin http (relatif) vers les images standard */
66
-define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
66
+define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK));
67 67
 
68 68
 /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */
69
-define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
69
+define('_ROOT_IMG_PACK', dirname(__DIR__).'/prive/'._NOM_IMG_PACK);
70 70
 
71 71
 if (!defined('_JAVASCRIPT')) {
72 72
 	/** Nom du repertoire des  bibliotheques JavaScript */
73 73
 	define('_JAVASCRIPT', 'javascript/');
74 74
 } // utilisable avec #CHEMIN et find_in_path
75 75
 /** le nom du repertoire des  bibliotheques JavaScript du prive */
76
-define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
76
+define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT));
77 77
 
78 78
 # Le nom des 4 repertoires modifiables par les scripts lances par httpd
79 79
 # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas)
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
 // Son emplacement absolu si on le trouve
106 106
 if (
107
-	@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
108
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
107
+	@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')
108
+	or (@file_exists($f = _ROOT_RESTREINT._NOM_CONFIG.'.php'))
109 109
 ) {
110 110
 	/** Emplacement absolu du fichier d'option */
111 111
 	define('_FILE_OPTIONS', $f);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 // Inclure l'ecran de securite
130 130
 if (
131 131
 	!defined('_ECRAN_SECURITE')
132
-	and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
132
+	and @file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES.'ecran_securite.php')
133 133
 ) {
134 134
 	include $f;
135 135
 }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			// UA plus cibles
151 151
 			. '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti'
152 152
 			. ',i',
153
-			(string)$_SERVER['HTTP_USER_AGENT']
153
+			(string) $_SERVER['HTTP_USER_AGENT']
154 154
 		)
155 155
 	);
156 156
 }
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 # la matrice standard (fichiers definissant les fonctions a inclure)
393 393
 $spip_matrice = [];
394 394
 # les plugins a activer
395
-$plugins = [];  // voir le contenu du repertoire /plugins/
395
+$plugins = []; // voir le contenu du repertoire /plugins/
396 396
 # les surcharges de include_spip()
397 397
 $surcharges = []; // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
398 398
 
@@ -470,8 +470,8 @@  discard block
 block discarded – undo
470 470
 //
471 471
 // Charger les fonctions liees aux serveurs Http et Sql.
472 472
 //
473
-require_once _ROOT_RESTREINT . 'inc/utils.php';
474
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
473
+require_once _ROOT_RESTREINT.'inc/utils.php';
474
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
475 475
 
476 476
 // Definition personnelles eventuelles
477 477
 
@@ -494,10 +494,10 @@  discard block
 block discarded – undo
494 494
 // ===> on execute en neutralisant les messages d'erreur
495 495
 
496 496
 spip_initialisation_core(
497
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
498
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
499
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
500
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
497
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
498
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
499
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
500
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
501 501
 );
502 502
 
503 503
 
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 		// Si on est dans le site public, dire que qq s'en occupe
553 553
 		include_spip('inc/minipres');
554 554
 		utiliser_langue_visiteur();
555
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]);
555
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte').'</p>', ['status' => 503]);
556 556
 		exit;
557 557
 	}
558 558
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -591,12 +591,12 @@  discard block
 block discarded – undo
591 591
 	}
592 592
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
593 593
 		include_spip('inc/filtres_mini');
594
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt'));
594
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR.'config.txt'));
595 595
 	} else {
596 596
 		// header minimal
597
-		header(_HEADER_COMPOSED_BY . ' @ www.spip.net');
597
+		header(_HEADER_COMPOSED_BY.' @ www.spip.net');
598 598
 	}
599 599
 }
600 600
 
601 601
 $methode = ($_SERVER['REQUEST_METHOD'] ?? ((php_sapi_name() == 'cli') ? 'cli' : ''));
602
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
602
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.
ecrire/exec/admin_plugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 	if ($quoi !== 'actifs') {
148 148
 		$lpf = liste_plugin_files();
149 149
 		if ($lpf) {
150
-			echo '<p>' . _T('texte_presente_plugin') . '</p>';
150
+			echo '<p>'._T('texte_presente_plugin').'</p>';
151 151
 		} else {
152 152
 			if (!@is_dir(_DIR_PLUGINS)) {
153
-				echo '<p>' . _T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)])
154
-					. ' &mdash; ' . _T('plugin_info_automatique_creer') . '</p>';
153
+				echo '<p>'._T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)])
154
+					. ' &mdash; '._T('plugin_info_automatique_creer').'</p>';
155 155
 			}
156 156
 		}
157 157
 		$lcpaffiche = $lpf;
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
 		if (defined('_DIR_PLUGINS_SUPPL')) {
173 173
 			$nb += is_countable($lcpas) ? count($lcpas) : 0;
174 174
 		}
175
-		echo '<h3>' . sinon(
175
+		echo '<h3>'.sinon(
176 176
 			singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'),
177 177
 			_T('plugins_actif_aucun')
178
-		) . '</h3>';
178
+		).'</h3>';
179 179
 	}
180 180
 
181 181
 	if (empty($format)) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 	if ($corps) {
194 194
 		$corps .= "\n<div class='boutons' style='display:none;'>"
195
-			. "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer')
195
+			. "<input type='submit' class='submit save' value='"._T('bouton_enregistrer')
196 196
 			. "' />"
197 197
 			. '</div>';
198 198
 	}
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		. debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist')
267 267
 		. '<p>'
268 268
 		. _T('plugin_info_plugins_dist_1', ['plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST)])
269
-		. '<br />' . _T('plugin_info_plugins_dist_2')
269
+		. '<br />'._T('plugin_info_plugins_dist_2')
270 270
 		. '</p>'
271 271
 		. $liste
272 272
 		. fin_cadre_trait_couleur()
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 	$res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees'));
290 290
 	$res .= '<dl>';
291 291
 	foreach ($libs as $lib => $rep) {
292
-		$res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n";
292
+		$res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n";
293 293
 	}
294 294
 	$res .= '</dl>';
295 295
 	$res .= fin_cadre_enfonce();
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	$libs = [];
309 309
 	foreach (array_reverse(creer_chemin()) as $d) {
310 310
 		if (
311
-			is_dir($dir = $d . 'lib/')
311
+			is_dir($dir = $d.'lib/')
312 312
 			and $t = opendir($dir)
313 313
 		) {
314 314
 			while (($f = readdir($t)) !== false) {
Please login to merge, or discard this patch.
ecrire/exec/demande_mise_a_jour.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
 
46 46
 	echo debut_grand_cadre();
47 47
 	echo boite_ouvrir(_T('info_message_technique'), 'notice');
48
-	echo '<p>' . _T('info_procedure_maj_version') . '</p>',
49
-		'<p>' . _T('info_administrateur_site_01') . '</p>';
48
+	echo '<p>'._T('info_procedure_maj_version').'</p>',
49
+		'<p>'._T('info_administrateur_site_01').'</p>';
50 50
 	echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire('upgrade', 'reinstall=non'));
51 51
 	echo boite_fermer();
52 52
 	// masquer les erreurs sql sur cette page car proviennent de la base pas a jour !
Please login to merge, or discard this patch.
ecrire/exec/404.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	echo pipeline('affiche_droite', ['args' => ['exec' => '404', 'exec_erreur' => $exec], 'data' => '']);
43 43
 
44 44
 	echo debut_droite();
45
-	echo "<h1 class='grostitre'>" . _T('fichier_introuvable', ['fichier' => $exec]) . '</h1>';
45
+	echo "<h1 class='grostitre'>"._T('fichier_introuvable', ['fichier' => $exec]).'</h1>';
46 46
 	echo pipeline('affiche_milieu', ['args' => ['exec' => '404', 'exec_erreur' => $exec], 'data' => '']);
47 47
 
48 48
 	echo fin_gauche(), fin_page();
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
 }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 		$titre = ($titre == 'install')
184 184
 			? _T('avis_espace_interdit')
185
-			: $titre . '&nbsp;: ' . _T('info_acces_interdit');
185
+			: $titre.'&nbsp;: '._T('info_acces_interdit');
186 186
 
187 187
 		$statut = $GLOBALS['visiteur_session']['statut'] ?? '';
188 188
 		$nom = $GLOBALS['visiteur_session']['nom'] ?? '';
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 			$corps = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site']);
202 202
 		}
203 203
 		$corps = "<div class='boutons'>$corps</div>";
204
-		spip_log($nom . " $titre " . $_SERVER['REQUEST_URI']);
204
+		spip_log($nom." $titre ".$_SERVER['REQUEST_URI']);
205 205
 	}
206 206
 
207 207
 	if (!_AJAX) {
@@ -219,6 +219,6 @@  discard block
 block discarded – undo
219 219
 		foreach ($_POST as $v => $c) {
220 220
 			$url = parametre_url($url, $v, $c, '&');
221 221
 		}
222
-		ajax_retour('<div>' . $titre . redirige_formulaire($url) . '</div>', false);
222
+		ajax_retour('<div>'.$titre.redirige_formulaire($url).'</div>', false);
223 223
 	}
224 224
 }
Please login to merge, or discard this patch.
ecrire/inc/nfslock.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	if (!$max_age) {
107 107
 		$max_age = _DEFAULT_LOCKTIME;
108 108
 	}
109
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
109
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
110 110
 
111 111
 
112 112
 	/*
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 
117 117
 	$id = creer_uniqid();
118
-	$tpath = _DIR_TMP . "slock.$id";
118
+	$tpath = _DIR_TMP."slock.$id";
119 119
 	$tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ...
120 120
 	if (!$tmpfd) {  /* open failed */
121 121
 		@fclose($tmpfd);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 *    thinks the current time is (our_tmp.st_ctime)..
242 242
 	 */
243 243
 
244
-	$tpath = _DIR_TMP . "stime.$id";
244
+	$tpath = _DIR_TMP."stime.$id";
245 245
 	$tmpfd = @fopen($tpath, 'w');
246 246
 	if (
247 247
 		(!$tmpfd)
@@ -255,14 +255,14 @@  discard block
 block discarded – undo
255 255
 		return false; //(NFSL_SYSF);
256 256
 	}
257 257
 
258
-	@fclose($tmpfd);    /* We don't need this once we have our_tmp.st_ctime. */
258
+	@fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */
259 259
 	spip_unlink($tpath);
260 260
 
261 261
 	/*
262 262
 	 * 2. make fullpath, a buffer for the full pathname of the lock file
263 263
 	 */
264 264
 
265
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
265
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
266 266
 
267 267
 	/*
268 268
 	 * 3. If the ctime hasn't been modified, unlink the file and return. If the
@@ -282,10 +282,10 @@  discard block
 block discarded – undo
282 282
 			if (!$test) {
283 283
 				return false;
284 284
 			} //(NFSL_LOST);
285
-			sleep(1 + (random_int(0, 4)));    /* so sleep a bit */
285
+			sleep(1 + (random_int(0, 4))); /* so sleep a bit */
286 286
 		}
287 287
 
288
-		return true;//(NFSL_OK);			/* success */
288
+		return true; //(NFSL_OK);			/* success */
289 289
 	}
290 290
 
291 291
 	/*
Please login to merge, or discard this patch.
ecrire/inc/csv.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,12 +87,12 @@
 block discarded – undo
87 87
 	}
88 88
 	// si une seule colonne, en faire le titre
89 89
 	if (preg_match("/^([^$sep]+)$sep+\$/", $entete, $l)) {
90
-		$caption = "\n||" . $l[1] . '|';
90
+		$caption = "\n||".$l[1].'|';
91 91
 		[$entete, $corps] = explode("\n", $corps, 2);
92 92
 	}
93 93
 	// si premiere colonne vide, le raccourci doit quand meme produire <th...
94 94
 	if ($entete[0] == $sep) {
95
-		$entete = ' ' . $entete;
95
+		$entete = ' '.$entete;
96 96
 	}
97 97
 
98 98
 	$lignes = explode("\n", $corps);
Please login to merge, or discard this patch.
ecrire/inc/math.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	// Regarder dans le repertoire local des images TeX et blocs MathML
40
-	if (!@is_dir($dir_tex = _DIR_VAR . 'cache-TeX/')) {
40
+	if (!@is_dir($dir_tex = _DIR_VAR.'cache-TeX/')) {
41 41
 		@mkdir($dir_tex, _SPIP_CHMOD);
42 42
 	}
43
-	$fichier = $dir_tex . md5(trim($tex)) . $ext;
43
+	$fichier = $dir_tex.md5(trim($tex)).$ext;
44 44
 
45 45
 
46 46
 	if (!@file_exists($fichier)) {
47 47
 		// Aller chercher l'image sur le serveur
48 48
 		if ($server) {
49
-			spip_log($url = $server . '?' . rawurlencode($tex));
49
+			spip_log($url = $server.'?'.rawurlencode($tex));
50 50
 			include_spip('inc/distant');
51 51
 			recuperer_url($url, ['file' => $fichier]);
52 52
 		}
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			return implode('', file($fichier));
62 62
 		} // TeX
63 63
 		else {
64
-			[, , , $size] = @spip_getimagesize($fichier);
64
+			[,,, $size] = @spip_getimagesize($fichier);
65 65
 			$alt = "alt=\"$tex\" title=\"$tex\"";
66 66
 
67 67
 			return "<img src=\"$fichier\" style=\"vertical-align:middle;\" $size $alt />";
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			if ($defaire_amp) {
129 129
 				$expression = str_replace('&amp;', '&', $expression);
130 130
 			}
131
-			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">" . produire_image_math($expression) . "</p>\n";
131
+			$echap = "\n<p class=\"spip\" style=\"text-align: center;\">".produire_image_math($expression)."</p>\n";
132 132
 			$pos = strpos($texte_milieu, (string) $regs[0]);
133 133
 			$texte_milieu = substr($texte_milieu, 0, $pos)
134 134
 				. code_echappement($echap, $source)
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 				. substr($texte_milieu, $pos + strlen($regs[0]));
149 149
 		}
150 150
 
151
-		$texte_a_voir = $texte_debut . $texte_milieu . $texte_fin;
151
+		$texte_a_voir = $texte_debut.$texte_milieu.$texte_fin;
152 152
 	}
153 153
 
154 154
 	return $texte_a_voir;
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 ?: 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 ...
@@ -179,8 +179,7 @@  discard block
 block discarded – undo
179 179
 	$where = (is_numeric($id_auteur)
180 180
 		/*AND $id_auteur>0*/ // reprise lors des restaurations
181 181
 	) ?
182
-		"id_auteur=$id_auteur" :
183
-		(!strlen($GLOBALS['connect_login']) ? '' : 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text'));
182
+		"id_auteur=$id_auteur" : (!strlen($GLOBALS['connect_login']) ? '' : 'login='.sql_quote($GLOBALS['connect_login'], '', 'text'));
184 183
 
185 184
 	if (!$where) {
186 185
 		return '';
@@ -222,7 +221,7 @@  discard block
 block discarded – undo
222 221
 	$GLOBALS['connect_login'] = $row['login'];
223 222
 	$GLOBALS['connect_statut'] = $row['statut'];
224 223
 
225
-	$GLOBALS['visiteur_session'] = array_merge((array)$GLOBALS['visiteur_session'], $row);
224
+	$GLOBALS['visiteur_session'] = array_merge((array) $GLOBALS['visiteur_session'], $row);
226 225
 
227 226
 	// au cas ou : ne pas memoriser les champs sensibles
228 227
 	unset($GLOBALS['visiteur_session']['pass']);
@@ -295,7 +294,7 @@  discard block
 block discarded – undo
295 294
  * @return string
296 295
  */
297 296
 function auth_a_loger() {
298
-	$redirect = generer_url_public('login', 'url=' . rawurlencode(self('&', true)), '&');
297
+	$redirect = generer_url_public('login', 'url='.rawurlencode(self('&', true)), '&');
299 298
 
300 299
 	// un echec au "bonjour" (login initial) quand le statut est
301 300
 	// inconnu signale sans doute un probleme de cookies
@@ -331,7 +330,7 @@  discard block
 block discarded – undo
331 330
 	$date ??= date('Y-m-d H:i:s');
332 331
 
333 332
 	if (abs(strtotime($date) - $connect_quand) >= 60) {
334
-		sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur=' . intval($row['id_auteur']));
333
+		sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur='.intval($row['id_auteur']));
335 334
 		$row['en_ligne'] = $date;
336 335
 	}
337 336
 
@@ -440,13 +439,13 @@  discard block
 block discarded – undo
440 439
 	if (
441 440
 		!$login
442 441
 		or !$login_base = auth_retrouver_login($login, $serveur)
443
-		or !$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
442
+		or !$row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)
444 443
 	) {
445 444
 		// generer de fausses infos, mais credibles, pour eviter une attaque
446 445
 		// https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691
447 446
 		include_spip('inc/securiser_action');
448
-		$fauxalea1 = md5('fauxalea' . secret_du_site() . $login . floor(date('U') / 86400));
449
-		$fauxalea2 = md5('fauxalea' . secret_du_site() . $login . ceil(date('U') / 86400));
447
+		$fauxalea1 = md5('fauxalea'.secret_du_site().$login.floor(date('U') / 86400));
448
+		$fauxalea2 = md5('fauxalea'.secret_du_site().$login.ceil(date('U') / 86400));
450 449
 
451 450
 		$row = [
452 451
 			'login' => $login,
@@ -568,7 +567,7 @@  discard block
 block discarded – undo
568 567
 	sql_updateq(
569 568
 		'spip_auteurs',
570 569
 		['prefs' => serialize($p)],
571
-		'id_auteur=' . intval($auteur['id_auteur'])
570
+		'id_auteur='.intval($auteur['id_auteur'])
572 571
 	);
573 572
 
574 573
 	//  bloquer ici le visiteur qui tente d'abuser de ses droits
@@ -732,7 +731,7 @@  discard block
 block discarded – undo
732 731
 		return false;
733 732
 	}
734 733
 
735
-	$row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login, $serveur, 'text'), '', '', '', '', $serveur);
734
+	$row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login, $serveur, 'text'), '', '', '', '', $serveur);
736 735
 
737 736
 	if (!$row) {
738 737
 		if (
@@ -786,11 +785,11 @@  discard block
 block discarded – undo
786 785
 	$retour = $retour ?: _T('icone_retour');
787 786
 	$corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] ";
788 787
 	if ($url) {
789
-		$corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]";
788
+		$corps .= "[<a href='".generer_url_action('cookie', "essai_auth_http=oui&$url")."'>$re</a>]";
790 789
 	}
791 790
 
792 791
 	if ($lien) {
793
-		$corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]';
792
+		$corps .= " [<a href='$ecrire'>"._T('login_espace_prive').'</a>]';
794 793
 	}
795 794
 	include_spip('inc/minipres');
796 795
 	echo minipres($pb, $corps);
Please login to merge, or discard this patch.