Completed
Push — master ( 38d65b...22be31 )
by cam
01:26
created
ecrire/plugins/get_infos.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	static $filecache = '';
38 38
 
39 39
 	if ($cache === '') {
40
-		$filecache = _DIR_TMP . 'plugin_xml_cache.gz';
40
+		$filecache = _DIR_TMP.'plugin_xml_cache.gz';
41 41
 		if (is_file($filecache)) {
42 42
 			lire_fichier($filecache, $contenu);
43 43
 			$cache = unserialize($contenu);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	if (isset($ret['prefix']) and $ret['prefix'] == 'spip') {
129 129
 		$ret['procure']['php'] = ['nom' => 'php', 'version' => phpversion()];
130 130
 		foreach (get_loaded_extensions() as $ext) {
131
-			$ret['procure']['php:' . $ext] = ['nom' => 'php:' . $ext, 'version' => phpversion($ext)];
131
+			$ret['procure']['php:'.$ext] = ['nom' => 'php:'.$ext, 'version' => phpversion($ext)];
132 132
 		}
133 133
 	}
134 134
 	$diff = ($ret != $pcache);
Please login to merge, or discard this patch.
ecrire/inc/headers.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
 		(!$equiv and !spip_cookie_envoye()) or (
80 80
 			   (!empty($_SERVER['SERVER_SOFTWARE'])
81 81
 				   and _SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE
82
-				   and preg_match('/' . _SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE . '/i', $_SERVER['SERVER_SOFTWARE']))
82
+				   and preg_match('/'._SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE.'/i', $_SERVER['SERVER_SOFTWARE']))
83 83
 			or (!empty($_SERVER['SERVER_SIGNATURE'])
84 84
 				   and _SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE
85
-				   and preg_match('/' . _SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE . '/i', $_SERVER['SERVER_SIGNATURE']))
85
+				   and preg_match('/'._SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE.'/i', $_SERVER['SERVER_SIGNATURE']))
86 86
 			or function_exists('apache_getenv')
87 87
 			or defined('_SERVER_APACHE')
88 88
 		)
89 89
 	) {
90
-		@header('Location: ' . $url);
90
+		@header('Location: '.$url);
91 91
 		$equiv = '';
92 92
 	} else {
93
-		@header('Refresh: 0; url=' . $url);
93
+		@header('Refresh: 0; url='.$url);
94 94
 		if (isset($GLOBALS['meta']['charset'])) {
95
-			@header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']);
95
+			@header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']);
96 96
 		}
97 97
 		$equiv = "<meta http-equiv='Refresh' content='0; url=$url'>";
98 98
 	}
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
 	html_lang_attributes(), '
105 105
 <head>',
106 106
 	$equiv, '
107
-<title>HTTP ' . $status . '</title>
108
-' . ((isset($GLOBALS['meta']['charset'])) ? '<meta http-equiv="Content-Type" content="text/html;charset=' . $GLOBALS['meta']['charset'] . '">' : '') . '
107
+<title>HTTP ' . $status.'</title>
108
+' . ((isset($GLOBALS['meta']['charset'])) ? '<meta http-equiv="Content-Type" content="text/html;charset='.$GLOBALS['meta']['charset'].'">' : '').'
109 109
 </head>
110 110
 <body>
111
-<h1>HTTP ' . $status . '</h1>
111
+<h1>HTTP ' . $status.'</h1>
112 112
 <a href="',
113 113
 	quote_amp($url),
114 114
 	'">',
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		# en theorie on devrait faire ca tout le temps, mais quand la chaine
145 145
 		# commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne
146 146
 		if ($url[0] == '?') {
147
-			$url = url_de_base() . $url;
147
+			$url = url_de_base().$url;
148 148
 		}
149 149
 		$url = str_replace('&amp;', '&', $url);
150 150
 		spip_log("redirige formulaire ajax: $url");
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
 		if ($format == 'ajaxform') {
153 153
 			return [
154 154
 				// on renvoie un lien masque qui sera traite par ajaxCallback.js
155
-				'<a href="' . quote_amp($url) . '" name="ajax_redirect"  style="display:none;">' . _T('navigateur_pas_redirige') . '</a>',
155
+				'<a href="'.quote_amp($url).'" name="ajax_redirect"  style="display:none;">'._T('navigateur_pas_redirige').'</a>',
156 156
 				// et un message au cas ou
157
-				'<br /><a href="' . quote_amp($url) . '">' . _T('navigateur_pas_redirige') . '</a>'
157
+				'<br /><a href="'.quote_amp($url).'">'._T('navigateur_pas_redirige').'</a>'
158 158
 			];
159 159
 		} else // format message texte, tout en js inline
160 160
 		{
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				"<script type='text/javascript'>if (parent.window){parent.window.document.location.replace(\"$url\");} else {document.location.replace(\"$url\");}</script>"
164 164
 				. http_img_pack('loader.svg', '', " class='loader'")
165 165
 				. '<br />'
166
-				. '<a href="' . quote_amp($url) . '">' . _T('navigateur_pas_redirige') . '</a>';
166
+				. '<a href="'.quote_amp($url).'">'._T('navigateur_pas_redirige').'</a>';
167 167
 		}
168 168
 	}
169 169
 }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
 	header("Content-Type: text/html; charset=$charset");
224 224
 	header('Expires: 0');
225
-	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
225
+	header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
226 226
 	header('Cache-Control: no-cache, must-revalidate');
227 227
 	header('Pragma: no-cache');
228 228
 }
Please login to merge, or discard this patch.
ecrire/public/cacher.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 function generer_nom_fichier_cache($contexte, $page) {
30 30
 	$u = md5(var_export([$contexte, $page], true));
31 31
 
32
-	return $u . '.cache';
32
+	return $u.'.cache';
33 33
 }
34 34
 
35 35
 /**
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	}
62 62
 	else {
63 63
 		// en lecture on essaye pas de creer les repertoires, on va au plus vite
64
-		$rep = _DIR_CACHE . "calcul/$d/";
64
+		$rep = _DIR_CACHE."calcul/$d/";
65 65
 	}
66 66
 
67
-	return $rep . $u . '.cache';
67
+	return $rep.$u.'.cache';
68 68
 }
69 69
 
70 70
 /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		);
116 116
 	}
117 117
 
118
-	return crc32($GLOBALS['meta']['cache_signature'] . $page['texte']);
118
+	return crc32($GLOBALS['meta']['cache_signature'].$page['texte']);
119 119
 }
120 120
 
121 121
 /**
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		// "cache sessionne" ; sa date indique la date de validite
272 272
 		// des caches sessionnes
273 273
 		if (!$tmp = lire_cache($chemin_cache)) {
274
-			spip_log('Creation cache sessionne ' . $chemin_cache);
274
+			spip_log('Creation cache sessionne '.$chemin_cache);
275 275
 			$tmp = [
276 276
 				'invalideurs' => ['session' => ''],
277 277
 				'lastmodified' => $_SERVER['REQUEST_TIME']
@@ -297,8 +297,8 @@  discard block
 block discarded – undo
297 297
 	// l'enregistrer, compresse ou non...
298 298
 	$ok = ecrire_cache($chemin_cache, $pagez);
299 299
 
300
-	spip_log((_IS_BOT ? 'Bot:' : '') . "Creation du cache $chemin_cache pour "
301
-		. $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)'), _LOG_INFO);
300
+	spip_log((_IS_BOT ? 'Bot:' : '')."Creation du cache $chemin_cache pour "
301
+		. $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)'), _LOG_INFO);
302 302
 
303 303
 	// Inserer ses invalideurs
304 304
 	include_spip('inc/invalideur');
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 function nettoyer_petit_cache($prefix, $duree = 300) {
320 320
 	// determiner le repertoire a purger : 'tmp/CACHE/rech/'
321 321
 	$dircache = sous_repertoire(_DIR_CACHE, $prefix);
322
-	if (spip_touch($dircache . 'purger_' . $prefix, $duree, true)) {
322
+	if (spip_touch($dircache.'purger_'.$prefix, $duree, true)) {
323 323
 		foreach (preg_files($dircache, '[.]txt$') as $f) {
324 324
 			if ($_SERVER['REQUEST_TIME'] - (@file_exists($f) ? @filemtime($f) : 0) > $duree) {
325 325
 				spip_unlink($f);
@@ -414,9 +414,9 @@  discard block
 block discarded – undo
414 414
 		if (spip_connect()) {
415 415
 			include_spip('inc/invalideur');
416 416
 			retire_caches($chemin_cache); # API invalideur inutile
417
-			supprimer_fichier(_DIR_CACHE . $chemin_cache);
417
+			supprimer_fichier(_DIR_CACHE.$chemin_cache);
418 418
 			if (isset($chemin_cache_session) and $chemin_cache_session) {
419
-				supprimer_fichier(_DIR_CACHE . $chemin_cache_session);
419
+				supprimer_fichier(_DIR_CACHE.$chemin_cache_session);
420 420
 			}
421 421
 		}
422 422
 	}
@@ -433,9 +433,9 @@  discard block
 block discarded – undo
433 433
 		$page = ['contexte_implicite' => $contexte_implicite]; // ignorer le cache deja lu
434 434
 		include_spip('inc/invalideur');
435 435
 		retire_caches($chemin_cache); # API invalideur inutile
436
-		supprimer_fichier(_DIR_CACHE . $chemin_cache);
436
+		supprimer_fichier(_DIR_CACHE.$chemin_cache);
437 437
 		if (isset($chemin_cache_session) and $chemin_cache_session) {
438
-			supprimer_fichier(_DIR_CACHE . $chemin_cache_session);
438
+			supprimer_fichier(_DIR_CACHE.$chemin_cache_session);
439 439
 		}
440 440
 	}
441 441
 
Please login to merge, or discard this patch.
ecrire/balise/formulaire_.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@
 block discarded – undo
312 312
 			foreach ($erreurs as $k => $v) {
313 313
 				if (is_string($v) and strlen(trim($v)) and strpos($k, '_') !== 0) {
314 314
 					// on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form
315
-					$valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>';
315
+					$valeurs['erreurs'][$k] = "<span role='alert'>".$erreurs[$k].'</span>';
316 316
 				}
317 317
 			}
318 318
 		}
Please login to merge, or discard this patch.
ecrire/public/aiguiller.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	) {
29 29
 		// si l'url est une url du site, on la laisse passer sans rien faire
30 30
 		// c'est encore le plus simple
31
-		$base = $GLOBALS['meta']['adresse_site'] . '/';
31
+		$base = $GLOBALS['meta']['adresse_site'].'/';
32 32
 		if (strlen($base) and strncmp($redirect, $base, strlen($base)) == 0) {
33 33
 			return $redirect;
34 34
 		}
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 			if ($ancre = _request('var_ajax_ancre')) {
157 157
 				// pas n'importe quoi quand meme dans la variable !
158 158
 				$ancre = str_replace(['<', '"', "'"], ['&lt;', '&quot;', ''], $ancre);
159
-				$texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>" . $texte;
159
+				$texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>".$texte;
160 160
 			}
161 161
 		} else {
162 162
 			include_spip('inc/headers');
@@ -199,26 +199,26 @@  discard block
 block discarded – undo
199 199
 	$sign = _request('formulaire_action_sign');
200 200
 	if (!empty($GLOBALS['visiteur_session']['id_auteur'])) {
201 201
 		if (empty($sign)) {
202
-			spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires' . _LOG_ERREUR);
202
+			spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires'._LOG_ERREUR);
203 203
 			return false;
204 204
 		}
205 205
 		$securiser_action = charger_fonction('securiser_action', 'inc');
206 206
 		$secu = $securiser_action($form, $args, '', -1);
207 207
 		if ($sign !== $secu['hash']) {
208
-			spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires' . _LOG_ERREUR);
208
+			spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires'._LOG_ERREUR);
209 209
 			return false;
210 210
 		}
211 211
 	}
212 212
 	else {
213 213
 		if (!empty($sign)) {
214
-			spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires' . _LOG_ERREUR);
214
+			spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires'._LOG_ERREUR);
215 215
 			return false;
216 216
 		}
217 217
 	}
218 218
 
219 219
 	include_spip('inc/filtres');
220 220
 	if (($args = decoder_contexte_ajax($args, $form)) === false) {
221
-		spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires' . _LOG_ERREUR);
221
+		spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires'._LOG_ERREUR);
222 222
 
223 223
 		return false; // continuons le hit comme si de rien etait
224 224
 	} else {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 				// on ajoute un br en display none en tete du retour ajax pour regler un bug dans IE6/7
336 336
 				// sans cela le formulaire n'est pas actif apres le hit ajax
337 337
 				// la classe ajax-form-is-ok sert a s'assurer que le retour ajax s'est bien passe
338
-				$retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>" . $retour;
338
+				$retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>".$retour;
339 339
 				ajax_retour($retour, false);
340 340
 
341 341
 				return true; // on a fini le hit
Please login to merge, or discard this patch.
ecrire/inc/surligne.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 function surligner_mots($page, $surcharge_surligne = '') {
38 38
 	$surlignejs_engines = [
39 39
 		[
40
-			',' . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . ',i',
40
+			','.str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']).',i',
41 41
 			',recherche=([^&]+),i'
42 42
 		], //SPIP
43 43
 		[',^http://(www\.)?google\.,i', ',q=([^&]+),i'], // Google
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
 			//good referrer found or var_recherche is not null
73 73
 			include_spip('inc/filtres');
74 74
 			$script = "
75
-      <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script>
75
+      <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js'))."'></script>
76 76
       <script type='text/javascript'>
77 77
        var highlighter = function() {
78 78
 		  jQuery(this).SearchHighlight({
79
-            tag_name:'" . (html5_permis() ? 'mark' : 'span') . "',
79
+            tag_name:'" . (html5_permis() ? 'mark' : 'span')."',
80 80
             style_name:'spip_surligne',
81 81
             exact:'whole',
82 82
             style_name_suffix:false,
83
-            engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i],
83
+            engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site'])."/i,/recherche=([^&]+)/i],
84 84
             highlight:'.surlignable',
85 85
             nohighlight:'.pas_surlignable'" .
86 86
 				($surcharge_surligne ? ",
87
-            keys:'$surcharge_surligne'" : '') . ',
87
+            keys:'$surcharge_surligne'" : '').',
88 88
             min_length: 3
89 89
           });
90 90
 	  }
Please login to merge, or discard this patch.
ecrire/base/trouver_table.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	// de connexion, et tout risque d'ambiguite
91 91
 	if (!isset($nom_cache_desc_sql[$serveur][$objets_sql])) {
92 92
 		$nom_cache_desc_sql[$serveur][$objets_sql] =
93
-			_DIR_CACHE . 'sql_desc_'
93
+			_DIR_CACHE.'sql_desc_'
94 94
 			. ($serveur ? "{$serveur}_" : '')
95
-			. substr(md5($connexion['db'] . ':' . $connexion['prefixe'] . ":$objets_sql"), 0, 8)
95
+			. substr(md5($connexion['db'].':'.$connexion['prefixe'].":$objets_sql"), 0, 8)
96 96
 			. '.txt';
97 97
 		// nouveau nom de cache = nouvelle version en memoire
98 98
 		unset($connexion['tables']);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	if ($connexion['spip_connect_version']) {
121 121
 		if ($table_spip and isset($GLOBALS['table_des_tables'][$nom])) {
122 122
 			$nom = $GLOBALS['table_des_tables'][$nom];
123
-			$nom_sql = 'spip_' . $nom;
123
+			$nom_sql = 'spip_'.$nom;
124 124
 		}
125 125
 	}
126 126
 
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
 		// meme si pas d'abreviation declaree, trouver la table spip_$nom
148 148
 		// si c'est une table principale,
149 149
 		// puisqu'on le fait aussi pour les tables auxiliaires
150
-		elseif ($nom_sql == $nom and isset($GLOBALS['tables_principales']['spip_' . $nom])) {
151
-			$nom_sql = 'spip_' . $nom;
150
+		elseif ($nom_sql == $nom and isset($GLOBALS['tables_principales']['spip_'.$nom])) {
151
+			$nom_sql = 'spip_'.$nom;
152 152
 			$fdesc = &$GLOBALS['tables_principales'][$nom_sql];
153 153
 		} elseif (
154 154
 			isset($GLOBALS['tables_auxiliaires'][$n = $nom])
155
-			or isset($GLOBALS['tables_auxiliaires'][$n = 'spip_' . $nom])
155
+			or isset($GLOBALS['tables_auxiliaires'][$n = 'spip_'.$nom])
156 156
 		) {
157 157
 			$nom_sql = $n;
158 158
 			$fdesc = &$GLOBALS['tables_auxiliaires'][$n];
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		) {
169 169
 			if (!$fdesc) {
170 170
 				$log_level = $options['log_missing'] ? _LOG_INFO_IMPORTANTE : _LOG_DEBUG;
171
-				spip_log("trouver_table: table inconnue '$serveur' '$nom'", 'base' . $log_level);
171
+				spip_log("trouver_table: table inconnue '$serveur' '$nom'", 'base'.$log_level);
172 172
 
173 173
 				return null;
174 174
 			}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			$desc['exist'] = true;
181 181
 			// gerer le cas des cles vides (echec de l'analyse sur une vue par exemple)
182 182
 			// pour recuperer la declaration de lister_tables_objets_sql() si il y en a une
183
-			if (! $desc['key']) {
183
+			if (!$desc['key']) {
184 184
 				spip_log("trouver_table: table sans cle '$serveur' '$nom'", 'base');
185 185
 				unset($desc['key']);
186 186
 			}
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		if (!isset($desc['key']) && !empty($fdesc['key'])) {
198 198
 			$desc['key'] = $fdesc['key'];
199 199
 		}
200
-		if (! isset($desc['key'])) {
200
+		if (!isset($desc['key'])) {
201 201
 			$desc['key'] = [];
202 202
 		}
203 203
 
Please login to merge, or discard this patch.
ecrire/action/editer_article.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	);
107 107
 
108 108
 	// Si l'article est publie, invalider les caches et demander sa reindexation
109
-	$t = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id_article));
109
+	$t = sql_getfetsel('statut', 'spip_articles', 'id_article='.intval($id_article));
110 110
 	$invalideur = $indexation = false;
111 111
 	if ($t == 'publie') {
112 112
 		$invalideur = "id='article/$id_article'";
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			$id_article,
120 120
 			[
121 121
 			'data' => $set,
122
-			'nonvide' => ['titre' => _T('info_nouvel_article') . ' ' . _T('info_numero_abbreviation') . $id_article],
122
+			'nonvide' => ['titre' => _T('info_nouvel_article').' '._T('info_numero_abbreviation').$id_article],
123 123
 			'invalideur' => $invalideur,
124 124
 			'indexation' => $indexation,
125 125
 			'date_modif' => 'date_modif' // champ a mettre a date('Y-m-d H:i:s') s'il y a modif
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 		} elseif (autoriser('modifier', 'article', $id_article) and $s != 'publie') {
310 310
 			$statut = $champs['statut'] = $s;
311 311
 		} else {
312
-			spip_log("editer_article $id_article refus " . join(' ', $c));
312
+			spip_log("editer_article $id_article refus ".join(' ', $c));
313 313
 		}
314 314
 
315 315
 		// En cas de publication, fixer la date a "maintenant"
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 		isset($c['id_parent'])
335 335
 		and $id_parent = $c['id_parent']
336 336
 		and $id_parent != $id_rubrique
337
-		and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . intval($id_parent)))
337
+		and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique='.intval($id_parent)))
338 338
 	) {
339 339
 		$champs['id_rubrique'] = $id_parent;
340 340
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	// Si on deplace l'article
436 436
 	//  changer aussi son secteur et sa langue (si heritee)
437 437
 	if (isset($champs['id_rubrique'])) {
438
-		$row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique']));
438
+		$row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique='.sql_quote($champs['id_rubrique']));
439 439
 
440 440
 		$langue = $row_rub['lang'];
441 441
 		$champs['id_secteur'] = $row_rub['id_secteur'];
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 			sql_fetsel(
444 444
 				'1',
445 445
 				'spip_articles',
446
-				'id_article=' . intval($id_article) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue)
446
+				'id_article='.intval($id_article)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue)
447 447
 			)
448 448
 		) {
449 449
 			$champs['lang'] = $langue;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 		return;
455 455
 	}
456 456
 
457
-	sql_updateq('spip_articles', $champs, 'id_article=' . intval($id_article));
457
+	sql_updateq('spip_articles', $champs, 'id_article='.intval($id_article));
458 458
 
459 459
 	// Changer le statut des rubriques concernees
460 460
 
@@ -475,6 +475,6 @@  discard block
 block discarded – undo
475 475
 		foreach ($plus as $n => $t) {
476 476
 			$plus[$n] = preg_replace(",<!--SPIP-->[\n\r]*,", '', $t);
477 477
 		}
478
-		set_request('texte', join('', $plus) . _request('texte'));
478
+		set_request('texte', join('', $plus)._request('texte'));
479 479
 	}
480 480
 }
Please login to merge, or discard this patch.
ecrire/auth/ldap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass];
69 69
 
70 70
 	// Si l'utilisateur figure deja dans la base, y recuperer les infos
71
-	$r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur);
71
+	$r = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login)." AND source='ldap'", '', '', '', '', $serveur);
72 72
 
73 73
 	if ($r) {
74 74
 		return array_merge($r, $credentials_ldap);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	if ($r) {
93 93
 		return array_merge(
94 94
 			$credentials_ldap,
95
-			sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($r), '', '', '', '', $serveur)
95
+			sql_fetsel('*', 'spip_auteurs', 'id_auteur='.intval($r), '', '', '', '', $serveur)
96 96
 		);
97 97
 	}
98 98
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	$connexion = spip_connect($serveur);
122 122
 	if (!is_array($connexion['ldap'])) {
123 123
 		if ($connexion['authentification']['ldap']) {
124
-			$f = _DIR_CONNECT . $connexion['authentification']['ldap'];
124
+			$f = _DIR_CONNECT.$connexion['authentification']['ldap'];
125 125
 			unset($GLOBALS['ldap_link']);
126 126
 			if (is_readable($f)) {
127 127
 				include_once($f);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	if (!ldap_bind($link, $dn, session_get('ldap_password'))) {
335 335
 		return false;
336 336
 	}
337
-	$encoded_pass = '{MD5}' . base64_encode(pack('H*', md5($new_pass)));
337
+	$encoded_pass = '{MD5}'.base64_encode(pack('H*', md5($new_pass)));
338 338
 	$success = ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]);
339 339
 
340 340
 	return $success;
Please login to merge, or discard this patch.