Completed
Push — master ( f32c85...049667 )
by cam
01:15
created
ecrire/xml/sax.php 1 patch
Spacing   +21 added lines, -22 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	$t = isset($phraseur->ouvrant[$depth]) ? $phraseur->ouvrant[$depth] : ' ';
47 47
 	// espace initial signifie: deja integree au resultat
48 48
 	if ($t[0] != ' ') {
49
-		$phraseur->res .= '<' . $t . '>';
50
-		$phraseur->ouvrant[$depth] = ' ' . $t;
49
+		$phraseur->res .= '<'.$t.'>';
50
+		$phraseur->ouvrant[$depth] = ' '.$t;
51 51
 	}
52 52
 	$t = $phraseur->contenu[$depth];
53 53
 	// n'indenter que s'il y a un separateur avant
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 	foreach ($attrs as $k => $v) {
59 59
 		$delim = strpos($v, "'") === false ? "'" : '"';
60 60
 		$val = xml_entites_html($v);
61
-		$att .= $sep . $k . '=' . $delim
61
+		$att .= $sep.$k.'='.$delim
62 62
 			. ($delim !== '"' ? str_replace('&quot;', '"', $val) : $val)
63 63
 			. $delim;
64 64
 		$sep = "\n $depth";
65 65
 	}
66 66
 	$phraseur->depth .= '  ';
67 67
 	$phraseur->contenu[$phraseur->depth] = '';
68
-	$phraseur->ouvrant[$phraseur->depth] = $name . $att;
68
+	$phraseur->ouvrant[$phraseur->depth] = $name.$att;
69 69
 	$phraseur->reperes[$phraseur->depth] = xml_get_current_line_number($phraseur->sax);
70 70
 }
71 71
 
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 	$ouv = $phraseur->ouvrant[$phraseur->depth];
75 75
 
76 76
 	if ($ouv[0] != ' ') {
77
-		$phraseur->ouvrant[$phraseur->depth] = ' ' . $ouv;
77
+		$phraseur->ouvrant[$phraseur->depth] = ' '.$ouv;
78 78
 	} else {
79 79
 		$ouv = '';
80 80
 	}
81 81
 	$t = $phraseur->contenu[$phraseur->depth];
82 82
 	$phraseur->depth = substr($phraseur->depth, 2);
83
-	$t = preg_replace("/[\n\t ]+$/", "\n" . $phraseur->depth, $t);
83
+	$t = preg_replace("/[\n\t ]+$/", "\n".$phraseur->depth, $t);
84 84
 
85 85
 	// fusion <balise></balise> en <balise />.
86 86
 	// ATTENTION,  certains clients http croient que fusion ==> pas d'atttributs
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	// (param fusion_bal)
90 90
 
91 91
 	if ($t || (($ouv != $name) and !$fusion_bal)) {
92
-		$phraseur->res .= ($ouv ? ('<' . $ouv . '>') : '') . $t . '</' . $name . '>';
92
+		$phraseur->res .= ($ouv ? ('<'.$ouv.'>') : '').$t.'</'.$name.'>';
93 93
 	} else {
94
-		$phraseur->res .= ($ouv ? ('<' . $ouv . ' />') : ('</' . $name . '>'));
94
+		$phraseur->res .= ($ouv ? ('<'.$ouv.' />') : ('</'.$name.'>'));
95 95
 	}
96 96
 }
97 97
 
@@ -136,16 +136,15 @@  discard block
 block discarded – undo
136 136
 		coordonnees_erreur(
137 137
 			$phraseur,
138 138
 			xml_error_string(xml_get_error_code($phraseur->sax))
139
-			. "<br />\n" .
140
-			(!$phraseur->depth ? '' :
141
-				('(' .
142
-					_T('erreur_balise_non_fermee') .
143
-					' <tt>' .
144
-					$phraseur->ouvrant[$phraseur->depth] .
145
-					'</tt> ' .
146
-					_T('ligne') .
147
-					' ' .
148
-					$phraseur->reperes[$phraseur->depth] .
139
+			. "<br />\n".
140
+			(!$phraseur->depth ? '' : ('('.
141
+					_T('erreur_balise_non_fermee').
142
+					' <tt>'.
143
+					$phraseur->ouvrant[$phraseur->depth].
144
+					'</tt> '.
145
+					_T('ligne').
146
+					' '.
147
+					$phraseur->reperes[$phraseur->depth].
149 148
 			") <br />\n"))
150 149
 		);
151 150
 	}
@@ -188,7 +187,7 @@  discard block
 block discarded – undo
188 187
 	// et escamoter le doctype que sax mange en php5 mais pas en  php4
189 188
 	if (!$doctype) {
190 189
 		if (!$r = analyser_doctype($page)) {
191
-			$page = _MESSAGE_DOCTYPE . _DOCTYPE_ECRIRE
190
+			$page = _MESSAGE_DOCTYPE._DOCTYPE_ECRIRE
192 191
 				. preg_replace(_REGEXP_DOCTYPE, '', $page);
193 192
 			$r = analyser_doctype($page);
194 193
 		}
@@ -297,18 +296,18 @@  discard block
 block discarded – undo
297 296
 					'rss-0.91.dtd'
298 297
 				];
299 298
 			} else {
300
-				$dtd = $topelement . '.dtd';
299
+				$dtd = $topelement.'.dtd';
301 300
 				$f = find_in_path($dtd);
302 301
 				if (file_exists($f)) {
303 302
 					return [$entete, 'SYSTEM', $f, $dtd];
304 303
 				}
305 304
 			}
306 305
 		}
307
-		spip_log('Dtd pas vu pour ' . substr($data, 0, 100));
306
+		spip_log('Dtd pas vu pour '.substr($data, 0, 100));
308 307
 
309 308
 		return [];
310 309
 	}
311
-	list($entete, , $topelement, $avail, $suite) = $page;
310
+	list($entete,, $topelement, $avail, $suite) = $page;
312 311
 
313 312
 	if (!preg_match('/^"([^"]*)"\s*(.*)$/', $suite, $r)) {
314 313
 		if (!preg_match("/^'([^']*)'\s*(.*)$/", $suite, $r)) {
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.
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 = (isset($_SERVER['REQUEST_METHOD']) ? $_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/iterateur/data.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		// Si a ce stade on n'a pas de table, il y a un bug
235 235
 		if (!is_array($this->tableau)) {
236 236
 			$this->err = true;
237
-			spip_log('erreur datasource ' . var_export($command, true));
237
+			spip_log('erreur datasource '.var_export($command, true));
238 238
 		}
239 239
 
240 240
 		// {datapath query.results}
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 			isset($this->command['sourcemode'])
277 277
 			and !in_array($this->command['sourcemode'], ['table', 'array', 'tableau'])
278 278
 		) {
279
-			charger_fonction($this->command['sourcemode'] . '_to_array', 'inc', true);
279
+			charger_fonction($this->command['sourcemode'].'_to_array', 'inc', true);
280 280
 		}
281 281
 
282 282
 		# le premier argument peut etre un array, une URL etc.
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		# avons-nous un cache dispo ?
286 286
 		$cle = null;
287 287
 		if (is_string($src)) {
288
-			$cle = 'datasource_' . md5($this->command['sourcemode'] . ':' . var_export($this->command['source'], true));
288
+			$cle = 'datasource_'.md5($this->command['sourcemode'].':'.var_export($this->command['source'], true));
289 289
 		}
290 290
 
291 291
 		$cache = $this->cache_get($cle);
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
 					if (
346 346
 						!$this->err
347
-						and $data_to_array = charger_fonction($this->command['sourcemode'] . '_to_array', 'inc', true)
347
+						and $data_to_array = charger_fonction($this->command['sourcemode'].'_to_array', 'inc', true)
348 348
 					) {
349 349
 						$args = $this->command['source'];
350 350
 						$args[0] = $data;
@@ -484,13 +484,13 @@  discard block
 block discarded – undo
484 484
 							$tv = '%s';
485 485
 						} # {par valeur/xx/yy} ??
486 486
 						else {
487
-							$tv = 'table_valeur(%s, ' . var_export($r[1], true) . ')';
487
+							$tv = 'table_valeur(%s, '.var_export($r[1], true).')';
488 488
 						}
489 489
 						$sortfunc .= '
490
-					$a = ' . sprintf($tv, '$aa') . ';
491
-					$b = ' . sprintf($tv, '$bb') . ';
490
+					$a = ' . sprintf($tv, '$aa').';
491
+					$b = ' . sprintf($tv, '$bb').';
492 492
 					if ($a <> $b)
493
-						return ($a ' . (!empty($r[2]) ? '>' : '<') . ' $b) ? -1 : 1;';
493
+						return ($a ' . (!empty($r[2]) ? '>' : '<').' $b) ? -1 : 1;';
494 494
 					}
495 495
 				}
496 496
 			}
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 
499 499
 		if ($sortfunc) {
500 500
 			$sortfunc .= "\n return 0;";
501
-			uasort($this->tableau, function ($aa, $bb) use ($sortfunc) {
501
+			uasort($this->tableau, function($aa, $bb) use ($sortfunc) {
502 502
 				return eval($sortfunc);
503 503
 			});
504 504
 		}
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 function inc_sql_to_array_dist($data) {
644 644
 	# sortir le connecteur de $data
645 645
 	preg_match(',^(?:(\w+):)?(.*)$,Sm', $data, $v);
646
-	$serveur = (string)$v[1];
646
+	$serveur = (string) $v[1];
647 647
 	$req = trim($v[2]);
648 648
 	if ($s = sql_query($req, $serveur)) {
649 649
 		$r = [];
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
  */
666 666
 function inc_json_to_array_dist($data) {
667 667
 	if (is_array($json = json_decode($data, true))) {
668
-		return (array)$json;
668
+		return (array) $json;
669 669
 	}
670 670
 }
671 671
 
@@ -684,13 +684,13 @@  discard block
 block discarded – undo
684 684
 	$i = 1;
685 685
 	foreach ($entete as $k => $v) {
686 686
 		if (trim($v) == '') {
687
-			$v = 'col' . $i;
687
+			$v = 'col'.$i;
688 688
 		} // reperer des eventuelles cases vides
689 689
 		if (is_numeric($v) and $v < 0) {
690
-			$v = '__' . $v;
690
+			$v = '__'.$v;
691 691
 		} // ne pas risquer d'ecraser une cle numerique
692 692
 		if (is_numeric($v)) {
693
-			$v = '_' . $v;
693
+			$v = '_'.$v;
694 694
 		} // ne pas risquer d'ecraser une cle numerique
695 695
 		$v = strtolower(preg_replace(',\W+,', '_', translitteration($v)));
696 696
 		foreach ($csv as &$item) {
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
  * @return array|bool
776 776
  */
777 777
 function inc_pregfiles_to_array_dist($dir, $regexp = -1, $limit = 10000) {
778
-	return (array)preg_files($dir, $regexp, $limit);
778
+	return (array) preg_files($dir, $regexp, $limit);
779 779
 }
780 780
 
781 781
 /**
@@ -790,13 +790,13 @@  discard block
 block discarded – undo
790 790
 	$glob_to_array = charger_fonction('glob_to_array', 'inc');
791 791
 	$a = $glob_to_array($data);
792 792
 	foreach ($a as &$v) {
793
-		$b = (array)@stat($v);
793
+		$b = (array) @stat($v);
794 794
 		foreach ($b as $k => $ignore) {
795 795
 			if (is_numeric($k)) {
796 796
 				unset($b[$k]);
797 797
 			}
798 798
 		}
799
-		$b['file'] = preg_replace('`/$`', '', $v) ;
799
+		$b['file'] = preg_replace('`/$`', '', $v);
800 800
 		$v = array_merge(
801 801
 			pathinfo($v),
802 802
 			$b
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
 	$xml_array = [];
817 817
 	for ($object->rewind(); $object->valid(); $object->next()) {
818 818
 		if (array_key_exists($key = $object->key(), $xml_array)) {
819
-			$key .= '-' . uniqid();
819
+			$key .= '-'.uniqid();
820 820
 		}
821 821
 		$vars = get_object_vars($object->current());
822 822
 		if (isset($vars['@attributes'])) {
Please login to merge, or discard this patch.
ecrire/install/etape_ldap1.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 					'valeur' => $adresse_ldap
59 59
 				],
60 60
 				'port_ldap' => [
61
-					'label' => _T('entree_port_annuaire') . '<br />' . _T('texte_port_annuaire'),
61
+					'label' => _T('entree_port_annuaire').'<br />'._T('texte_port_annuaire'),
62 62
 					'valeur' => $port_ldap
63 63
 				],
64 64
 				'tls_ldap' => [
65
-					'label' => '<b>' . _T('tls_ldap') . '</b>',
65
+					'label' => '<b>'._T('tls_ldap').'</b>',
66 66
 					'valeur' => $tls_ldap,
67 67
 					'alternatives' => [
68 68
 						'non' => _T('item_non'),
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			]
81 81
 		)
82 82
 
83
-		. "\n<p>" . _T('texte_acces_ldap_anonyme_1') . '</p>'
83
+		. "\n<p>"._T('texte_acces_ldap_anonyme_1').'</p>'
84 84
 		. fieldset(
85 85
 			_T('connexion_ldap'),
86 86
 			[
Please login to merge, or discard this patch.
ecrire/install/etape_chmod.php 1 patch
Spacing   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$test_dir .= '/';
82 82
 		}
83 83
 		if (!in_array($test_dir, $GLOBALS['test_dirs'])) {
84
-			$GLOBALS['test_dirs'][] = _DIR_RACINE . $test_dir;
84
+			$GLOBALS['test_dirs'][] = _DIR_RACINE.$test_dir;
85 85
 		}
86 86
 	} else {
87 87
 		if (!_FILE_CONNECT) {
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
 	foreach ($GLOBALS['test_dirs'] as $i => $my_dir) {
97 97
 		$test = test_ecrire($my_dir);
98 98
 		if (!$test) {
99
-			$m = preg_replace(',^' . _DIR_RACINE . ',', '', $my_dir);
99
+			$m = preg_replace(',^'._DIR_RACINE.',', '', $my_dir);
100 100
 			if (@file_exists($my_dir)) {
101
-				$bad_dirs['<li>' . $m . '</li>'] = 1;
101
+				$bad_dirs['<li>'.$m.'</li>'] = 1;
102 102
 			} else {
103
-				$absent_dirs['<li>' . $m . '</li>'] = 1;
103
+				$absent_dirs['<li>'.$m.'</li>'] = 1;
104 104
 			}
105 105
 		} else {
106 106
 			$chmod = max($chmod, $test);
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
 	if ($bad_dirs or $absent_dirs) {
111 111
 		if (!_FILE_CONNECT) {
112 112
 			$titre = _T('dirs_preliminaire');
113
-			$continuer = ' ' . _T('dirs_commencer') . '.';
113
+			$continuer = ' '._T('dirs_commencer').'.';
114 114
 		} else {
115 115
 			$titre = _T('dirs_probleme_droits');
116 116
 		}
117 117
 
118 118
 
119
-		$res = "<div align='right'>" . menu_langues('var_lang_ecrire') . "</div>\n";
119
+		$res = "<div align='right'>".menu_langues('var_lang_ecrire')."</div>\n";
120 120
 
121 121
 		if ($bad_dirs) {
122 122
 			$res .=
123 123
 				_T(
124 124
 					'dirs_repertoires_suivants',
125 125
 					['bad_dirs' => join("\n", array_keys($bad_dirs))]
126
-				) .
127
-				'<b>' . _T('login_recharger') . '</b>.';
126
+				).
127
+				'<b>'._T('login_recharger').'</b>.';
128 128
 		}
129 129
 
130 130
 		if ($absent_dirs) {
@@ -132,22 +132,21 @@  discard block
 block discarded – undo
132 132
 				_T(
133 133
 					'dirs_repertoires_absents',
134 134
 					['bad_dirs' => join("\n", array_keys($absent_dirs))]
135
-				) .
136
-				'<b>' . _T('login_recharger') . '</b>.';
135
+				).
136
+				'<b>'._T('login_recharger').'</b>.';
137 137
 		}
138
-		$res = '<p>' . $continuer . $res . aider('install0', true) . '</p>';
138
+		$res = '<p>'.$continuer.$res.aider('install0', true).'</p>';
139 139
 
140 140
 		$t = _T('login_recharger');
141
-		$t = (!$test_dir ? '' :
142
-				"<input type='hidden' name='test_dir' value='" . spip_htmlspecialchars($test_dir, ENT_QUOTES) . "' />")
141
+		$t = (!$test_dir ? '' : "<input type='hidden' name='test_dir' value='".spip_htmlspecialchars($test_dir, ENT_QUOTES)."' />")
143 142
 			. "<input type='hidden' name='etape' value='chmod' />"
144
-			. "<div style='text-align: right'><input type='submit' value='" . attribut_html($t) . "' /></div>";
143
+			. "<div style='text-align: right'><input type='submit' value='".attribut_html($t)."' /></div>";
145 144
 
146
-		echo minipres($titre, $res . generer_form_ecrire('install', $t));
145
+		echo minipres($titre, $res.generer_form_ecrire('install', $t));
147 146
 	} else {
148 147
 		$deja = (_FILE_CONNECT and analyse_fichier_connection(_FILE_CONNECT));
149 148
 		if (!$deja) {
150
-			redirige_url_ecrire('install', 'etape=1&chmod=' . $chmod);
149
+			redirige_url_ecrire('install', 'etape=1&chmod='.$chmod);
151 150
 		} else {
152 151
 			redirige_url_ecrire();
153 152
 		}
Please login to merge, or discard this patch.
ecrire/install/etape_ldap4.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	if ($fail) {
41 41
 		echo info_etape(_T('info_chemin_acces_annuaire')),
42 42
 		info_progression_etape(3, 'etape_ldap', 'install/', true),
43
-			"<div class='error'><p><b>" . _T('avis_operation_echec') . '</b></p><p>' . _T('avis_chemin_invalide_1'),
44
-			' (<tt>' . spip_htmlspecialchars($base_ldap) . '</tt>) ' . _T('avis_chemin_invalide_2') . '</p></div>';
43
+			"<div class='error'><p><b>"._T('avis_operation_echec').'</b></p><p>'._T('avis_chemin_invalide_1'),
44
+			' (<tt>'.spip_htmlspecialchars($base_ldap).'</tt>) '._T('avis_chemin_invalide_2').'</p></div>';
45 45
 	} else {
46 46
 		info_etape(_T('info_reglage_ldap'));
47 47
 		echo info_progression_etape(4, 'etape_ldap', 'install/');
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
 		$res = install_propager(['adresse_ldap', 'port_ldap', 'login_ldap', 'pass_ldap', 'protocole_ldap', 'tls_ldap'])
56 56
 			. "<input type='hidden' name='etape' value='ldap5' />"
57
-			. "<input type='hidden' name='base_ldap' value='" . spip_htmlentities($base_ldap) . "' />"
57
+			. "<input type='hidden' name='base_ldap' value='".spip_htmlentities($base_ldap)."' />"
58 58
 			. fieldset(
59 59
 				_T('info_statut_utilisateurs_1'),
60 60
 				[
61 61
 					'statut_ldap' => [
62
-						'label' => _T('info_statut_utilisateurs_2') . '<br />',
62
+						'label' => _T('info_statut_utilisateurs_2').'<br />',
63 63
 						'valeur' => $statut_ldap,
64 64
 						'alternatives' => $statuts
65 65
 					]
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 // https://code.spip.net/@liste_statuts_ldap
78 78
 function liste_statuts_ldap() {
79 79
 	$recom = [
80
-		'info_administrateurs' => ('<b>' . _T('info_administrateur_1') . '</b> ' . _T('info_administrateur_2') . '<br />'),
81
-		'info_redacteurs' => ('<b>' . _T('info_redacteur_1') . '</b> ' . _T('info_redacteur_2') . '<br />'),
82
-		'info_visiteurs' => ('<b>' . _T('info_visiteur_1') . '</b> ' . _T('info_visiteur_2') . '<br />')
80
+		'info_administrateurs' => ('<b>'._T('info_administrateur_1').'</b> '._T('info_administrateur_2').'<br />'),
81
+		'info_redacteurs' => ('<b>'._T('info_redacteur_1').'</b> '._T('info_redacteur_2').'<br />'),
82
+		'info_visiteurs' => ('<b>'._T('info_visiteur_1').'</b> '._T('info_visiteur_2').'<br />')
83 83
 	];
84 84
 
85 85
 	$res = [];
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 function install_ldap_correspondances() {
96 96
 	$champs = [];
97 97
 	foreach (is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [] as $champ => $v) {
98
-		$nom = 'ldap_' . $champ;
98
+		$nom = 'ldap_'.$champ;
99 99
 		$val = is_array($v) ? join(',', $v) : strval($v);
100 100
 		$champs[$nom] = [
101
-			'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]) . '<br />',
101
+			'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]).'<br />',
102 102
 			'valeur' => $val
103 103
 		];
104 104
 	}
105 105
 
106 106
 	return !$champs ?
107
-		'' : fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2') . '<br /><br />');
107
+		'' : fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2').'<br /><br />');
108 108
 }
Please login to merge, or discard this patch.
ecrire/install/etape_3.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, '', $server_db);
46 46
 
47 47
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
48
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
48
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
49 49
 
50 50
 	$fquery = sql_serveur('query', $server_db);
51 51
 	if ($choix_db == 'new_spip') {
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 			if (!$ok) {
56 56
 				$re = "Impossible de creer la base $re";
57 57
 				spip_log($re);
58
-				return '<p>' . _T('avis_connexion_erreur_creer_base') . "</p><!--\n$re\n-->";
58
+				return '<p>'._T('avis_connexion_erreur_creer_base')."</p><!--\n$re\n-->";
59 59
 			}
60 60
 		} else {
61 61
 			$re = "Le nom de la base doit correspondre a $re";
62 62
 			spip_log($re);
63 63
 
64
-			return '<p>' . _T('avis_connexion_erreur_nom_base') . "</p><!--\n$re\n-->";
64
+			return '<p>'._T('avis_connexion_erreur_nom_base')."</p><!--\n$re\n-->";
65 65
 		}
66 66
 	}
67 67
 
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, $sel_db, $server_db);
73 73
 
74 74
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
75
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
75
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
76 76
 
77 77
 	// Completer le tableau decrivant la connexion
78 78
 
79 79
 	$GLOBALS['connexions'][$server_db]['prefixe'] = $table_prefix;
80 80
 	$GLOBALS['connexions'][$server_db]['db'] = $sel_db;
81 81
 
82
-	$old = sql_showbase($table_prefix . '_meta', $server_db);
82
+	$old = sql_showbase($table_prefix.'_meta', $server_db);
83 83
 	if ($old) {
84 84
 		$old = sql_fetch($old, $server_db);
85 85
 	}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 				$charset['charset'];
99 99
 			$charsetbase = $charset['charset'];
100 100
 		} else {
101
-			spip_log(_DEFAULT_CHARSET . ' inconnu du serveur SQL');
101
+			spip_log(_DEFAULT_CHARSET.' inconnu du serveur SQL');
102 102
 			$charsetbase = 'standard';
103 103
 		}
104 104
 		spip_log("Creation des tables. Codage $charsetbase");
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 		if ($r) {
149 149
 			$r = sql_fetch($r, $server_db);
150 150
 		}
151
-		$version_installee = !$r ? 0 : (double)$r['valeur'];
151
+		$version_installee = !$r ? 0 : (double) $r['valeur'];
152 152
 		if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) {
153 153
 			$fupdateq(
154 154
 				'spip_meta',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 				'',
158 158
 				$server_db
159 159
 			);
160
-			spip_log('nouvelle version installee: ' . $GLOBALS['spip_version_base']);
160
+			spip_log('nouvelle version installee: '.$GLOBALS['spip_version_base']);
161 161
 		}
162 162
 		// eliminer la derniere operation d'admin mal terminee
163 163
 		// notamment la mise a jour
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	if ($chmod_db) {
185 185
 		install_fichier_connexion(
186 186
 			_FILE_CHMOD_TMP,
187
-			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', " . sprintf('0%3o', $chmod_db) . ");\n"
187
+			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', ".sprintf('0%3o', $chmod_db).");\n"
188 188
 		);
189 189
 	}
190 190
 
@@ -249,16 +249,16 @@  discard block
 block discarded – undo
249 249
 
250 250
 // https://code.spip.net/@install_premier_auteur
251 251
 function install_premier_auteur($email, $login, $nom, $pass, $hidden, $auteur_obligatoire) {
252
-	return info_progression_etape(3, 'etape_', 'install/') .
252
+	return info_progression_etape(3, 'etape_', 'install/').
253 253
 	info_etape(
254 254
 		_T('info_informations_personnelles'),
255
-		'<b>' . _T('texte_informations_personnelles_1') . '</b>' .
256
-		aider('install5', true) .
257
-		'<p>' .
255
+		'<b>'._T('texte_informations_personnelles_1').'</b>'.
256
+		aider('install5', true).
257
+		'<p>'.
258 258
 		($auteur_obligatoire ?
259 259
 			''
260 260
 			:
261
-			_T('texte_informations_personnelles_2') . ' ' . _T('info_laisser_champs_vides')
261
+			_T('texte_informations_personnelles_2').' '._T('info_laisser_champs_vides')
262 262
 		)
263 263
 	)
264 264
 	. generer_form_ecrire('install', (
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
 			_T('info_identification_publique'),
269 269
 			[
270 270
 				'nom' => [
271
-					'label' => '<b>' . _T('entree_signature') . "</b><br />\n" . _T('entree_nom_pseudo_1') . "\n",
271
+					'label' => '<b>'._T('entree_signature')."</b><br />\n"._T('entree_nom_pseudo_1')."\n",
272 272
 					'valeur' => $nom,
273 273
 					'required' => $auteur_obligatoire,
274 274
 				],
275 275
 				'email' => [
276
-					'label' => '<b>' . _T('entree_adresse_email') . "</b>\n",
276
+					'label' => '<b>'._T('entree_adresse_email')."</b>\n",
277 277
 					'valeur' => $email,
278 278
 				]
279 279
 			]
@@ -283,23 +283,23 @@  discard block
 block discarded – undo
283 283
 			_T('entree_identifiants_connexion'),
284 284
 			[
285 285
 				'login' => [
286
-					'label' => '<b>' . _T('entree_login') . "</b><br />\n" . _T(
286
+					'label' => '<b>'._T('entree_login')."</b><br />\n"._T(
287 287
 						'info_login_trop_court_car_pluriel',
288 288
 						['nb' => _LOGIN_TROP_COURT]
289
-					) . "\n",
289
+					)."\n",
290 290
 					'valeur' => $login,
291 291
 					'required' => $auteur_obligatoire,
292 292
 				],
293 293
 				'pass' => [
294
-					'label' => '<b>' . _T('entree_mot_passe') . "</b><br />\n" . _T(
294
+					'label' => '<b>'._T('entree_mot_passe')."</b><br />\n"._T(
295 295
 						'info_passe_trop_court_car_pluriel',
296 296
 						['nb' => _PASS_LONGUEUR_MINI]
297
-					) . "\n",
297
+					)."\n",
298 298
 					'valeur' => $pass,
299 299
 					'required' => $auteur_obligatoire,
300 300
 				],
301 301
 				'pass_verif' => [
302
-					'label' => '<b>' . _T('info_confirmer_passe') . "</b><br />\n",
302
+					'label' => '<b>'._T('info_confirmer_passe')."</b><br />\n",
303 303
 					'valeur' => $pass,
304 304
 					'required' => $auteur_obligatoire,
305 305
 				]
@@ -344,9 +344,9 @@  discard block
 block discarded – undo
344 344
 
345 345
 		if ($res) {
346 346
 			$res = info_progression_etape(2, 'etape_', 'install/', true)
347
-				. "<div class='error'><h3>" . _T('avis_operation_echec') . '</h3>'
347
+				. "<div class='error'><h3>"._T('avis_operation_echec').'</h3>'
348 348
 				. $res
349
-				. '<p>' . _T('texte_operation_echec') . '</p>'
349
+				. '<p>'._T('texte_operation_echec').'</p>'
350 350
 				. '</div>';
351 351
 		}
352 352
 	} else {
Please login to merge, or discard this patch.
ecrire/install/etape_fin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	// creer le repertoire cache, qui sert partout !
46 46
 	// deja fait en etape 4 en principe, on garde au cas ou
47 47
 	if (!@file_exists(_DIR_CACHE)) {
48
-		$rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE);
48
+		$rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE);
49 49
 		$rep = sous_repertoire(_DIR_TMP, $rep, true, true);
50 50
 	}
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	if ($msg) {
56 56
 		$cible = _T('public:accueil_site');
57 57
 		$cible = generer_form_ecrire('accueil', '', '', $cible);
58
-		echo minipres('AUTO', $msg . $cible);
58
+		echo minipres('AUTO', $msg.$cible);
59 59
 		// ok, deboucher dans l'espace prive
60 60
 	} else {
61 61
 		redirige_url_ecrire('accueil');
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	$averti = _T(
76 76
 		'htaccess_a_simuler',
77 77
 		[
78
-			'htaccess' => '<tt>' . _ACCESS_FILE_NAME . '</tt>',
78
+			'htaccess' => '<tt>'._ACCESS_FILE_NAME.'</tt>',
79 79
 			'constantes' => '<tt>_DIR_TMP &amp; _DIR_CONNECT</tt>',
80
-			'document_root' => '<tt>' . $_SERVER['DOCUMENT_ROOT'] . '</tt>'
80
+			'document_root' => '<tt>'.$_SERVER['DOCUMENT_ROOT'].'</tt>'
81 81
 		]
82 82
 	);
83 83
 
Please login to merge, or discard this patch.