Completed
Push — master ( c0fb7a...323164 )
by cam
01:19
created
ecrire/public/balises.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
  */
365 365
 function balise_DOSSIER_SQUELETTE_dist($p) {
366 366
 	$code = substr(addslashes(dirname($p->descr['sourcefile'])), strlen(_DIR_RACINE));
367
-	$p->code = "_DIR_RACINE . '$code'" .
367
+	$p->code = "_DIR_RACINE . '$code'".
368 368
 		$p->interdire_scripts = false;
369 369
 
370 370
 	return $p;
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
  */
384 384
 function balise_SQUELETTE_dist($p) {
385 385
 	$code = addslashes($p->descr['sourcefile']);
386
-	$p->code = "'$code'" .
386
+	$p->code = "'$code'".
387 387
 		$p->interdire_scripts = false;
388 388
 
389 389
 	return $p;
@@ -435,9 +435,9 @@  discard block
 block discarded – undo
435 435
  **/
436 436
 function balise_NOM_SITE_dist($p) {
437 437
 	if (!$p->etoile) {
438
-		$p->code = 'supprimer_numero(calculer_url(' .
439
-			champ_sql('url_site', $p) . ',' .
440
-			champ_sql('nom_site', $p) .
438
+		$p->code = 'supprimer_numero(calculer_url('.
439
+			champ_sql('url_site', $p).','.
440
+			champ_sql('nom_site', $p).
441 441
 			", 'titre', \$connect, false))";
442 442
 	} else {
443 443
 		$p->code = champ_sql('nom_site', $p);
@@ -588,8 +588,8 @@  discard block
 block discarded – undo
588 588
  *     Pile complétée par le code à générer
589 589
  **/
590 590
 function balise_POPULARITE_ABSOLUE_dist($p) {
591
-	$p->code = 'ceil(' .
592
-		champ_sql('popularite', $p) .
591
+	$p->code = 'ceil('.
592
+		champ_sql('popularite', $p).
593 593
 		')';
594 594
 	$p->interdire_scripts = false;
595 595
 
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
 	$p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b);
671 671
 ;
672 672
 	if (($v = interprete_argument_balise(1, $p)) !== null) {
673
-		$p->code = 'table_valeur(' . $p->code . ', ' . $v . ')';
673
+		$p->code = 'table_valeur('.$p->code.', '.$v.')';
674 674
 	}
675 675
 	$p->interdire_scripts = true;
676 676
 
@@ -809,16 +809,16 @@  discard block
 block discarded – undo
809 809
 	$trouver_table = charger_fonction('trouver_table', 'base');
810 810
 	if ($desc = $trouver_table(table_objet_sql($type_objet))) {
811 811
 		if (isset($desc['field']['descriptif'])) {
812
-			$_ligne .= "'descriptif' => " . champ_sql('descriptif', $p) . ',';
812
+			$_ligne .= "'descriptif' => ".champ_sql('descriptif', $p).',';
813 813
 		}
814 814
 		if (isset($desc['field']['texte'])) {
815
-			$_ligne .= "'texte' => " . champ_sql('texte', $p) . ',';
815
+			$_ligne .= "'texte' => ".champ_sql('texte', $p).',';
816 816
 		}
817 817
 		if (isset($desc['field']['chapo'])) {
818
-			$_ligne .= "'chapo' => " . champ_sql('chapo', $p) . ',';
818
+			$_ligne .= "'chapo' => ".champ_sql('chapo', $p).',';
819 819
 		}
820 820
 		if (isset($desc['introduction_longueur'])) {
821
-			$_introduction_longueur = "'" . $desc['introduction_longueur'] . "'";
821
+			$_introduction_longueur = "'".$desc['introduction_longueur']."'";
822 822
 		}
823 823
 	}
824 824
 	$_ligne .= ')';
@@ -917,10 +917,10 @@  discard block
 block discarded – undo
917 917
 		$p->code = sprintf(
918 918
 			CODE_RECUPERER_FOND,
919 919
 			"'modeles/lesauteurs'",
920
-			"array('objet'=>'" . $objet .
921
-			"','id_objet' => " . champ_sql($id_table_objet, $p) .
922
-			",'$id_table_objet' => " . champ_sql($id_table_objet, $p) .
923
-			($objet == 'article' ? '' : ",'id_article' => " . champ_sql('id_article', $p)) .
920
+			"array('objet'=>'".$objet.
921
+			"','id_objet' => ".champ_sql($id_table_objet, $p).
922
+			",'$id_table_objet' => ".champ_sql($id_table_objet, $p).
923
+			($objet == 'article' ? '' : ",'id_article' => ".champ_sql('id_article', $p)).
924 924
 			')',
925 925
 			"'trim'=>true, 'compil'=>array($c)",
926 926
 			_q($connect)
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
 					$m = trim($m);
990 990
 					if ($m != "''") {
991 991
 						if (!preg_match(',\W,', $m)) {
992
-							$m = $boucle->id_table . ".$m";
992
+							$m = $boucle->id_table.".$m";
993 993
 						}
994 994
 
995 995
 						$m .= ' AS titre_rang';
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
 	$f_pagination = chercher_filtre('pagination');
1151 1151
 	$type = $p->boucles[$b]->modificateur['debut_nom'];
1152 1152
 	$modif = ($type[0] !== "'") ? "'debut'.$type"
1153
-		: ("'debut" . substr($type, 1));
1153
+		: ("'debut".substr($type, 1));
1154 1154
 
1155 1155
 	$p->code = sprintf(
1156 1156
 		CODE_PAGINATION,
@@ -1294,7 +1294,7 @@  discard block
 block discarded – undo
1294 1294
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN']];
1295 1295
 		erreur_squelette($msg, $p);
1296 1296
 	} else {
1297
-		$p->code = 'find_in_path(' . $arg . ')';
1297
+		$p->code = 'find_in_path('.$arg.')';
1298 1298
 	}
1299 1299
 
1300 1300
 	$p->interdire_scripts = false;
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN_IMAGE']];
1330 1330
 		erreur_squelette($msg, $p);
1331 1331
 	} else {
1332
-		$p->code = 'chemin_image(' . $arg . ')';
1332
+		$p->code = 'chemin_image('.$arg.')';
1333 1333
 	}
1334 1334
 
1335 1335
 	$p->interdire_scripts = false;
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
 		// cas de #ENV sans argument : on retourne le serialize() du tableau
1384 1384
 		// une belle fonction [(#ENV|affiche_env)] serait pratique
1385 1385
 		if ($src) {
1386
-			$p->code = '(is_array($a = (' . $src . ')) ? serialize($a) : "")';
1386
+			$p->code = '(is_array($a = ('.$src.')) ? serialize($a) : "")';
1387 1387
 		} else {
1388 1388
 			$p->code = 'serialize($Pile[0]??[])';
1389 1389
 		}
@@ -1436,8 +1436,8 @@  discard block
 block discarded – undo
1436 1436
 	$_sinon = interprete_argument_balise(2, $p);
1437 1437
 	$_unserialize = sinon(interprete_argument_balise(3, $p), 'false');
1438 1438
 
1439
-	$p->code = '(include_spip(\'inc/config\')?lire_config(' . $arg . ',' .
1440
-		($_sinon && $_sinon != "''" ? $_sinon : 'null') . ',' . $_unserialize . "):'')";
1439
+	$p->code = '(include_spip(\'inc/config\')?lire_config('.$arg.','.
1440
+		($_sinon && $_sinon != "''" ? $_sinon : 'null').','.$_unserialize."):'')";
1441 1441
 
1442 1442
 	return $p;
1443 1443
 }
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
 		$err_b_s_a = ['zbug_balise_sans_argument', ['balise' => 'SESSION_SET']];
1531 1531
 		erreur_squelette($err_b_s_a, $p);
1532 1532
 	} else {
1533
-		$p->code = '(include_spip("inc/session") AND session_set(' . $_nom . ',' . $_val . '))';
1533
+		$p->code = '(include_spip("inc/session") AND session_set('.$_nom.','.$_val.'))';
1534 1534
 	}
1535 1535
 
1536 1536
 	$p->interdire_scripts = false;
@@ -1578,7 +1578,7 @@  discard block
 block discarded – undo
1578 1578
 			)
1579 1579
 		) {
1580 1580
 			$p->code = /* $r[1]. */
1581
-				'(' . $r[2] . ')';
1581
+				'('.$r[2].')';
1582 1582
 		} else {
1583 1583
 			$p->code = "eval('return '.$php.';')";
1584 1584
 		}
@@ -1822,9 +1822,9 @@  discard block
 block discarded – undo
1822 1822
 
1823 1823
 		// noter la duree du cache dans un entete proprietaire
1824 1824
 
1825
-		$code = "'<'.'" . '?php header("X-Spip-Cache: '
1825
+		$code = "'<'.'".'?php header("X-Spip-Cache: '
1826 1826
 			. $duree
1827
-			. '"); ?' . "'.'>'";
1827
+			. '"); ?'."'.'>'";
1828 1828
 
1829 1829
 		// Remplir le header Cache-Control
1830 1830
 		// cas #CACHE{0}
@@ -1845,9 +1845,9 @@  discard block
 block discarded – undo
1845 1845
 				$pa == 'cache-client'
1846 1846
 				and $duree > 0
1847 1847
 			) {
1848
-				$code .= ".'<'.'" . '?php header("Cache-Control: max-age='
1848
+				$code .= ".'<'.'".'?php header("Cache-Control: max-age='
1849 1849
 					. $duree
1850
-					. '"); ?' . "'.'>'";
1850
+					. '"); ?'."'.'>'";
1851 1851
 				// il semble logique, si on cache-client, de ne pas invalider
1852 1852
 				$pa = 'statique';
1853 1853
 			}
@@ -1856,7 +1856,7 @@  discard block
 block discarded – undo
1856 1856
 				$pa == 'statique'
1857 1857
 				and $duree > 0
1858 1858
 			) {
1859
-				$code .= ".'<'.'" . '?php header("X-Spip-Statique: oui"); ?' . "'.'>'";
1859
+				$code .= ".'<'.'".'?php header("X-Spip-Statique: oui"); ?'."'.'>'";
1860 1860
 			}
1861 1861
 		}
1862 1862
 	} else {
@@ -2020,9 +2020,9 @@  discard block
 block discarded – undo
2020 2020
 		if ($p->etoile) {
2021 2021
 			$_options[] = "'etoile'=>true";
2022 2022
 		}
2023
-		$_options[] = "'compil'=>array(" . memoriser_contexte_compil($p) . ')';
2023
+		$_options[] = "'compil'=>array(".memoriser_contexte_compil($p).')';
2024 2024
 
2025
-		$_l = 'array(' . join(",\n\t", $_contexte) . ')';
2025
+		$_l = 'array('.join(",\n\t", $_contexte).')';
2026 2026
 		if ($flag_env) {
2027 2027
 			$_l = "array_merge(\$Pile[0],$_l)";
2028 2028
 		}
@@ -2032,7 +2032,7 @@  discard block
 block discarded – undo
2032 2032
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' INCLURE']];
2033 2033
 		erreur_squelette($msg, $p);
2034 2034
 	} else {
2035
-		$p->code = 'charge_scripts(' . $_contexte[1] . ',false)';
2035
+		$p->code = 'charge_scripts('.$_contexte[1].',false)';
2036 2036
 	}
2037 2037
 
2038 2038
 	$p->interdire_scripts = false; // la securite est assuree par recuperer_fond
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
 		unset($_contexte[1]);
2081 2081
 
2082 2082
 		if (preg_match("/^\s*'[^']*'/s", $nom)) {
2083
-			$nom = "'modeles/" . substr($nom, 1);
2083
+			$nom = "'modeles/".substr($nom, 1);
2084 2084
 		} else {
2085 2085
 			$nom = "'modeles/' . $nom";
2086 2086
 		}
@@ -2097,8 +2097,8 @@  discard block
 block discarded – undo
2097 2097
 			$primary = $p->boucles[$p->id_boucle]->primary;
2098 2098
 			if (!strpos($primary, ',')) {
2099 2099
 				$id = champ_sql($primary, $p);
2100
-				$_contexte[] = "'$primary'=>" . $id;
2101
-				$_contexte[] = "'id'=>" . $id;
2100
+				$_contexte[] = "'$primary'=>".$id;
2101
+				$_contexte[] = "'id'=>".$id;
2102 2102
 			}
2103 2103
 		}
2104 2104
 		$_contexte[] = "'recurs'=>(++\$recurs)";
@@ -2110,11 +2110,11 @@  discard block
 block discarded – undo
2110 2110
 		$_options = memoriser_contexte_compil($p);
2111 2111
 		$_options = "'compil'=>array($_options), 'trim'=>true";
2112 2112
 		if (isset($_contexte['ajax'])) {
2113
-			$_options .= ', ' . preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']);
2113
+			$_options .= ', '.preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']);
2114 2114
 			unset($_contexte['ajax']);
2115 2115
 		}
2116 2116
 
2117
-		$_l = 'array(' . join(",\n\t", $_contexte) . ')';
2117
+		$_l = 'array('.join(",\n\t", $_contexte).')';
2118 2118
 		if ($flag_env) {
2119 2119
 			$_l = "array_merge(\$Pile[0],$_l)";
2120 2120
 		}
@@ -2224,12 +2224,12 @@  discard block
 block discarded – undo
2224 2224
 function balise_DOUBLONS_dist($p) {
2225 2225
 	if ($type = interprete_argument_balise(1, $p)) {
2226 2226
 		if ($famille = interprete_argument_balise(2, $p)) {
2227
-			$type .= '.' . $famille;
2227
+			$type .= '.'.$famille;
2228 2228
 		}
2229
-		$p->code = '(isset($doublons[' . $type . ']) ? $doublons[' . $type . '] : "")';
2229
+		$p->code = '(isset($doublons['.$type.']) ? $doublons['.$type.'] : "")';
2230 2230
 		if (!$p->etoile) {
2231 2231
 			$p->code = 'array_filter(array_map("intval",explode(",",'
2232
-				. $p->code . ')))';
2232
+				. $p->code.')))';
2233 2233
 		}
2234 2234
 	} else {
2235 2235
 		$p->code = '$doublons';
@@ -2358,7 +2358,7 @@  discard block
 block discarded – undo
2358 2358
 			$_code[] = "$_key => $_val";
2359 2359
 		}
2360 2360
 	} while ($_key && $_val);
2361
-	$p->code = 'array(' . join(', ', $_code) . ')';
2361
+	$p->code = 'array('.join(', ', $_code).')';
2362 2362
 	$p->interdire_scripts = false;
2363 2363
 
2364 2364
 	return $p;
@@ -2385,7 +2385,7 @@  discard block
 block discarded – undo
2385 2385
 	while ($_val = interprete_argument_balise($n++, $p)) {
2386 2386
 		$_code[] = $_val;
2387 2387
 	}
2388
-	$p->code = 'array(' . join(', ', $_code) . ')';
2388
+	$p->code = 'array('.join(', ', $_code).')';
2389 2389
 	$p->interdire_scripts = false;
2390 2390
 
2391 2391
 	return $p;
@@ -2430,10 +2430,10 @@  discard block
 block discarded – undo
2430 2430
 		$_code[] = $_v;
2431 2431
 	}
2432 2432
 
2433
-	$p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser(' . join(
2433
+	$p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('.join(
2434 2434
 		', ',
2435 2435
 		$_code
2436
-	) . ')?" ":"")';
2436
+	).')?" ":"")';
2437 2437
 	$p->interdire_scripts = false;
2438 2438
 
2439 2439
 	return $p;
@@ -2466,7 +2466,7 @@  discard block
 block discarded – undo
2466 2466
 	$type_info = isset($type_info) ? str_replace('\'', '"', $type_info) : '"est_actif"';
2467 2467
 
2468 2468
 	$f = chercher_filtre('info_plugin');
2469
-	$p->code = $f . '(' . $plugin . ', ' . $type_info . ')';
2469
+	$p->code = $f.'('.$plugin.', '.$type_info.')';
2470 2470
 
2471 2471
 	return $p;
2472 2472
 }
@@ -2716,12 +2716,12 @@  discard block
 block discarded – undo
2716 2716
 	$_issens = "in_array($_champ,array('>','<'))";
2717 2717
 	$_sens = "(strpos('< >',$_champ)-1)";
2718 2718
 
2719
-	$_variable = "((\$s=$_issens)?'sens':'tri')." . $boucle->modificateur['tri_nom'];
2719
+	$_variable = "((\$s=$_issens)?'sens':'tri').".$boucle->modificateur['tri_nom'];
2720 2720
 	$_url = "parametre_url(self(),$_variable,\$s?$_sens:$_champ)";
2721
-	$_url = "parametre_url($_url,'var_memotri',strncmp(" . $boucle->modificateur['tri_nom'] . ",'session',7)==0?$_variable:'')";
2722
-	$_on = '$s?(' . $boucle->modificateur['tri_sens'] . "==$_sens" . '):(' . $boucle->modificateur['tri_champ'] . "==$_champ)";
2721
+	$_url = "parametre_url($_url,'var_memotri',strncmp(".$boucle->modificateur['tri_nom'].",'session',7)==0?$_variable:'')";
2722
+	$_on = '$s?('.$boucle->modificateur['tri_sens']."==$_sens".'):('.$boucle->modificateur['tri_champ']."==$_champ)";
2723 2723
 
2724
-	$p->code = "lien_ou_expose($_url,$_libelle,$_on" . ($_class ? ",$_class" : '') . ')';
2724
+	$p->code = "lien_ou_expose($_url,$_libelle,$_on".($_class ? ",$_class" : '').')';
2725 2725
 	//$p->code = "''";
2726 2726
 	$p->interdire_scripts = false;
2727 2727
 
@@ -2795,7 +2795,7 @@  discard block
 block discarded – undo
2795 2795
 		$connect = $p->boucles[$p->id_boucle]->sql_serveur;
2796 2796
 	}
2797 2797
 
2798
-	$p->code = '(objet_test_si_publie(' . $_type . ',intval(' . $_id . '),' . _q($connect) . ")?' ':'')";
2798
+	$p->code = '(objet_test_si_publie('.$_type.',intval('.$_id.'),'._q($connect).")?' ':'')";
2799 2799
 	$p->interdire_scripts = false;
2800 2800
 
2801 2801
 	return $p;
Please login to merge, or discard this patch.
ecrire/public/fonctions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		$texte = $intro;
85 85
 	} else {
86 86
 		if (
87
-			strpos("\n" . $texte, "\n|") === false
87
+			strpos("\n".$texte, "\n|") === false
88 88
 			and strlen($texte) > 2.5 * $longueur
89 89
 		) {
90 90
 			if (strpos($texte, '<multi') !== false) {
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
 	if ($pas < 1) {
169 169
 		return '';
170 170
 	}
171
-	$ancre = 'pagination' . $nom; // #pagination_articles
172
-	$debut = 'debut' . $nom; // 'debut_articles'
171
+	$ancre = 'pagination'.$nom; // #pagination_articles
172
+	$debut = 'debut'.$nom; // 'debut_articles'
173 173
 
174 174
 	// n'afficher l'ancre qu'une fois
175 175
 	if (!isset($ancres[$ancre])) {
176
-		$bloc_ancre = $ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>";
176
+		$bloc_ancre = $ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>";
177 177
 	} else {
178 178
 		$bloc_ancre = '';
179 179
 	}
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
 
206 206
 	if ($modele) {
207 207
 		$pagination['type_pagination'] = $modele;
208
-		if (trouver_fond('pagination_' . $modele, 'modeles')) {
209
-			$modele = '_' . $modele;
208
+		if (trouver_fond('pagination_'.$modele, 'modeles')) {
209
+			$modele = '_'.$modele;
210 210
 		}
211 211
 		else {
212 212
 			$modele = '';
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 function lister_objets_avec_logos($type) {
292 292
 
293 293
 	$objet = objet_type($type);
294
-	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote('logoon') . ' AND L.objet=' . sql_quote($objet));
294
+	$ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote('logoon').' AND L.objet='.sql_quote($objet));
295 295
 	if ($ids) {
296 296
 		$ids = array_column($ids, 'id_objet');
297 297
 		return implode(',', $ids);
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 		case 'sinum ':
466 466
 			return "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}";
467 467
 		default:
468
-			return $champ . $senstri;
468
+			return $champ.$senstri;
469 469
 	}
470 470
 }
471 471
 
Please login to merge, or discard this patch.
ecrire/public/assembler.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 	$GLOBALS['contexte'] = calculer_contexte();
39 39
 	$page = ['contexte_implicite' => calculer_contexte_implicite()];
40
-	$page['contexte_implicite']['cache'] = $fond . preg_replace(
40
+	$page['contexte_implicite']['cache'] = $fond.preg_replace(
41 41
 		',\.[a-zA-Z0-9]*$,',
42 42
 		'',
43 43
 		preg_replace('/[?].*$/', '', $GLOBALS['REQUEST_URI'])
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			if ($page === '') {
139 139
 				$erreur = _T(
140 140
 					'info_erreur_squelette2',
141
-					['fichier' => spip_htmlspecialchars($fond) . '.' . _EXTENSION_SQUELETTES]
141
+					['fichier' => spip_htmlspecialchars($fond).'.'._EXTENSION_SQUELETTES]
142 142
 				);
143 143
 				erreur_squelette($erreur);
144 144
 				// eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		and !isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])
184 184
 		and !isset($page['entetes']['Last-Modified'])
185 185
 	) {
186
-		$page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified) . ' GMT';
186
+		$page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified).' GMT';
187 187
 	}
188 188
 
189 189
 	// fermer la connexion apres les headers si requete HEAD
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		'spip_version_code' => $GLOBALS['spip_version_code'],
249 249
 	];
250 250
 	if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
251
-		$contexte_implicite['host'] .= '|' . $_SERVER['HTTP_X_FORWARDED_HOST'];
251
+		$contexte_implicite['host'] .= '|'.$_SERVER['HTTP_X_FORWARDED_HOST'];
252 252
 	}
253 253
 
254 254
 	return $contexte_implicite;
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 			}
580 580
 		}
581 581
 		if (is_null($id)) {
582
-			$msg = "modeles/$modele : " . _T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]);
582
+			$msg = "modeles/$modele : "._T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]);
583 583
 			erreur_squelette($msg);
584 584
 			// on passe id=0 au routeur pour tomber sur le modele par defaut et eviter une seconde erreur sur un modele inexistant
585 585
 			$id = 0;
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
 		}
627 627
 
628 628
 		if (preg_match(',^[a-z0-9_]+$,', $soustype)) {
629
-			if (!trouve_modele($fond = ($type . '_' . $soustype))) {
629
+			if (!trouve_modele($fond = ($type.'_'.$soustype))) {
630 630
 				$fond = '';
631 631
 				$class = $soustype;
632 632
 			}
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 
642 642
 		return false;
643 643
 	}
644
-	$fond = 'modeles/' . $fond;
644
+	$fond = 'modeles/'.$fond;
645 645
 	// Creer le contexte
646 646
 	$contexte = $env;
647 647
 	$contexte['dir_racine'] = _DIR_RACINE; # eviter de mixer un cache racine et un cache ecrire (meme si pour l'instant les modeles ne sont pas caches, le resultat etant different il faut que le contexte en tienne compte
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 	// sinon, s'il y a un lien, on l'ajoute classiquement
683 683
 	if (
684 684
 		strstr(
685
-			' ' . ($classes = extraire_attribut($retour, 'class')) . ' ',
685
+			' '.($classes = extraire_attribut($retour, 'class')).' ',
686 686
 			'spip_lien_ok'
687 687
 		)
688 688
 	) {
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 		);
694 694
 	} else {
695 695
 		if ($lien) {
696
-			$retour = "<a href='" . $lien['href'] . "' class='" . $lien['class'] . "'>" . $retour . '</a>';
696
+			$retour = "<a href='".$lien['href']."' class='".$lien['class']."'>".$retour.'</a>';
697 697
 		}
698 698
 	}
699 699
 
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 		return $page;
718 718
 	}
719 719
 	// eval $page et affecte $res
720
-	include _ROOT_RESTREINT . 'public/evaluer_page.php';
720
+	include _ROOT_RESTREINT.'public/evaluer_page.php';
721 721
 
722 722
 	// Lever un drapeau (global) si le fond utilise #SESSION
723 723
 	// a destination de public/parametrer
@@ -785,16 +785,16 @@  discard block
 block discarded – undo
785 785
 			if (($pos = strpos($head, '<head>')) !== false) {
786 786
 				$head = substr_replace($head, $base, $pos + 6, 0);
787 787
 			} elseif (preg_match(',<head[^>]*>,i', $head, $r)) {
788
-				$head = str_replace($r[0], $r[0] . $base, $head);
788
+				$head = str_replace($r[0], $r[0].$base, $head);
789 789
 			}
790
-			$texte = $head . substr($texte, $poshead);
790
+			$texte = $head.substr($texte, $poshead);
791 791
 		}
792 792
 		if ($href_base) {
793 793
 			// gerer les ancres
794 794
 			$base = $_SERVER['REQUEST_URI'];
795 795
 			// pas de guillemets ni < dans l'URL qu'on insere dans le HTML
796 796
 			if (strpos($base, "'") or strpos($base, '"') or strpos($base, '<')) {
797
-				$base = str_replace(["'",'"','<'], ['%27','%22','%3C'], $base);
797
+				$base = str_replace(["'", '"', '<'], ['%27', '%22', '%3C'], $base);
798 798
 			}
799 799
 			if (strpos($texte, "href='#") !== false) {
800 800
 				$texte = str_replace("href='#", "href='$base#", $texte);
Please login to merge, or discard this patch.
ecrire/public/boucles.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
  **/
83 83
 function boucle_HIERARCHIE_dist($id_boucle, &$boucles) {
84 84
 	$boucle = &$boucles[$id_boucle];
85
-	$id_table = $boucle->id_table . '.id_rubrique';
85
+	$id_table = $boucle->id_table.'.id_rubrique';
86 86
 
87 87
 	// Si la boucle mere est une boucle RUBRIQUES il faut ignorer la feuille
88 88
 	// sauf en presence du critere {tout} (vu par phraser_html)
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		. '$hierarchie = calcul_hierarchie_in($id_rubrique,'
96 96
 		. (isset($boucle->modificateur['tout']) ? 'true' : 'false')
97 97
 		. ");\n\t"
98
-		. 'if (!$hierarchie) return "";' . "\n\t";
98
+		. 'if (!$hierarchie) return "";'."\n\t";
99 99
 
100 100
 	$boucle->where[] = ["'IN'", "'$id_table'", '"($hierarchie)"'];
101 101
 
Please login to merge, or discard this patch.
ecrire/maj/legacy/v31.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@
 block discarded – undo
33 33
  */
34 34
 function ranger_cache_gd2() {
35 35
 	spip_log('ranger_cache_gd2');
36
-	$base = _DIR_VAR . 'cache-gd2/';
36
+	$base = _DIR_VAR.'cache-gd2/';
37 37
 	if (is_dir($base) and is_readable($base)) {
38 38
 		if ($dir = opendir($base)) {
39 39
 			while (($f = readdir($dir)) !== false) {
40 40
 				if (
41
-					!is_dir($base . $f) and strncmp($f, '.', 1) !== 0
41
+					!is_dir($base.$f) and strncmp($f, '.', 1) !== 0
42 42
 					and preg_match(',[0-9a-f]{32}\.\w+,', $f)
43 43
 				) {
44 44
 					$sub = substr($f, 0, 2);
45 45
 					$sub = sous_repertoire($base, $sub);
46
-					@rename($base . $f, $sub . substr($f, 2));
47
-					@unlink($base . $f); // au cas ou le rename a foire (collision)
46
+					@rename($base.$f, $sub.substr($f, 2));
47
+					@unlink($base.$f); // au cas ou le rename a foire (collision)
48 48
 				}
49 49
 				if (time() >= _TIME_OUT) {
50 50
 					return;
Please login to merge, or discard this patch.
ecrire/maj/legacy/v40.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
 				spip_log("Table $table TIMESTAMP incorrect", 'maj');
65 65
 				foreach ($desc['field'] as $field => $type) {
66 66
 					if ($desc['field'][$field] !== $fields_corrected[$field]) {
67
-						spip_log("Adaptation TIMESTAMP table $table", 'maj.' . _LOG_INFO_IMPORTANTE);
68
-						sql_alter("table $table change $field $field " . $fields_corrected[$field]);
67
+						spip_log("Adaptation TIMESTAMP table $table", 'maj.'._LOG_INFO_IMPORTANTE);
68
+						sql_alter("table $table change $field $field ".$fields_corrected[$field]);
69 69
 						$trouver_table('');
70 70
 						$new_desc = $trouver_table($table);
71 71
 						spip_log(
72
-							"Apres conversion $table : " . var_export($new_desc['field'], true),
73
-							'maj.' . _LOG_INFO_IMPORTANTE
72
+							"Apres conversion $table : ".var_export($new_desc['field'], true),
73
+							'maj.'._LOG_INFO_IMPORTANTE
74 74
 						);
75 75
 					}
76 76
 				}
Please login to merge, or discard this patch.
ecrire/base/create.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			#if (!$sql_desc) $sql_desc = false;
86 86
 			#spip_log("Resultat table=$table sql_desc:$sql_desc","dbinstall"._LOG_INFO_IMPORTANTE);
87 87
 			if (!$sql_desc) {
88
-				spip_log("Echec creation table $table", 'maj' . _LOG_CRITIQUE);
88
+				spip_log("Echec creation table $table", 'maj'._LOG_CRITIQUE);
89 89
 			}
90 90
 		}
91 91
 	} else {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		if (isset($desc['field'])) {
98 98
 			foreach ($desc['field'] as $field => $type) {
99 99
 				if (!isset($sql_desc['field'][$field])) {
100
-					sql_alter("TABLE $table ADD $field $type" . ($last ? " AFTER $last" : ''), $serveur);
100
+					sql_alter("TABLE $table ADD $field $type".($last ? " AFTER $last" : ''), $serveur);
101 101
 				}
102 102
 				$last = $field;
103 103
 			}
Please login to merge, or discard this patch.
ecrire/base/repair.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 	$res = admin_repair_tables();
40 40
 	if (!$res) {
41
-		$res = "<div class='error'>" . _T('avis_erreur_mysql') . ' ' . sql_errno() . ': ' . sql_error() . "</div>\n";
41
+		$res = "<div class='error'>"._T('avis_erreur_mysql').' '.sql_errno().': '.sql_error()."</div>\n";
42 42
 	} else {
43 43
 		include_spip('inc/rubriques');
44 44
 		calculer_rubriques();
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$res .= pipeline('base_admin_repair', $res);
49 49
 	echo minipres(
50 50
 		_T('texte_tentative_recuperation'),
51
-		$res . generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
51
+		$res.generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))
52 52
 	);
53 53
 }
54 54
 
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
 		$count = sql_countsel($tab);
92 92
 
93 93
 		if ($count > 1) {
94
-			$m .= '(' . _T('texte_compte_elements', ['count' => $count]) . ")\n";
94
+			$m .= '('._T('texte_compte_elements', ['count' => $count]).")\n";
95 95
 		} else {
96 96
 			if ($count == 1) {
97
-				$m .= '(' . _T('texte_compte_element', ['count' => $count]) . ")\n";
97
+				$m .= '('._T('texte_compte_element', ['count' => $count]).")\n";
98 98
 			} else {
99
-				$m .= '(' . _T('texte_vide') . ")\n";
99
+				$m .= '('._T('texte_vide').")\n";
100 100
 			}
101 101
 		}
102 102
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 			and $msg = join(
106 106
 				' ',
107 107
 				(is_resource($result_repair) or is_object($result_repair)) ? sql_fetch($result_repair) : $result_repair
108
-			) . ' '
108
+			).' '
109 109
 			and strpos($msg, ' OK ') === false
110 110
 		) {
111 111
 			$class = " class='notice'";
112
-			$m .= '<br /><tt>' . spip_htmlentities($msg) . "</tt>\n";
112
+			$m .= '<br /><tt>'.spip_htmlentities($msg)."</tt>\n";
113 113
 		} else {
114
-			$m .= ' ' . _T('texte_table_ok');
114
+			$m .= ' '._T('texte_table_ok');
115 115
 		}
116 116
 
117 117
 		$res .= "<div$class>$m</div>";
Please login to merge, or discard this patch.
ecrire/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 // Determiner l'action demandee
36 36
 //
37 37
 
38
-$exec = (string)_request('exec');
38
+$exec = (string) _request('exec');
39 39
 $reinstall = (!is_null(_request('reinstall'))) ? _request('reinstall') : ($exec == 'install' ? 'oui' : null);
40 40
 //
41 41
 // Les scripts d'insallation n'authentifient pas, forcement,
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 			or (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']['statut'] == '0minirezo')
122 122
 		)
123 123
 	) {
124
-		spip_log('Quand la meta admin vaut ' .
125
-			$GLOBALS['meta']['admin'] .
126
-			' seul un admin peut se connecter et sans AJAX.' .
124
+		spip_log('Quand la meta admin vaut '.
125
+			$GLOBALS['meta']['admin'].
126
+			' seul un admin peut se connecter et sans AJAX.'.
127 127
 			' En cas de probleme, detruire cette meta.');
128 128
 		die(_T('info_travaux_texte'));
129 129
 	}
Please login to merge, or discard this patch.