Completed
Pull Request — master (#42)
by
unknown
01:14
created
ecrire/prive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 		// On reexecute pour deboucher sur le include public.
27 27
 		// autrement on insiste
28 28
 		if (is_array($var_auth)) {
29
-			$var_auth = '../?' . $_SERVER['QUERY_STRING'];
29
+			$var_auth = '../?'.$_SERVER['QUERY_STRING'];
30 30
 			spip_setcookie('spip_session', $_COOKIE['spip_session'], [
31 31
 				'expires' => time() + 3600 * 24 * 14
32 32
 			]);
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
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		}
75 75
 	}
76 76
 
77
-	$name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'] . '_', $name);
77
+	$name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'].'_', $name);
78 78
 
79 79
 	// expires
80 80
 	if (!isset($options['expires'])) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	}
158 158
 	foreach ($_COOKIE as $name => $value) {
159 159
 		if (substr($name, 0, $prefix_long) == $cookie_prefix) {
160
-			$spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name);
160
+			$spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name);
161 161
 			$_COOKIE[$spipname] = $value;
162 162
 			$GLOBALS[$spipname] = $value;
163 163
 		}
Please login to merge, or discard this patch.
config/ecran_securite.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
  * Test utilisateur
16 16
  */
17 17
 if (isset($_GET['test_ecran_securite'])) {
18
-	$ecran_securite_raison = 'test ' . _ECRAN_SECURITE;
18
+	$ecran_securite_raison = 'test '._ECRAN_SECURITE;
19 19
 }
20 20
 
21
-if (file_exists($f = __DIR__ . DIRECTORY_SEPARATOR  . 'ecran_securite_options.php')) {
21
+if (file_exists($f = __DIR__.DIRECTORY_SEPARATOR.'ecran_securite_options.php')) {
22 22
 	include ($f);
23 23
 }
24 24
 
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
 						'yats',
227 227
 						'yeti',
228 228
 						'zeerch'
229
-					)) . ',i',
230
-				(string)$_SERVER['HTTP_USER_AGENT']
229
+					)).',i',
230
+				(string) $_SERVER['HTTP_USER_AGENT']
231 231
 			)
232 232
 	);
233 233
 }
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
 		'_IS_BOT_FRIEND',
237 237
 		isset($_SERVER['HTTP_USER_AGENT'])
238 238
 			and preg_match(
239
-				',' . implode('|', array(
239
+				','.implode('|', array(
240 240
 					'facebookexternalhit',
241 241
 					'twitterbot',
242 242
 					'flipboardproxy',
243 243
 					'wordpress'
244
-				)) . ',i',
245
-				(string)$_SERVER['HTTP_USER_AGENT']
244
+				)).',i',
245
+				(string) $_SERVER['HTTP_USER_AGENT']
246 246
 			)
247 247
 	);
248 248
 }
@@ -291,10 +291,10 @@  discard block
 block discarded – undo
291 291
  */
292 292
 foreach (array('lang', 'var_recherche', 'aide', 'var_lang_r', 'lang_r', 'var_ajax_ancre', 'nom_fichier') as $var) {
293 293
 	if (isset($_GET[$var])) {
294
-		$_REQUEST[$var] = $GLOBALS[$var] = $_GET[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string)$_GET[$var]);
294
+		$_REQUEST[$var] = $GLOBALS[$var] = $_GET[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string) $_GET[$var]);
295 295
 	}
296 296
 	if (isset($_POST[$var])) {
297
-		$_REQUEST[$var] = $GLOBALS[$var] = $_POST[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string)$_POST[$var]);
297
+		$_REQUEST[$var] = $GLOBALS[$var] = $_POST[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string) $_POST[$var]);
298 298
 	}
299 299
 }
300 300
 
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
  * Filtre l'accès à spip_acces_doc (injection SQL en 1.8.2x)
303 303
  */
304 304
 if (isset($_SERVER['REQUEST_URI'])) {
305
-	if (preg_match(',^(.*/)?spip_acces_doc\.,', (string)$_SERVER['REQUEST_URI'])) {
306
-		$file = addslashes((string)$_GET['file']);
305
+	if (preg_match(',^(.*/)?spip_acces_doc\.,', (string) $_SERVER['REQUEST_URI'])) {
306
+		$file = addslashes((string) $_GET['file']);
307 307
 	}
308 308
 }
309 309
 
@@ -323,13 +323,13 @@  discard block
 block discarded – undo
323 323
  */
324 324
 if (
325 325
 	isset($_REQUEST['partie_cal'])
326
-	and $_REQUEST['partie_cal'] !== htmlentities((string)$_REQUEST['partie_cal'])
326
+	and $_REQUEST['partie_cal'] !== htmlentities((string) $_REQUEST['partie_cal'])
327 327
 ) {
328 328
 	$ecran_securite_raison = "partie_cal";
329 329
 }
330 330
 if (
331 331
 	isset($_REQUEST['echelle'])
332
-	and $_REQUEST['echelle'] !== htmlentities((string)$_REQUEST['echelle'])
332
+	and $_REQUEST['echelle'] !== htmlentities((string) $_REQUEST['echelle'])
333 333
 ) {
334 334
 	$ecran_securite_raison = "echelle";
335 335
 }
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
  */
340 340
 if (
341 341
 	isset($_REQUEST['exec'])
342
-	and !preg_match(',^[\w-]+$,', (string)$_REQUEST['exec'])
342
+	and !preg_match(',^[\w-]+$,', (string) $_REQUEST['exec'])
343 343
 ) {
344 344
 	$ecran_securite_raison = "exec";
345 345
 }
346 346
 if (
347 347
 	isset($_REQUEST['cherche_auteur'])
348
-	and preg_match(',[<],', (string)$_REQUEST['cherche_auteur'])
348
+	and preg_match(',[<],', (string) $_REQUEST['cherche_auteur'])
349 349
 ) {
350 350
 	$ecran_securite_raison = "cherche_auteur";
351 351
 }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 	isset($_REQUEST['exec'])
354 354
 	and $_REQUEST['exec'] == 'auteurs'
355 355
 	and isset($_REQUEST['recherche'])
356
-	and preg_match(',[<],', (string)$_REQUEST['recherche'])
356
+	and preg_match(',[<],', (string) $_REQUEST['recherche'])
357 357
 ) {
358 358
 	$ecran_securite_raison = "recherche";
359 359
 }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 	isset($_REQUEST['exec'])
362 362
 	and $_REQUEST['exec'] == 'info_plugin'
363 363
 	and isset($_REQUEST['plugin'])
364
-	and preg_match(',[<],', (string)$_REQUEST['plugin'])
364
+	and preg_match(',[<],', (string) $_REQUEST['plugin'])
365 365
 ) {
366 366
 	$ecran_securite_raison = "plugin";
367 367
 }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 				echo minipres(_T('info_acces_interdit'));
389 389
 				exit;
390 390
 			}
391
-			require _DIR_RESTREINT . 'action/configurer.php';
391
+			require _DIR_RESTREINT.'action/configurer.php';
392 392
 			action_configurer_dist();
393 393
 		}
394 394
 	}
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
 if (_IS_BOT) {
441 441
 	if (
442 442
 		(isset($_REQUEST['echelle']) and isset($_REQUEST['partie_cal']) and isset($_REQUEST['type']))
443
-		or (strpos((string)$_SERVER['REQUEST_URI'], 'debut_') and preg_match(',[?&]debut_.*&debut_,', (string)$_SERVER['REQUEST_URI']))
444
-		or (isset($_REQUEST['calendrier_annee']) and strpos((string)$_SERVER['REQUEST_URI'], 'debut_'))
445
-		or (isset($_REQUEST['calendrier_annee']) and preg_match(',[?&]calendrier_annee=.*&calendrier_annee=,', (string)$_SERVER['REQUEST_URI']))
443
+		or (strpos((string) $_SERVER['REQUEST_URI'], 'debut_') and preg_match(',[?&]debut_.*&debut_,', (string) $_SERVER['REQUEST_URI']))
444
+		or (isset($_REQUEST['calendrier_annee']) and strpos((string) $_SERVER['REQUEST_URI'], 'debut_'))
445
+		or (isset($_REQUEST['calendrier_annee']) and preg_match(',[?&]calendrier_annee=.*&calendrier_annee=,', (string) $_SERVER['REQUEST_URI']))
446 446
 	) {
447 447
 		$ecran_securite_raison = "robot agenda/double pagination";
448 448
 	}
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 	if ($_REQUEST['page'] == 'test_cfg') {
457 457
 		$ecran_securite_raison = "test_cfg";
458 458
 	}
459
-	if ($_REQUEST['page'] !== htmlspecialchars((string)$_REQUEST['page'])) {
459
+	if ($_REQUEST['page'] !== htmlspecialchars((string) $_REQUEST['page'])) {
460 460
 		$ecran_securite_raison = "xsspage";
461 461
 	}
462 462
 	if (
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
  */
473 473
 foreach (array('var_login') as $var) {
474 474
 	if (isset($_REQUEST[$var]) and is_array($_REQUEST[$var])) {
475
-		$ecran_securite_raison = "xss " . $var;
475
+		$ecran_securite_raison = "xss ".$var;
476 476
 	}
477 477
 }
478 478
 
@@ -520,13 +520,13 @@  discard block
 block discarded – undo
520 520
  */
521 521
 if (
522 522
 	isset($_REQUEST['nom_sauvegarde'])
523
-	and strstr((string)$_REQUEST['nom_sauvegarde'], '/')
523
+	and strstr((string) $_REQUEST['nom_sauvegarde'], '/')
524 524
 ) {
525 525
 	$ecran_securite_raison = 'nom_sauvegarde manipulee';
526 526
 }
527 527
 if (
528 528
 	isset($_REQUEST['znom_sauvegarde'])
529
-	and strstr((string)$_REQUEST['znom_sauvegarde'], '/')
529
+	and strstr((string) $_REQUEST['znom_sauvegarde'], '/')
530 530
 ) {
531 531
 	$ecran_securite_raison = 'znom_sauvegarde manipulee';
532 532
 }
Please login to merge, or discard this patch.
prive/formulaires/configurer_preferences.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 	$les_couleurs = $couleurs();
46 46
 	foreach ($les_couleurs as $k => $c) {
47 47
 		$valeurs['_couleurs_url'][$k] = generer_url_public('style_prive.css', 'ltr='
48
-			. $GLOBALS['spip_lang_left'] . '&'
48
+			. $GLOBALS['spip_lang_left'].'&'
49 49
 			. $couleurs($k));
50 50
 		$valeurs['couleurs'][$k] = $c;
51 51
 	}
Please login to merge, or discard this patch.
ecrire/inc/filtres_boites.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 		$titre = "<h3>$titre</h3>";
136 136
 	}
137 137
 
138
-	return '<div class="' . $class . ($id ? "\" id=\"$id" : '') . '">'
138
+	return '<div class="'.$class.($id ? "\" id=\"$id" : '').'">'
139 139
 	. ($titre ? "<div class=\"$head_class\">$titre<!--/hd--></div>" : '')
140 140
 	. '<div class="box__body clearfix">';
141 141
 }
Please login to merge, or discard this patch.
ecrire/inc/filtres_alertes.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 	$_class = interprete_argument_balise(3, $p);
49 49
 	$_role  = interprete_argument_balise(4, $p);
50 50
 	$_id    = interprete_argument_balise(5, $p);
51
-	$_texte = ($_texte ? $_texte     : "''");
51
+	$_texte = ($_texte ? $_texte : "''");
52 52
 	$_titre = ($_titre ? ", $_titre" : ', null');
53 53
 	$_class = ($_class ? ", $_class" : ', null');
54
-	$_role  = ($_role  ? ", $_role"  : ', null');
55
-	$_id    = ($_id    ? ", $_id"    : ', null');
54
+	$_role  = ($_role ? ", $_role" : ', null');
55
+	$_id    = ($_id ? ", $_id" : ', null');
56 56
 
57 57
 	$f = chercher_filtre('message_alerte');
58 58
 	$p->code = "$f($_texte$_titre$_class$_role$_id)";
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 	$_class = interprete_argument_balise(2, $p);
91 91
 	$_role  = interprete_argument_balise(3, $p);
92 92
 	$_id    = interprete_argument_balise(4, $p);
93
-	$_titre = ($_titre ? "$_titre"   : 'null');
93
+	$_titre = ($_titre ? "$_titre" : 'null');
94 94
 	$_class = ($_class ? ", $_class" : ', null');
95
-	$_role  = ($_role  ? ", $_role"  : ', null');
96
-	$_id    = ($_id    ? ", $_id"    : ', null');
95
+	$_role  = ($_role ? ", $_role" : ', null');
96
+	$_id    = ($_id ? ", $_id" : ', null');
97 97
 
98 98
 	$f = chercher_filtre('message_alerte_ouvrir');
99 99
 	$p->code = "$f($_titre$_class$_role$_id)";
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 	$message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir');
164 164
 	$message_alerte_fermer = chercher_filtre('message_alerte_fermer');
165 165
 	$message =
166
-		$message_alerte_ouvrir($titre, $class, $role, $id) .
167
-		$texte .
166
+		$message_alerte_ouvrir($titre, $class, $role, $id).
167
+		$texte.
168 168
 		$message_alerte_fermer();
169 169
 
170 170
 	return $message;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 	];
214 214
 	$type  = array_intersect(explode(' ', $class), $types);
215 215
 	$type  = reset($type);
216
-	$class = trim(str_replace($types, '', $class) . " $type");
216
+	$class = trim(str_replace($types, '', $class)." $type");
217 217
 
218 218
 	// Classes
219 219
 	$class_racine = 'msg-alert';
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 	// Attributs
240 240
 	$attr_role = ($role ? "role=\"$role\"" : '');
241
-	$attr_id   = ($id   ? "id=\"$id\"" : '');
241
+	$attr_id   = ($id ? "id=\"$id\"" : '');
242 242
 	$attr_data = ($type ? "data-alert=\"$type\"" : '');
243 243
 
244 244
 	$message =
Please login to merge, or discard this patch.
ecrire/balise/info_.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@
 block discarded – undo
55 55
 		$_params = '[';
56 56
 		$nb_params = count($p->param[0]); // 1ère valeur vide donc 1 en plus
57 57
 		for ($i = 3; $i < $nb_params; $i++) {
58
-			$_params .= interprete_argument_balise($i, $p) . ',';
58
+			$_params .= interprete_argument_balise($i, $p).',';
59 59
 		}
60 60
 		$_params .= ']';
61 61
 
62 62
 		$info_sql = strtolower(substr($info, 5));
63
-		$code = "generer_info_entite($id_objet, $type_objet, '$info_sql', " . ($p->etoile ? _q($p->etoile) : "''") . ", $_params)";
63
+		$code = "generer_info_entite($id_objet, $type_objet, '$info_sql', ".($p->etoile ? _q($p->etoile) : "''").", $_params)";
64 64
 		$p->code = champ_sql($info, $p, $code);
65 65
 		$p->interdire_scripts = true;
66 66
 
Please login to merge, or discard this patch.
prive/themes/spip/vars.css_fonctions.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	// Espacements pour le rythme vertical et les gouttières
51 51
 	// Basés sur la hauteur d'une ligne de texte à la racine du document
52
-	$vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem');
53
-	$vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem');
52
+	$vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem');
53
+	$vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem');
54 54
 	$vars->add('--spip-margin-bottom', $Pile[0]['margin-bottom']); // À déprécier
55 55
 
56 56
 	// Bordures
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
 
61 61
 	// Ombres portées
62 62
 	$shadow_mini =
63
-		'0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),' .
64
-		'0 0.1em  0.15em hsla(0, 0%, 0%, 0.05),' .
63
+		'0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),'.
64
+		'0 0.1em  0.15em hsla(0, 0%, 0%, 0.05),'.
65 65
 		'0 0.1em  0.25em  hsla(0, 0%, 0%, 0.05)';
66 66
 	$shadow =
67
-		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),' .
68
-		'0 0.1em  0.25em hsla(0, 0%, 0%, 0.05),' .
67
+		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),'.
68
+		'0 0.1em  0.25em hsla(0, 0%, 0%, 0.05),'.
69 69
 		'0 0.1em  0.5em  hsla(0, 0%, 0%, 0.05)';
70 70
 	$shadow_large =
71
-		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),' .
72
-		'0 0.2em  0.5em  hsla(0, 0%, 0%, 0.1),' .
71
+		'0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),'.
72
+		'0 0.2em  0.5em  hsla(0, 0%, 0%, 0.1),'.
73 73
 		'0 0.2em  1em    hsla(0, 0%, 0%, 0.075)';
74 74
 	$shadow_huge =
75
-		'0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),' .
76
-		'0 0.25em  1em  hsla(0, 0%, 0%, 0.1),' .
75
+		'0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),'.
76
+		'0 0.25em  1em  hsla(0, 0%, 0%, 0.1),'.
77 77
 		'0 0.5em  2em    hsla(0, 0%, 0%, 0.075)';
78 78
 	$vars->add('--spip-box-shadow-mini', $shadow_mini);
79 79
 	$vars->add('--spip-box-shadow-mini-hover', $shadow);
Please login to merge, or discard this patch.
prive/objets/liste/objets-trad_fonctions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
 	$primary = id_table_objet($objet);
20 20
 
21 21
 	$select = "$primary as id,lang";
22
-	$where = 'id_trad=' . intval($id_trad);
22
+	$where = 'id_trad='.intval($id_trad);
23 23
 	$trouver_table = charger_fonction('trouver_table', 'base');
24 24
 	$desc = $trouver_table($table_objet_sql);
25 25
 	if (isset($desc['field']['statut'])) {
26 26
 		$select .= ',statut';
27
-		$where .= ' AND statut!=' . sql_quote('poubelle');
27
+		$where .= ' AND statut!='.sql_quote('poubelle');
28 28
 	}
29 29
 
30 30
 	$rows = sql_allfetsel($select, $table_objet_sql, $where);
Please login to merge, or discard this patch.