Completed
Push — master ( bdbd8d...676d51 )
by cam
01:31
created
ecrire/balise/formulaire_admin.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 			}
102 102
 			foreach ($debug['sourcefile'] as $k => $v) {
103 103
 				if (strpos($v, 'administration.') !== false) {
104
-					if (isset($debug['resultat'][$k . 'tout'])) {
105
-						return $debug['resultat'][$k . 'tout'];
104
+					if (isset($debug['resultat'][$k.'tout'])) {
105
+						return $debug['resultat'][$k.'tout'];
106 106
 					}
107 107
 				}
108 108
 			}
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 			and $id = intval($id)
181 181
 			and $desc = $trouver_table(table_objet_sql($type))
182 182
 		) {
183
-			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . intval($id));
183
+			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".intval($id));
184 184
 			if ($id) {
185 185
 				$env[$_id_type] = $id;
186 186
 				$env['objet'] = $type;
187 187
 				$env['id_objet'] = $id;
188
-				$env['voir_' . $obj] =
188
+				$env['voir_'.$obj] =
189 189
 					str_replace('&', '&', generer_objet_url($id, $obj, '', '', false));
190 190
 				if (
191 191
 					isset($desc['field']['id_rubrique'])
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
 	$notpub = sql_in('statut', ['prop', 'prive']);
240 240
 
241 241
 	if ($type == 'article' and $GLOBALS['meta']['post_dates'] != 'oui') {
242
-		$notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ')';
242
+		$notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).')';
243 243
 	}
244 244
 
245
-	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . '=' . $id . " AND ($notpub)");
245
+	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type).'='.$id." AND ($notpub)");
246 246
 }
247 247
 
248 248
 
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 	$alang = '';
257 257
 	if (!empty($_COOKIE['spip_admin'])) {
258 258
 		$email_or_login = preg_replace(',^@,', '', $_COOKIE['spip_admin']);
259
-		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email=' . sql_quote($email_or_login));
259
+		$alang = sql_getfetsel('lang', 'spip_auteurs', 'email='.sql_quote($email_or_login));
260 260
 		if (!$alang) {
261
-			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login=' . sql_quote($email_or_login));
261
+			$alang = sql_getfetsel('lang', 'spip_auteurs', 'login='.sql_quote($email_or_login));
262 262
 		}
263 263
 	}
264 264
 	if (!$alang) {
@@ -283,9 +283,8 @@  discard block
 block discarded – undo
283 283
 
284 284
 	return ((!isset($GLOBALS['xhtml']) or $GLOBALS['xhtml'] !== 'true') ?
285 285
 		(parametre_url(self(), 'var_mode', 'debug', '&')
286
-			. '&var_mode_affiche=validation') :
287
-		('http://validator.w3.org/check?uri='
288
-			. rawurlencode('http://' . $_SERVER['HTTP_HOST'] . nettoyer_uri())));
286
+			. '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri='
287
+			. rawurlencode('http://'.$_SERVER['HTTP_HOST'].nettoyer_uri())));
289 288
 }
290 289
 
291 290
 /**
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
@@ -54,12 +54,12 @@
 block discarded – undo
54 54
 		$_params = '[';
55 55
 		$nb_params = is_countable($p->param[0]) ? count($p->param[0]) : 0; // 1ère valeur vide donc 1 en plus
56 56
 		for ($i = 3; $i < $nb_params; $i++) {
57
-			$_params .= interprete_argument_balise($i, $p) . ',';
57
+			$_params .= interprete_argument_balise($i, $p).',';
58 58
 		}
59 59
 		$_params .= ']';
60 60
 
61 61
 		$info_sql = strtolower(substr($info, 5));
62
-		$code = "generer_objet_info($id_objet, $type_objet, '$info_sql', " . ($p->etoile ? _q($p->etoile) : "''") . ", $_params)";
62
+		$code = "generer_objet_info($id_objet, $type_objet, '$info_sql', ".($p->etoile ? _q($p->etoile) : "''").", $_params)";
63 63
 		$p->code = champ_sql($info, $p, $code);
64 64
 		$p->interdire_scripts = true;
65 65
 
Please login to merge, or discard this patch.
ecrire/urls/page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 # attention toutefois seuls '' et '=' figurent dans les modes de compatibilite
24 24
 define('_separateur_urls_page', '');
25 25
 # on peut indiquer '' si on a installe le .htaccess
26
-define('_debut_urls_page', get_spip_script('./') . '?');
26
+define('_debut_urls_page', get_spip_script('./').'?');
27 27
 #######
28 28
 
29 29
 
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 		}
47 47
 	}
48 48
 
49
-	$url = \_debut_urls_page . $objet . \_separateur_urls_page
50
-		. $id . \_terminaison_urls_page;
49
+	$url = \_debut_urls_page.$objet.\_separateur_urls_page
50
+		. $id.\_terminaison_urls_page;
51 51
 
52 52
 	if ($args) {
53 53
 		$args = strpos($url, '?') ? "&$args" : "?$args";
54 54
 	}
55 55
 
56
-	return _DIR_RACINE . $url . $args . ($ancre ? "#$ancre" : '');
56
+	return _DIR_RACINE.$url.$args.($ancre ? "#$ancre" : '');
57 57
 }
58 58
 
59 59
 /**
Please login to merge, or discard this patch.
ecrire/inc/presenter_enfants.php 1 patch
Spacing   +25 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	$result = sql_select(
44 44
 		'id_rubrique, id_parent, titre, descriptif, lang',
45 45
 		'spip_rubriques',
46
-		'id_parent=' . intval($collection),
46
+		'id_parent='.intval($collection),
47 47
 		'',
48 48
 		'0+titre,titre',
49 49
 		"$debut,$limite"
@@ -74,19 +74,18 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 			}
76 76
 
77
-			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' :
78
-					http_img_pack(
77
+			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack(
79 78
 						'auteur-0minirezo-16.png',
80 79
 						'',
81 80
 						" width='16' height='16'",
82 81
 						_T('image_administrer_rubrique')
83
-					)) .
84
-				" <a class='titremlien' dir='$lang_dir'" .
85
-				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') .
86
-				" href='" .
87
-				generer_objet_url($id_rubrique, 'rubrique') .
88
-				"'><span class='titre'>" .
89
-				$rang . $titre
82
+					)).
83
+				" <a class='titremlien' dir='$lang_dir'".
84
+				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : '').
85
+				" href='".
86
+				generer_objet_url($id_rubrique, 'rubrique').
87
+				"'><span class='titre'>".
88
+				$rang.$titre
90 89
 				. '</span>'
91 90
 				. (is_string($logo) ? $logo : '')
92 91
 				. '</a>';
@@ -96,8 +95,8 @@  discard block
 block discarded – undo
96 95
 				;
97 96
 
98 97
 			$res[] =
99
-				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) .
100
-				$les_sous_enfants .
98
+				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre).
99
+				$les_sous_enfants.
101 100
 				fin_cadre_sous_rub();
102 101
 		}
103 102
 	}
@@ -116,7 +115,7 @@  discard block
 block discarded – undo
116 115
  *  Le contenu du bloc dépliable
117 116
  */
118 117
 function sous_enfant_rub($collection2) {
119
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($collection2));
118
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($collection2));
120 119
 
121 120
 	$retour = '';
122 121
 	$pagination = '';
@@ -128,23 +127,23 @@  discard block
 block discarded – undo
128 127
 	 * Si > 500 on affiche une pagination
129 128
 	 */
130 129
 	if ($nb > $limite) {
131
-		$debut = _request('debut_rubrique' . $collection2) ?: $debut;
130
+		$debut = _request('debut_rubrique'.$collection2) ?: $debut;
132 131
 		$pagination = chercher_filtre('pagination');
133
-		$pagination = '<p class="pagination">' . $pagination(
132
+		$pagination = '<p class="pagination">'.$pagination(
134 133
 			$nb,
135
-			'_rubrique' . $collection2,
134
+			'_rubrique'.$collection2,
136 135
 			$debut,
137 136
 			$limite,
138 137
 			true,
139 138
 			'prive'
140
-		) . '</p>';
139
+		).'</p>';
141 140
 		$limite = $debut + $limite;
142 141
 	}
143 142
 
144 143
 	$result = sql_select(
145 144
 		'id_rubrique, id_parent, titre, lang',
146 145
 		'spip_rubriques',
147
-		'id_parent=' . intval($collection2),
146
+		'id_parent='.intval($collection2),
148 147
 		'',
149 148
 		'0+titre,titre',
150 149
 		"$debut,$limite"
@@ -164,14 +163,14 @@  discard block
 block discarded – undo
164 163
 		changer_typo($row['lang']);
165 164
 		$lang_dir = lang_dir($row['lang']);
166 165
 		if (autoriser('voir', 'rubrique', $id_rubrique2)) {
167
-			$retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_objet_url(
166
+			$retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_objet_url(
168 167
 				$id_rubrique2,
169 168
 				'rubrique'
170
-			) . "'>" . $rang2 . $titre2 . "</a></li>\n";
169
+			)."'>".$rang2.$titre2."</a></li>\n";
171 170
 		}
172 171
 	}
173 172
 
174
-	$retour = $pagination . $retour . $pagination;
173
+	$retour = $pagination.$retour.$pagination;
175 174
 
176 175
 	if (!$retour) {
177 176
 		return '';
@@ -180,7 +179,7 @@  discard block
 block discarded – undo
180 179
 	return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2")
181 180
 	. "\n<ul class='liste-items sous-sous-rub'>\n"
182 181
 	. $retour
183
-	. "</ul>\n" . fin_block() . "\n\n";
182
+	. "</ul>\n".fin_block()."\n\n";
184 183
 }
185 184
 
186 185
 /**
@@ -199,13 +198,13 @@  discard block
 block discarded – undo
199 198
 	$debut = 0;
200 199
 	$limite = 500;
201 200
 
202
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique));
201
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique));
203 202
 
204 203
 	if ($nb > $limite) {
205
-		$debut = _request('debut_rubrique' . $id_rubrique) ?: $debut;
204
+		$debut = _request('debut_rubrique'.$id_rubrique) ?: $debut;
206 205
 		$pagination = chercher_filtre('pagination');
207
-		$pagination = '<br class="nettoyeur"><p class="pagination">' .
208
-			$pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') .
206
+		$pagination = '<br class="nettoyeur"><p class="pagination">'.
207
+			$pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive').
209 208
 		'</p>';
210 209
 	}
211 210
 
Please login to merge, or discard this patch.
ecrire/action/menu_rubriques.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 	// on renvoi un 401 qui fait echouer la requete ajax silencieusement
40 40
 	if (!autoriser('ecrire')) {
41 41
 		$retour =
42
-		'<ul class="deroulant__sous-menu" data-profondeur="1">' .
43
-			'<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">' .
44
-				'<a class="deroulant__lien" href="' . generer_url_ecrire('accueil') . '" data-profondeur="1">' .
45
-					'<span class="libelle">' . _T('public:lien_connecter') . '</span>' .
46
-				'</a>' .
47
-			'</li>' .
42
+		'<ul class="deroulant__sous-menu" data-profondeur="1">'.
43
+			'<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">'.
44
+				'<a class="deroulant__lien" href="'.generer_url_ecrire('accueil').'" data-profondeur="1">'.
45
+					'<span class="libelle">'._T('public:lien_connecter').'</span>'.
46
+				'</a>'.
47
+			'</li>'.
48 48
 		'</ul>';
49 49
 		include_spip('inc/actions');
50 50
 		ajax_retour($retour);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	if ($date = intval(_request('date'))) {
55
-		header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $date) . ' GMT');
55
+		header('Last-Modified: '.gmdate('D, d M Y H:i:s', $date).' GMT');
56 56
 	}
57 57
 
58 58
 	$r = gen_liste_rubriques();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		and !strstr($_SERVER['SERVER_SOFTWARE'], 'IIS/')
63 63
 	) {
64 64
 		include_spip('inc/headers');
65
-		header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']);
65
+		header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']);
66 66
 		http_response_code(304);
67 67
 		exit;
68 68
 	} else {
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
  **/
86 86
 function menu_rubriques($complet = true) {
87 87
 	$ret = '<li class="deroulant__item deroulant__item_tout toutsite" data-profondeur="1">'
88
-		. '<a class="deroulant__lien" href="' . generer_url_ecrire('plan') . '" data-profondeur="1">'
89
-		. '<span class="libelle">' . _T('info_tout_site') . '</span>'
88
+		. '<a class="deroulant__lien" href="'.generer_url_ecrire('plan').'" data-profondeur="1">'
89
+		. '<span class="libelle">'._T('info_tout_site').'</span>'
90 90
 		. '</a>'
91 91
 		. '</li>';
92 92
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 	static $zmax = 6;
146 146
 	$profondeur_next = $profondeur + 1;
147 147
 
148
-	$nav = '<a class="deroulant__lien" href="' . generer_objet_url($id_rubrique, 'rubrique', '', '', false) . "\" data-profondeur=\"$profondeur\">"
149
-		. '<span class="libelle">' . supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)) . '</span>'
148
+	$nav = '<a class="deroulant__lien" href="'.generer_objet_url($id_rubrique, 'rubrique', '', '', false)."\" data-profondeur=\"$profondeur\">"
149
+		. '<span class="libelle">'.supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)).'</span>'
150 150
 		. "</a>\n";
151 151
 
152 152
 	// Limiter volontairement le nombre de sous-menus
Please login to merge, or discard this patch.
ecrire/inc/urls.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	) {
204 204
 		$r = nettoyer_url_page($url, $contexte);
205 205
 		if ($r) {
206
-			[$contexte, $type, , , $suite] = $r;
206
+			[$contexte, $type,,, $suite] = $r;
207 207
 			$_id = id_table_objet($type);
208 208
 			$id_objet = $contexte[$_id];
209 209
 			$url_propre = generer_objet_url($id_objet, $type);
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
  */
275 275
 function nettoyer_url_page($url, $contexte = []) {
276 276
 	$url_objets = urls_liste_objets();
277
-	$raccourci_url_page_html = ',^(?:[^?]*/)?(' . $url_objets . ')([0-9]+)(?:\.html)?([?&].*)?$,';
278
-	$raccourci_url_page_id = ',^(?:[^?]*/)?(' . $url_objets . ')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
279
-	$raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?](' . $url_objets . ')([0-9]+)=?(&.*)?$,';
277
+	$raccourci_url_page_html = ',^(?:[^?]*/)?('.$url_objets.')([0-9]+)(?:\.html)?([?&].*)?$,';
278
+	$raccourci_url_page_id = ',^(?:[^?]*/)?('.$url_objets.')\.php3?[?]id_\1=([0-9]+)([?&].*)?$,';
279
+	$raccourci_url_page_spip = ',^(?:[^?]*/)?(?:spip[.]php)?[?]('.$url_objets.')([0-9]+)=?(&.*)?$,';
280 280
 
281 281
 	if (
282 282
 		preg_match($raccourci_url_page_html, $url, $regs)
@@ -314,11 +314,11 @@  discard block
 block discarded – undo
314 314
 	$id = intval($id);
315 315
 	if (!isset($furls[$objet])) {
316 316
 		if (
317
-			function_exists($f = 'generer_' . $objet . '_url_ecrire')
317
+			function_exists($f = 'generer_'.$objet.'_url_ecrire')
318 318
 			// ou definie par un plugin
319 319
 			or $f = charger_fonction($f, 'urls', true)
320 320
 			// deprecated
321
-			or function_exists($f = 'generer_url_ecrire_' . $objet) or $f = charger_fonction($f, 'urls', true)
321
+			or function_exists($f = 'generer_url_ecrire_'.$objet) or $f = charger_fonction($f, 'urls', true)
322 322
 		) {
323 323
 			$furls[$objet] = $f;
324 324
 		} else {
@@ -336,12 +336,12 @@  discard block
 block discarded – undo
336 336
 	if ($public or $connect) {
337 337
 		return generer_objet_url_absolue($id, $objet, $args, $ancre, $public, '', $connect);
338 338
 	}
339
-	$a = id_table_objet($objet) . '=' . intval($id);
339
+	$a = id_table_objet($objet).'='.intval($id);
340 340
 	if (!function_exists('objet_info')) {
341 341
 		include_spip('inc/filtres');
342 342
 	}
343 343
 
344
-	return generer_url_ecrire(objet_info($objet, 'url_voir'), $a . ($args ? "&$args" : '')) . ($ancre ? "#$ancre" : '');
344
+	return generer_url_ecrire(objet_info($objet, 'url_voir'), $a.($args ? "&$args" : '')).($ancre ? "#$ancre" : '');
345 345
 }
346 346
 
347 347
 /**
Please login to merge, or discard this patch.
ecrire/plugins/afficher_liste.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	asort($liste_plugins);
65 65
 	$exposed = urldecode(_request('plugin') ?? '');
66 66
 
67
-	$block_par_lettre = false;//count($liste_plugins)>10;
67
+	$block_par_lettre = false; //count($liste_plugins)>10;
68 68
 	$fast_liste_plugins_actifs = [];
69 69
 	$fast_liste_plugins_checked = [];
70 70
 	if (is_array($liste_plugins_actifs)) {
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 		$actif = isset($fast_liste_plugins_actifs[$plug]);
90 90
 		$checked = isset($fast_liste_plugins_checked[$plug]);
91 91
 		$block_actif = $block_actif | $actif;
92
-		$expose = ($exposed and ($exposed == $plug or $exposed == $dir_plugins . $plug or $exposed == substr(
92
+		$expose = ($exposed and ($exposed == $plug or $exposed == $dir_plugins.$plug or $exposed == substr(
93 93
 			$dir_plugins,
94 94
 			strlen(_DIR_RACINE)
95
-		) . $plug));
96
-		$block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins) . "\n";
95
+		).$plug));
96
+		$block .= $ligne_plug($url_page, $plug, $checked, $actif, $expose, 'item', $dir_plugins)."\n";
97 97
 	}
98 98
 	$res .= $block_par_lettre ? affiche_block_initiale($initiale, $block, $block_actif) : $block;
99 99
 	$class = basename($dir_plugins);
Please login to merge, or discard this patch.
ecrire/public/composer.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$GLOBALS['debug_objets']['courant'] = $nom;
56 56
 	}
57 57
 
58
-	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php';
58
+	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php';
59 59
 
60 60
 	// si squelette est deja compile et perenne, le charger
61 61
 	if (!squelette_obsolete($phpfile, $source)) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		#}
69 69
 	}
70 70
 
71
-	if (file_exists($lib = $squelette . '_fonctions' . '.php')) {
71
+	if (file_exists($lib = $squelette.'_fonctions'.'.php')) {
72 72
 		include_once $lib;
73 73
 	}
74 74
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			eval("return true; $f ;");
97 97
 		} catch (\ParseError $e) {
98 98
 			// Code syntaxiquement faux (critere etc mal programme')
99
-			$msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage();
99
+			$msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage();
100 100
 			erreur_squelette($msg, $boucle);
101 101
 			// continuer pour trouver d'autres fautes eventuelles
102 102
 			// mais prevenir que c'est mort
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 	if (defined('_VAR_MODE') and _VAR_MODE == 'debug') {
126 126
 		// Tracer ce qui vient d'etre compile
127
-		$GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code;
127
+		$GLOBALS['debug_objets']['code'][$nom.'tout'] = $code;
128 128
 
129 129
 		// si c'est ce que demande le debusqueur, lui passer la main
130 130
 		if (
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 		$code = "
149 149
 /*
150 150
  * Squelette : $sourcefile
151
- * Date :      " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT
152
- * Compile :   ' . gmdate('D, d M Y H:i:s', time()) . ' GMT
153
- * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   ' . $noms)) . '
151
+ * Date :      ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT
152
+ * Compile :   ' . gmdate('D, d M Y H:i:s', time()).' GMT
153
+ * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   '.$noms)).'
154 154
  */ ';
155 155
 	}
156 156
 
157
-	$code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>';
157
+	$code = '<'."?php\n".$code.join('', $boucles)."\n?".'>';
158 158
 	if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) {
159 159
 		ecrire_fichier($phpfile, $code);
160 160
 	}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
216 216
 
217 217
 			if ($j == 'X-Spip-Filtre' and isset($headers[$j])) {
218
-				$headers[$j] .= '|' . $r[3];
218
+				$headers[$j] .= '|'.$r[3];
219 219
 			} else {
220 220
 				$headers[$j] = $r[3];
221 221
 			}
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
 	}
224 224
 	// S'agit-il d'un resultat constant ou contenant du code php
225 225
 	$process_ins = (
226
-		strpos($corps, '<' . '?') === false
226
+		strpos($corps, '<'.'?') === false
227 227
 		or
228
-		(strpos($corps, '<' . '?xml') !== false and
229
-			strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
228
+		(strpos($corps, '<'.'?xml') !== false and
229
+			strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
230 230
 	)
231 231
 		? 'html'
232 232
 		: 'php';
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 
256 256
 		if ($process_ins == 'html') {
257 257
 			$skel['process_ins'] = (
258
-				strpos($corps, '<' . '?') === false
258
+				strpos($corps, '<'.'?') === false
259 259
 				or
260
-				(strpos($corps, '<' . '?xml') !== false and
261
-					strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
260
+				(strpos($corps, '<'.'?xml') !== false and
261
+					strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
262 262
 			)
263 263
 				? 'html'
264 264
 				: 'php';
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 //
277 277
 
278 278
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
279
-define('CODE_INCLURE_BALISE', '<' . '?php
279
+define('CODE_INCLURE_BALISE', '<'.'?php
280 280
 include_once("%s");
281 281
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
282 282
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		// pas de lien symbolique sous Windows
308 308
 		and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false)
309 309
 	) {
310
-		$file = './" . _DIR_RACINE . "' . $file;
310
+		$file = './" . _DIR_RACINE . "'.$file;
311 311
 	}
312 312
 
313 313
 	$lang = $context_compil[4];
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
 	$args = array_map('argumenter_squelette', $args);
319 319
 	if (!empty($context_compil['appel_php_depuis_modele'])) {
320
-		$args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')';
320
+		$args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')';
321 321
 	}
322 322
 	$args = join(', ', $args);
323 323
 
@@ -351,14 +351,14 @@  discard block
 block discarded – undo
351 351
 	if (is_object($v)) {
352 352
 		return var_export($v, true);
353 353
 	} elseif (!is_array($v)) {
354
-		return "'" . texte_script((string) $v) . "'";
354
+		return "'".texte_script((string) $v)."'";
355 355
 	} else {
356 356
 		$out = [];
357 357
 		foreach ($v as $k => $val) {
358
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
358
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
359 359
 		}
360 360
 
361
-		return 'array(' . join(', ', $out) . ')';
361
+		return 'array('.join(', ', $out).')';
362 362
 	}
363 363
 }
364 364
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 	}
437 437
 
438 438
 	// Y a-t-il une fonction de traitement des arguments ?
439
-	$f = 'balise_' . $nom_balise . '_stat';
439
+	$f = 'balise_'.$nom_balise.'_stat';
440 440
 
441 441
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
442 442
 
@@ -446,18 +446,18 @@  discard block
 block discarded – undo
446 446
 
447 447
 	// verifier que la fonction dyn est la,
448 448
 	// sinon se replier sur la generique si elle existe
449
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
449
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
450 450
 		if (
451 451
 			$balise_generique = chercher_balise_generique($nom)
452 452
 			and $nom_balise_generique = $balise_generique['nom_generique']
453
-			and $file = include_spip('balise/' . strtolower($nom_balise_generique))
454
-			and function_exists('balise_' . $nom_balise_generique . '_dyn')
453
+			and $file = include_spip('balise/'.strtolower($nom_balise_generique))
454
+			and function_exists('balise_'.$nom_balise_generique.'_dyn')
455 455
 		) {
456 456
 			// et lui injecter en premier arg le nom de la balise
457 457
 			array_unshift($r, $nom);
458 458
 			$nom_balise = $nom_balise_generique;
459 459
 			if (!_DIR_RESTREINT) {
460
-				$file = _DIR_RESTREINT_ABS . $file;
460
+				$file = _DIR_RESTREINT_ABS.$file;
461 461
 			}
462 462
 		} else {
463 463
 			$msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]];
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 		$n = '';
559 559
 		foreach (explode(',', $liste) as $val) {
560 560
 			if ($a = intval($val) and $val === strval($a)) {
561
-				$n .= ',' . $val;
561
+				$n .= ','.$val;
562 562
 			}
563 563
 		}
564 564
 		if (strlen($n)) {
@@ -737,8 +737,8 @@  discard block
 block discarded – undo
737 737
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
738 738
 			$i = 0;
739 739
 			do {
740
-				$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
741
-					[$sous[1] . ' AS id'],
740
+				$where[$k] = remplace_sous_requete($w, '('.calculer_select(
741
+					[$sous[1].' AS id'],
742 742
 					$from,
743 743
 					$from_type,
744 744
 					$wheresub,
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 					$id,
752 752
 					$serveur,
753 753
 					false
754
-				) . ')');
754
+				).')');
755 755
 				if (!$i) {
756 756
 					$i = 1;
757 757
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 		if ($sous[0] == 'SUBSELECT') {
772 772
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
773 773
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
774
-			$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
774
+			$where[$k] = remplace_sous_requete($w, '('.calculer_select(
775 775
 				$sous[1], # select
776 776
 				$sous[2], #from
777 777
 				[], #from_type
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 				$id,
787 787
 				$serveur,
788 788
 				false
789
-			) . ')');
789
+			).')');
790 790
 		}
791 791
 		array_pop($where_simples);
792 792
 	}
@@ -849,15 +849,15 @@  discard block
 block discarded – undo
849 849
 			// sans recours a preg_match
850 850
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
851 851
 			$afrom[$t][$cle] = [
852
-				"\n" .
853
-				($from_type[$cle] ?? 'INNER') . ' JOIN',
852
+				"\n".
853
+				($from_type[$cle] ?? 'INNER').' JOIN',
854 854
 				$from[$cle],
855 855
 				"AS $cle",
856 856
 				'ON (',
857 857
 				"$cle.$c",
858 858
 				'=',
859 859
 				"$t.$carr",
860
-				($and ? 'AND ' . $and : '') .
860
+				($and ? 'AND '.$and : '').
861 861
 				')'
862 862
 			];
863 863
 			if (isset($afrom[$cle])) {
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 		$t = key($from);
896 896
 		$c = current($from);
897 897
 		reset($from);
898
-		$e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/';
898
+		$e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/';
899 899
 		if (
900 900
 			!(strpos($t, ' ') or // jointure des le depart cf boucle_doc
901 901
 				calculer_jointnul($t, $select, $e) or
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
 			unset($afrom[$t][$nt]);
914 914
 			$afrom[$nt] = $afrom[$t];
915 915
 			unset($afrom[$t]);
916
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
916
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
917 917
 			$t = $nfrom[4];
918 918
 			$alias = '';
919 919
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -924,14 +924,14 @@  discard block
 block discarded – undo
924 924
 			if ($newcle != $oldcle) {
925 925
 				// si l'ancienne cle etait deja dans le select avec un AS
926 926
 				// reprendre simplement ce AS
927
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
927
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
928 928
 				if (preg_match($as, implode(',', $select), $m)) {
929 929
 					$alias = '';
930 930
 				} else {
931
-					$alias = ', ' . $nfrom[4] . " AS $oldcle";
931
+					$alias = ', '.$nfrom[4]." AS $oldcle";
932 932
 				}
933 933
 			}
934
-			$select = remplacer_jointnul($t . $alias, $select, $e);
934
+			$select = remplacer_jointnul($t.$alias, $select, $e);
935 935
 			$join = remplacer_jointnul($t, $join, $e);
936 936
 			$where = remplacer_jointnul($t, $where, $e);
937 937
 			$having = remplacer_jointnul($t, $having, $e);
@@ -981,9 +981,9 @@  discard block
 block discarded – undo
981 981
 	} else {
982 982
 		$exp = '';
983 983
 		if (strtoupper($join) === 'AND') {
984
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
984
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
985 985
 		} else {
986
-			return $exp . join($join, $v);
986
+			return $exp.join($join, $v);
987 987
 		}
988 988
 	}
989 989
 }
@@ -1045,6 +1045,6 @@  discard block
 block discarded – undo
1045 1045
 	}
1046 1046
 
1047 1047
 	return $mime_type
1048
-	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_'
1049
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1048
+	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_'
1049
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1050 1050
 }
Please login to merge, or discard this patch.
prive/formulaires/editer_auteur.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		unset($erreurs['new_login']);
171 171
 	}
172 172
 
173
-	$auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
173
+	$auth_methode = sql_getfetsel('source', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
174 174
 	$auth_methode = ($auth_methode ?: 'spip');
175 175
 	include_spip('inc/auth');
176 176
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			!autoriser('modifier', 'auteur', $id_auteur, null, ['email' => '?'])
187 187
 			and $GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
188 188
 			and !strlen(trim($email))
189
-			and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
189
+			and $email != ($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.intval($id_auteur)))
190 190
 		) {
191 191
 			$erreurs['email'] = (($id_auteur == $GLOBALS['visiteur_session']['id_auteur']) ? _T('form_email_non_valide') : _T('form_prop_indiquer_email'));
192 192
 		} else {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 			#Nouvel auteur
202 202
 			if (intval($id_auteur) == 0) {
203 203
 				#Un auteur existe deja avec cette adresse ?
204
-				if (sql_countsel('spip_auteurs', 'email=' . sql_quote($email)) > 0) {
204
+				if (sql_countsel('spip_auteurs', 'email='.sql_quote($email)) > 0) {
205 205
 					$erreurs['email'] = _T('erreur_email_deja_existant');
206 206
 				}
207 207
 			} else {
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
 				if (
210 210
 					(sql_countsel(
211 211
 						'spip_auteurs',
212
-						'email=' . sql_quote($email)
212
+						'email='.sql_quote($email)
213 213
 					) > 0) and ($id_auteur != ($id_auteur_ancien = sql_getfetsel(
214 214
 						'id_auteur',
215 215
 						'spip_auteurs',
216
-						'email=' . sql_quote($email)
216
+						'email='.sql_quote($email)
217 217
 					)))
218 218
 				) {
219 219
 					$erreurs['email'] = _T('erreur_email_deja_existant');
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	// corriger un cas si frequent : www.example.org sans le http:// qui precede
232 232
 	if ($url = _request('url_site') and !tester_url_absolue($url)) {
233 233
 		if (strpos($url, ':') === false and strncasecmp($url, 'www.', 4) === 0) {
234
-			$url = 'http://' . $url;
234
+			$url = 'http://'.$url;
235 235
 			set_request('url_site', $url);
236 236
 		}
237 237
 	}
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
 	}
249 249
 	elseif (
250 250
 		($login = _request('new_login')) and
251
-		$login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur))
251
+		$login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur))
252 252
 	) {
253 253
 		// on verifie la meme chose que dans auteurs_edit_config()
254 254
 		if (
255
-			! auth_autoriser_modifier_login($auth_methode)
255
+			!auth_autoriser_modifier_login($auth_methode)
256 256
 			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['login' => true])
257 257
 			// legacy : ne pas risquer d'autoriser la modif login si fonction d'autorisation pas mise a jour et ne teste que l'option email
258 258
 			or !autoriser('modifier', 'auteur', intval($id_auteur), null, ['email' => true])
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 		if (
360 360
 			$GLOBALS['visiteur_session']['id_auteur'] == $id_auteur
361 361
 			and $email_nouveau !=
362
-				($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)))
362
+				($email_ancien = sql_getfetsel('email', 'spip_auteurs', 'id_auteur='.intval($id_auteur)))
363 363
 		) {
364 364
 			$envoyer_mail = charger_fonction('envoyer_mail', 'inc');
365 365
 			$texte = _T(
@@ -393,12 +393,12 @@  discard block
 block discarded – undo
393 393
 		if (isset($erreurs['message_ok'])) {
394 394
 			if (!isset($res['message_ok'])) { $res['message_ok'] = '';
395 395
 			}
396
-			$res['message_ok'] = trim($res['message_ok'] . ' ' . $erreurs['message_ok']);
396
+			$res['message_ok'] = trim($res['message_ok'].' '.$erreurs['message_ok']);
397 397
 		}
398 398
 		if (isset($erreurs['message_erreur']) and $erreurs['message_erreur']) {
399 399
 			if (!isset($res['message_erreur'])) { $res['message_erreur'] = '';
400 400
 			}
401
-			$res['message_erreur'] = trim($res['message_erreur'] . ' ' . $erreurs['message_erreur']);
401
+			$res['message_erreur'] = trim($res['message_erreur'].' '.$erreurs['message_erreur']);
402 402
 		}
403 403
 	}
404 404
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
 
427 427
 function auteur_reset_password($id_auteur, $erreurs = []) {
428
-	$auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
428
+	$auteur = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
429 429
 	$config = auteurs_edit_config($auteur);
430 430
 
431 431
 	if ($config['edit_pass']) {
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		include_spip('action/editer_auteur');
461 461
 		auteur_modifier($id_auteur, $set);
462 462
 
463
-		$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($id_auteur));
463
+		$row = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($id_auteur));
464 464
 		include_spip('inc/filtres');
465 465
 		if (
466 466
 			$notifier
Please login to merge, or discard this patch.