Completed
Push — master ( c2b92a...d64163 )
by cam
04:27
created
ecrire/genie/mise_a_jour.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 function genie_mise_a_jour_dist($t) {
30 30
 	include_spip('inc/meta');
31 31
 	$maj = info_maj('spip', 'SPIP', $GLOBALS['spip_version_branche']);
32
-	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : "", 'non');
32
+	ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : "", 'non');
33 33
 
34 34
 	mise_a_jour_ecran_securite();
35 35
 
36
-	spip_log("Verification version SPIP : " . ($maj ? $maj : "version a jour"), "verifie_maj");
36
+	spip_log("Verification version SPIP : ".($maj ? $maj : "version a jour"), "verifie_maj");
37 37
 
38 38
 	return 1;
39 39
 }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 	// si l'ecran n'est pas deja present ou pas updatable, sortir
59 59
 	if (!_URL_ECRAN_SECURITE
60
-		or !file_exists($filename = _DIR_ETC . "ecran_securite.php")
60
+		or !file_exists($filename = _DIR_ETC."ecran_securite.php")
61 61
 		or !is_writable($filename)
62 62
 		or !$last_modified = filemtime($filename)
63 63
 		or !$md5 = md5_file($filename)
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	}
67 67
 
68 68
 	include_spip('inc/distant');
69
-	$tmp_file = _DIR_TMP . "ecran_securite.php";
69
+	$tmp_file = _DIR_TMP."ecran_securite.php";
70 70
 	$url = parametre_url(_URL_ECRAN_SECURITE, "md5", $md5);
71 71
 	$url = parametre_url($url, "vspip", $GLOBALS['spip_version_branche']);
72 72
 	$res = recuperer_url($url, array(
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			include_once $tmp_file;
86 86
 			// ok, on le copie a la place de l'ecran existant
87 87
 			// en backupant l'ecran avant, au cas ou
88
-			@copy($filename, $filename . "-bck-" . date('Y-m-d-His', $last_modified));
88
+			@copy($filename, $filename."-bck-".date('Y-m-d-His', $last_modified));
89 89
 			@rename($tmp_file, $filename);
90 90
 		} else {
91 91
 			@unlink($tmp_file);
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 
113 113
 	list($maj, $min, $rev) = preg_split('/\D+/', $version);
114 114
 
115
-	$nom = _DIR_CACHE_XML . _VERSIONS_LISTE;
115
+	$nom = _DIR_CACHE_XML._VERSIONS_LISTE;
116 116
 	$page = !file_exists($nom) ? '' : file_get_contents($nom);
117 117
 	$page = info_maj_cache($nom, $dir, $page);
118 118
 
119 119
 	// reperer toutes les versions de numero majeur superieur ou egal
120 120
 	// (a revoir quand on arrivera a SPIP V10 ...)
121 121
 	$p = substr("0123456789", intval($maj));
122
-	$p = ',/' . $file . '\D+([' . $p . ']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i';
122
+	$p = ',/'.$file.'\D+(['.$p.']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i';
123 123
 	preg_match_all($p, $page, $m, PREG_SET_ORDER);
124 124
 	$page = $page_majeure = '';
125 125
 
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 
129 129
 	foreach ($m as $v) {
130 130
 		$v = array_pad($v, 5, 0);
131
-		list(, $maj2, $min2, , $rev2) = $v;
132
-		$branche_maj = $maj2 . '.' . $min2;
133
-		$version_maj = $maj2 . '.' . $min2 . '.' . $rev2;
131
+		list(, $maj2, $min2,, $rev2) = $v;
132
+		$branche_maj = $maj2.'.'.$min2;
133
+		$version_maj = $maj2.'.'.$min2.'.'.$rev2;
134 134
 		// d'abord les mises à jour de la même branche
135 135
 		if ((spip_version_compare($version, $version_maj, '<'))
136 136
 			and (spip_version_compare($page, $version_maj, '<'))
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
 		return "";
151 151
 	}
152 152
 
153
-	$message = $page ? _T('nouvelle_version_spip', array('version' => $page)) . ($page_majeure ? ' | ' : '') : '';
153
+	$message = $page ? _T('nouvelle_version_spip', array('version' => $page)).($page_majeure ? ' | ' : '') : '';
154 154
 	$message .= $page_majeure ? _T('nouvelle_version_spip_majeure', array('version' => $page_majeure)) : '';
155 155
 
156
-	return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>" . $message . '</a>';
156
+	return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>".$message.'</a>';
157 157
 }
158 158
 
159 159
 /**
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 function info_maj_cache($nom, $dir, $page = '') {
177 177
 	include_spip('inc/acces');
178 178
 	$alea_ephemere = charger_aleas();
179
-	$re = '<archives id="a' . $alea_ephemere . '">';
179
+	$re = '<archives id="a'.$alea_ephemere.'">';
180 180
 	if (preg_match("/$re/", $page)) {
181 181
 		return $page;
182 182
 	}
183 183
 
184
-	$url = _VERSIONS_SERVEUR . $dir . '/' . _VERSIONS_LISTE;
184
+	$url = _VERSIONS_SERVEUR.$dir.'/'._VERSIONS_LISTE;
185 185
 	$a = file_exists($nom) ? filemtime($nom) : '';
186 186
 	include_spip('inc/distant');
187 187
 	$res = recuperer_url_cache($url, array('if_modified_since' => $a));
Please login to merge, or discard this patch.
ecrire/genie/mail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 		$headers = "";
49 49
 		if (isset($page['entetes']) and count($page['entetes'])) {
50 50
 			foreach ($page['entetes'] as $k => $v) {
51
-				$headers .= (strlen($v) ? "$k: $v" : $k) . "\n";
51
+				$headers .= (strlen($v) ? "$k: $v" : $k)."\n";
52 52
 			}
53 53
 		}
54 54
 
Please login to merge, or discard this patch.
ecrire/typographie/fr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
 	$cherche2 = array(
72 72
 		'/([^-\n]|^)--([^-]|$)/S',
73
-		',(' . _PROTOCOLES_STD . ')~((://[^"\'\s\[\]\}\)<>]+)~([?]))?,S',
73
+		',('._PROTOCOLES_STD.')~((://[^"\'\s\[\]\}\)<>]+)~([?]))?,S',
74 74
 		'/~/'
75 75
 	);
76 76
 	$remplace2 = array(
Please login to merge, or discard this patch.
ecrire/balise/url_logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,5 +73,5 @@
 block discarded – undo
73 73
 		return '';
74 74
 	}
75 75
 
76
-	return generer_url_action('logout', "logout=public&url=" . rawurlencode($cible ? $cible : self('&')));
76
+	return generer_url_action('logout', "logout=public&url=".rawurlencode($cible ? $cible : self('&')));
77 77
 }
Please login to merge, or discard this patch.
ecrire/balise/info_.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		return $p;
52 52
 	} else {
53 53
 		$info_sql = strtolower(substr($info, 5));
54
-		$code = "generer_info_entite($id_objet, $type_objet, '$info_sql'" . ($p->etoile ? "," . _q($p->etoile) : "") . ")";
54
+		$code = "generer_info_entite($id_objet, $type_objet, '$info_sql'".($p->etoile ? ","._q($p->etoile) : "").")";
55 55
 		$p->code = champ_sql($info, $p, $code);
56 56
 		$p->interdire_scripts = true;
57 57
 
Please login to merge, or discard this patch.
ecrire/balise/menu_lang_ecrire.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	include_spip('inc/lang');
100 100
 
101 101
 	if ($GLOBALS['spip_lang'] <> $default) {
102
-		$opt = lang_select($default);  # et remplace
102
+		$opt = lang_select($default); # et remplace
103 103
 		if ($GLOBALS['spip_lang'] <> $default) {
104
-			$default = '';  # annule tout choix par defaut
104
+			$default = ''; # annule tout choix par defaut
105 105
 			if ($opt) {
106 106
 				lang_select();
107 107
 			}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 	# lien a partir de /
112 112
 	$cible = parametre_url(self(), 'lang', '', '&');
113
-	$post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), '&');
113
+	$post = generer_url_action('converser', 'redirect='.rawurlencode($cible), '&');
114 114
 
115 115
 	return array(
116 116
 		'formulaires/menu_lang',
Please login to merge, or discard this patch.
ecrire/balise/formulaire_ecrire_auteur.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 			"A.email != '' AND L.id_objet=$id");
85 85
 		foreach ($s as $row) {
86 86
 			if (email_valide($row['email'])) {
87
-				$r .= ', ' . $row['email'];
87
+				$r .= ', '.$row['email'];
88 88
 			}
89 89
 		}
90 90
 		$args[2] = substr($r, 2);
Please login to merge, or discard this patch.
ecrire/auth/ldap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$credentials_ldap = array('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);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	if ($r) {
92 92
 		return array_merge(
93 93
 			$credentials_ldap,
94
-			sql_fetsel("*", "spip_auteurs", "id_auteur=" . intval($r), '', '', '', '', $serveur)
94
+			sql_fetsel("*", "spip_auteurs", "id_auteur=".intval($r), '', '', '', '', $serveur)
95 95
 		);
96 96
 	}
97 97
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	$connexion = spip_connect($serveur);
121 121
 	if (!is_array($connexion['ldap'])) {
122 122
 		if ($connexion['authentification']['ldap']) {
123
-			$f = _DIR_CONNECT . $connexion['authentification']['ldap'];
123
+			$f = _DIR_CONNECT.$connexion['authentification']['ldap'];
124 124
 			unset($GLOBALS['ldap_link']);
125 125
 			if (is_readable($f)) {
126 126
 				include_once($f);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
 	$ldap_link = isset($ldap['link']) ? $ldap['link'] : null;
170 170
 	$ldap_base = isset($ldap['base']) ? $ldap['base'] : null;
171
-	$desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'] ;
171
+	$desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'];
172 172
 
173 173
 	$logins = is_array($desc['login']) ? $desc['login'] : array($desc['login']);
174 174
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	if (!ldap_bind($link, $dn, session_get('ldap_password'))) {
334 334
 		return false;
335 335
 	}
336
-	$encoded_pass = "{MD5}" . base64_encode(pack("H*", md5($new_pass)));
336
+	$encoded_pass = "{MD5}".base64_encode(pack("H*", md5($new_pass)));
337 337
 	$success = ldap_mod_replace($link, $dn, array('userPassword' => $encoded_pass));
338 338
 
339 339
 	return $success;
Please login to merge, or discard this patch.
ecrire/plugins/afficher_nom_plugin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 	// numerotons les occurences d'un meme prefix
40 40
 	$versions[$info['prefix']] = isset($versions[$info['prefix']]) ? $versions[$info['prefix']] + 1 : '';
41
-	$id = $info['prefix'] . $versions[$info['prefix']];
41
+	$id = $info['prefix'].$versions[$info['prefix']];
42 42
 
43 43
 	$class = $class_li;
44 44
 	$class .= $actif ? " actif" : "";
@@ -55,15 +55,15 @@  discard block
 block discarded – undo
55 55
 	$prefix = $info['prefix'];
56 56
 	$dir = "$dir_plugins$plug_file/lang/$prefix";
57 57
 	$desc = plugin_propre($info['description'], $dir);
58
-	$url_stat = parametre_url($url_page, "plugin", $dir_plugins . $plug_file);
58
+	$url_stat = parametre_url($url_page, "plugin", $dir_plugins.$plug_file);
59 59
 
60
-	$s .= "<strong class='nom'>" . typo($info['nom']) . "</strong>";
61
-	$s .= " <span class='version'>" . $info['version'] . "</span>";
62
-	$s .= " <span class='etat'> - " . plugin_etat_en_clair($info['etat']) . "</span>";
60
+	$s .= "<strong class='nom'>".typo($info['nom'])."</strong>";
61
+	$s .= " <span class='version'>".$info['version']."</span>";
62
+	$s .= " <span class='etat'> - ".plugin_etat_en_clair($info['etat'])."</span>";
63 63
 	$s .= "</div>";
64 64
 
65 65
 	if ($erreur) {
66
-		$s .= "<div class='erreur'>" . join('<br >', $info['erreur']) . "</div>";
66
+		$s .= "<div class='erreur'>".join('<br >', $info['erreur'])."</div>";
67 67
 	}
68 68
 
69 69
 	$s .= "</li>";
Please login to merge, or discard this patch.