Completed
Pull Request — master (#36)
by
unknown
06:08
created
ecrire/balise/url_.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	if ($s = trouver_nom_serveur_distant($p)) {
77 77
 
78 78
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
79
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
79
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
80 80
 			return $f($type, $_id, $s);
81 81
 		}
82 82
 		if (!$GLOBALS['connexions'][strtolower($s)]['spip_connect_version']) {
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 		# exception des urls de documents sur un serveur distant...
87 87
 		if ($type == 'document') {
88 88
 			return
89
-				"quete_meta('adresse_site', $s) . '/' .\n\t" .
90
-				"quete_meta('dir_img', $s) . \n\t" .
89
+				"quete_meta('adresse_site', $s) . '/' .\n\t".
90
+				"quete_meta('dir_img', $s) . \n\t".
91 91
 				"quete_fichier($_id,$s)";
92 92
 		}
93 93
 		$s = ", '', '', $s, quete_meta('type_urls', $s)";
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
  */
232 232
 function balise_URL_SITE_SPIP_dist($p) {
233 233
 	$p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')";
234
-	$p->code = "spip_htmlspecialchars(" . $p->code . ")";
234
+	$p->code = "spip_htmlspecialchars(".$p->code.")";
235 235
 	$p->interdire_scripts = false;
236 236
 
237 237
 	return $p;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 	if ($s = trouver_nom_serveur_distant($p)) {
273 273
 		// si une fonction de generation des url a ete definie pour ce connect l'utiliser
274 274
 		// elle devra aussi traiter le cas derogatoire type=page
275
-		if (function_exists($f = 'generer_generer_url_' . $s)) {
275
+		if (function_exists($f = 'generer_generer_url_'.$s)) {
276 276
 			if ($args and $args !== "''") {
277 277
 				$code .= ", $args";
278 278
 			}
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
 			return $p;
282 282
 		}
283
-		$s = 'connect=' . addslashes($s);
283
+		$s = 'connect='.addslashes($s);
284 284
 		$args = (($args and $args !== "''") ? "$args . '&$s'" : "'$s'");
285 285
 	}
286 286
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		$code = "generer_url_public($code, $args$noentities)";
296 296
 	}
297 297
 	$p->code = $code;
298
-	spip_log("Calcul url page : connect vaut $s ca donne :" . $p->code . " args $args", _LOG_INFO);
298
+	spip_log("Calcul url page : connect vaut $s ca donne :".$p->code." args $args", _LOG_INFO);
299 299
 
300 300
 	#$p->interdire_scripts = true;
301 301
 	return $p;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 			$fonc .= ",$args$noentities";
340 340
 		}
341 341
 	}
342
-	$p->code = 'generer_url_ecrire(' . $fonc . ')';
342
+	$p->code = 'generer_url_ecrire('.$fonc.')';
343 343
 	$p->interdire_scripts = false;
344 344
 
345 345
 	return $p;
@@ -373,17 +373,17 @@  discard block
 block discarded – undo
373 373
 	$p->code = interprete_argument_balise(1, $p);
374 374
 	$args = interprete_argument_balise(2, $p);
375 375
 	if ($args != "''" && $args !== null) {
376
-		$p->code .= "," . $args;
376
+		$p->code .= ",".$args;
377 377
 	}
378 378
 	$redirect = interprete_argument_balise(3, $p);
379 379
 	if ($redirect != "''" && $redirect !== null) {
380 380
 		if ($args == "''" || $args === null) {
381 381
 			$p->code .= ",''";
382 382
 		}
383
-		$p->code .= "," . $redirect;
383
+		$p->code .= ",".$redirect;
384 384
 	}
385 385
 
386
-	$p->code = "generer_action_auteur(" . $p->code . ")";
386
+	$p->code = "generer_action_auteur(".$p->code.")";
387 387
 	$p->interdire_scripts = false;
388 388
 
389 389
 	return $p;
Please login to merge, or discard this patch.
ecrire/balise/formulaire_admin.php 1 patch
Spacing   +9 added lines, -10 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
 			}
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
 			and !is_array($id)
179 179
 			and $id = intval($id)
180 180
 		) {
181
-			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . intval($id));
181
+			$id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".intval($id));
182 182
 			if ($id) {
183 183
 				$env[$_id_type] = $id;
184 184
 				$env['objet'] = $type;
185 185
 				$env['id_objet'] = $id;
186
-				$env['voir_' . $obj] =
186
+				$env['voir_'.$obj] =
187 187
 					str_replace('&', '&', generer_url_entite($id, $obj, '', '', false));
188 188
 				if ($desc = $trouver_table(table_objet_sql($type))
189 189
 					and isset($desc['field']['id_rubrique'])
@@ -237,10 +237,10 @@  discard block
 block discarded – undo
237 237
 	$notpub = sql_in("statut", array('prop', 'prive'));
238 238
 
239 239
 	if ($type == 'article' and $GLOBALS['meta']['post_dates'] != 'oui') {
240
-		$notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ")";
240
+		$notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).")";
241 241
 	}
242 242
 
243
-	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . "=" . $id . " AND ($notpub)");
243
+	return sql_fetsel('1', table_objet_sql($type), id_table_objet($type)."=".$id." AND ($notpub)");
244 244
 }
245 245
 
246 246
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
  **/
253 253
 function admin_lang() {
254 254
 	$alang = sql_getfetsel('lang', 'spip_auteurs',
255
-		"login=" . sql_quote(preg_replace(',^@,', '', @$_COOKIE['spip_admin'])));
255
+		"login=".sql_quote(preg_replace(',^@,', '', @$_COOKIE['spip_admin'])));
256 256
 	if (!$alang) {
257 257
 		return '';
258 258
 	}
@@ -275,9 +275,8 @@  discard block
 block discarded – undo
275 275
 
276 276
 	return ((!isset($GLOBALS['xhtml']) or $GLOBALS['xhtml'] !== 'true') ?
277 277
 		(parametre_url(self(), 'var_mode', 'debug', '&')
278
-			. '&var_mode_affiche=validation') :
279
-		('http://validator.w3.org/check?uri='
280
-			. rawurlencode("http://" . $_SERVER['HTTP_HOST'] . nettoyer_uri())));
278
+			. '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri='
279
+			. rawurlencode("http://".$_SERVER['HTTP_HOST'].nettoyer_uri())));
281 280
 }
282 281
 
283 282
 /**
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/auth/sha256.inc.php 1 patch
Spacing   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 				: ((defined('_NANO_SHA2_UPPER')) ? true : false);
99 99
 
100 100
 			// Deteremine if the system is 32 or 64 bit.
101
-			$tmpInt = (int)4294967295;
101
+			$tmpInt = (int) 4294967295;
102 102
 			$this->platform = ($tmpInt > 0) ? 64 : 32;
103 103
 		}
104 104
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 
117 117
 			if ($x < 0) {
118 118
 				$x &= 0x7FFFFFFF;
119
-				$x = (float)$x+$mask;
119
+				$x = (float) $x + $mask;
120 120
 			}
121 121
 
122 122
 			if ($y < 0) {
123 123
 				$y &= 0x7FFFFFFF;
124
-				$y = (float)$y+$mask;
124
+				$y = (float) $y + $mask;
125 125
 			}
126 126
 
127
-			$r = $x+$y;
127
+			$r = $x + $y;
128 128
 
129 129
 			if ($r >= $n) {
130 130
 				while ($r >= $n) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 				}
133 133
 			}
134 134
 
135
-			return (int)$r;
135
+			return (int) $r;
136 136
 		}
137 137
 
138 138
 		/**
@@ -145,23 +145,23 @@  discard block
 block discarded – undo
145 145
 		function SHR($x, $n)        // x >> n
146 146
 		{
147 147
 			if ($n >= 32) {      // impose some limits to keep it 32-bit
148
-				return (int)0;
148
+				return (int) 0;
149 149
 			}
150 150
 
151 151
 			if ($n <= 0) {
152
-				return (int)$x;
152
+				return (int) $x;
153 153
 			}
154 154
 
155 155
 			$mask = 0x40000000;
156 156
 
157 157
 			if ($x < 0) {
158 158
 				$x &= 0x7FFFFFFF;
159
-				$mask = $mask >> ($n-1);
159
+				$mask = $mask >> ($n - 1);
160 160
 
161 161
 				return ($x >> $n) | $mask;
162 162
 			}
163 163
 
164
-			return (int)$x >> (int)$n;
164
+			return (int) $x >> (int) $n;
165 165
 		}
166 166
 
167 167
 		/** ROTR
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		 * @param int $n
171 171
 		 * @return int
172 172
 		 */
173
-		function ROTR($x, $n) { return (int)(($this->SHR($x, $n) | ($x << (32-$n)) & 0xFFFFFFFF)); }
173
+		function ROTR($x, $n) { return (int) (($this->SHR($x, $n) | ($x << (32 - $n)) & 0xFFFFFFFF)); }
174 174
 
175 175
 		/** Ch
176 176
 		 *
@@ -195,28 +195,28 @@  discard block
 block discarded – undo
195 195
 		 * @param int $x
196 196
 		 * @return int
197 197
 		 */
198
-		function Sigma0($x) { return (int)($this->ROTR($x, 2) ^ $this->ROTR($x, 13) ^ $this->ROTR($x, 22)); }
198
+		function Sigma0($x) { return (int) ($this->ROTR($x, 2) ^ $this->ROTR($x, 13) ^ $this->ROTR($x, 22)); }
199 199
 
200 200
 		/** Sigma1
201 201
 		 *
202 202
 		 * @param int $x
203 203
 		 * @return int
204 204
 		 */
205
-		function Sigma1($x) { return (int)($this->ROTR($x, 6) ^ $this->ROTR($x, 11) ^ $this->ROTR($x, 25)); }
205
+		function Sigma1($x) { return (int) ($this->ROTR($x, 6) ^ $this->ROTR($x, 11) ^ $this->ROTR($x, 25)); }
206 206
 
207 207
 		/** Sigma_0
208 208
 		 *
209 209
 		 * @param int $x
210 210
 		 * @return int
211 211
 		 */
212
-		function sigma_0($x) { return (int)($this->ROTR($x, 7) ^ $this->ROTR($x, 18) ^ $this->SHR($x, 3)); }
212
+		function sigma_0($x) { return (int) ($this->ROTR($x, 7) ^ $this->ROTR($x, 18) ^ $this->SHR($x, 3)); }
213 213
 
214 214
 		/** Sigma_1
215 215
 		 *
216 216
 		 * @param int $x
217 217
 		 * @return int
218 218
 		 */
219
-		function sigma_1($x) { return (int)($this->ROTR($x, 17) ^ $this->ROTR($x, 19) ^ $this->SHR($x, 10)); }
219
+		function sigma_1($x) { return (int) ($this->ROTR($x, 17) ^ $this->ROTR($x, 19) ^ $this->SHR($x, 10)); }
220 220
 
221 221
 		/** String 2 ord UTF8
222 222
 		 *
@@ -271,23 +271,23 @@  discard block
 block discarded – undo
271 271
 
272 272
 					return $h;
273 273
 				} else {
274
-					if ($h <= 0xDF && $index < $len-1) {
274
+					if ($h <= 0xDF && $index < $len - 1) {
275 275
 						$bytes = 2;
276 276
 
277
-						return ($h & 0x1F) << 6 | (ord($c{$index+1}) & 0x3F);
277
+						return ($h & 0x1F) << 6 | (ord($c{$index + 1}) & 0x3F);
278 278
 					} else {
279
-						if ($h <= 0xEF && $index < $len-2) {
279
+						if ($h <= 0xEF && $index < $len - 2) {
280 280
 							$bytes = 3;
281 281
 
282
-							return ($h & 0x0F) << 12 | (ord($c{$index+1}) & 0x3F) << 6
283
-							| (ord($c{$index+2}) & 0x3F);
282
+							return ($h & 0x0F) << 12 | (ord($c{$index + 1}) & 0x3F) << 6
283
+							| (ord($c{$index + 2}) & 0x3F);
284 284
 						} else {
285
-							if ($h <= 0xF4 && $index < $len-3) {
285
+							if ($h <= 0xF4 && $index < $len - 3) {
286 286
 								$bytes = 4;
287 287
 
288
-								return ($h & 0x0F) << 18 | (ord($c{$index+1}) & 0x3F) << 12
289
-								| (ord($c{$index+2}) & 0x3F) << 6
290
-								| (ord($c{$index+3}) & 0x3F);
288
+								return ($h & 0x0F) << 18 | (ord($c{$index + 1}) & 0x3F) << 12
289
+								| (ord($c{$index + 2}) & 0x3F) << 6
290
+								| (ord($c{$index + 3}) & 0x3F);
291 291
 							} else {
292 292
 								// pas utf mais renvoyer quand meme ce qu'on a
293 293
 								$bytes = 1;
@@ -309,19 +309,19 @@  discard block
 block discarded – undo
309 309
 		function string2binint($str, $npad = 512) {
310 310
 			$bin = array();
311 311
 			$ords = $this->string2ordUTF8($str, $this->bytesString);
312
-			$npad = $npad/$this->bytesString;
312
+			$npad = $npad / $this->bytesString;
313 313
 			$length = count($ords);
314 314
 			$ords[] = 0x80; // append the "1" bit followed by 7 0's
315
-			$pad = ceil(($length+1+32/$this->bytesString)/$npad)*$npad-32/$this->bytesString;
315
+			$pad = ceil(($length + 1 + 32 / $this->bytesString) / $npad) * $npad - 32 / $this->bytesString;
316 316
 			$ords = array_pad($ords, $pad, 0);
317
-			$mask = (1 << $this->bytesString)-1;
318
-			for ($i = 0; $i < count($ords)*$this->bytesString; $i += $this->bytesString) {
317
+			$mask = (1 << $this->bytesString) - 1;
318
+			for ($i = 0; $i < count($ords) * $this->bytesString; $i += $this->bytesString) {
319 319
 				if (!isset($bin[$i >> 5])) {
320 320
 					$bin[$i >> 5] = 0;
321 321
 				} // pour eviter des notices.
322
-				$bin[$i >> 5] |= ($ords[$i/$this->bytesString] & $mask) << (24-$i%32);
322
+				$bin[$i >> 5] |= ($ords[$i / $this->bytesString] & $mask) << (24 - $i % 32);
323 323
 			}
324
-			$bin[] = $length*$this->bytesString;
324
+			$bin[] = $length * $this->bytesString;
325 325
 
326 326
 			return $bin;
327 327
 		}
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 		 * @return string Hexadecimal representation of the message digest
358 358
 		 */
359 359
 		function hash($str, $ig_func = true) {
360
-			unset($binStr);     // binary representation of input string
361
-			unset($hexStr);     // 256-bit message digest in readable hex format
360
+			unset($binStr); // binary representation of input string
361
+			unset($hexStr); // 256-bit message digest in readable hex format
362 362
 
363 363
 			// check for php's internal sha256 function, ignore if ig_func==true
364 364
 			if ($ig_func == false) {
@@ -378,70 +378,70 @@  discard block
 block discarded – undo
378 378
 			 *  of the first sixtyfour prime numbers.
379 379
 			 */
380 380
 			$K = array(
381
-				(int)0x428a2f98,
382
-				(int)0x71374491,
383
-				(int)0xb5c0fbcf,
384
-				(int)0xe9b5dba5,
385
-				(int)0x3956c25b,
386
-				(int)0x59f111f1,
387
-				(int)0x923f82a4,
388
-				(int)0xab1c5ed5,
389
-				(int)0xd807aa98,
390
-				(int)0x12835b01,
391
-				(int)0x243185be,
392
-				(int)0x550c7dc3,
393
-				(int)0x72be5d74,
394
-				(int)0x80deb1fe,
395
-				(int)0x9bdc06a7,
396
-				(int)0xc19bf174,
397
-				(int)0xe49b69c1,
398
-				(int)0xefbe4786,
399
-				(int)0x0fc19dc6,
400
-				(int)0x240ca1cc,
401
-				(int)0x2de92c6f,
402
-				(int)0x4a7484aa,
403
-				(int)0x5cb0a9dc,
404
-				(int)0x76f988da,
405
-				(int)0x983e5152,
406
-				(int)0xa831c66d,
407
-				(int)0xb00327c8,
408
-				(int)0xbf597fc7,
409
-				(int)0xc6e00bf3,
410
-				(int)0xd5a79147,
411
-				(int)0x06ca6351,
412
-				(int)0x14292967,
413
-				(int)0x27b70a85,
414
-				(int)0x2e1b2138,
415
-				(int)0x4d2c6dfc,
416
-				(int)0x53380d13,
417
-				(int)0x650a7354,
418
-				(int)0x766a0abb,
419
-				(int)0x81c2c92e,
420
-				(int)0x92722c85,
421
-				(int)0xa2bfe8a1,
422
-				(int)0xa81a664b,
423
-				(int)0xc24b8b70,
424
-				(int)0xc76c51a3,
425
-				(int)0xd192e819,
426
-				(int)0xd6990624,
427
-				(int)0xf40e3585,
428
-				(int)0x106aa070,
429
-				(int)0x19a4c116,
430
-				(int)0x1e376c08,
431
-				(int)0x2748774c,
432
-				(int)0x34b0bcb5,
433
-				(int)0x391c0cb3,
434
-				(int)0x4ed8aa4a,
435
-				(int)0x5b9cca4f,
436
-				(int)0x682e6ff3,
437
-				(int)0x748f82ee,
438
-				(int)0x78a5636f,
439
-				(int)0x84c87814,
440
-				(int)0x8cc70208,
441
-				(int)0x90befffa,
442
-				(int)0xa4506ceb,
443
-				(int)0xbef9a3f7,
444
-				(int)0xc67178f2
381
+				(int) 0x428a2f98,
382
+				(int) 0x71374491,
383
+				(int) 0xb5c0fbcf,
384
+				(int) 0xe9b5dba5,
385
+				(int) 0x3956c25b,
386
+				(int) 0x59f111f1,
387
+				(int) 0x923f82a4,
388
+				(int) 0xab1c5ed5,
389
+				(int) 0xd807aa98,
390
+				(int) 0x12835b01,
391
+				(int) 0x243185be,
392
+				(int) 0x550c7dc3,
393
+				(int) 0x72be5d74,
394
+				(int) 0x80deb1fe,
395
+				(int) 0x9bdc06a7,
396
+				(int) 0xc19bf174,
397
+				(int) 0xe49b69c1,
398
+				(int) 0xefbe4786,
399
+				(int) 0x0fc19dc6,
400
+				(int) 0x240ca1cc,
401
+				(int) 0x2de92c6f,
402
+				(int) 0x4a7484aa,
403
+				(int) 0x5cb0a9dc,
404
+				(int) 0x76f988da,
405
+				(int) 0x983e5152,
406
+				(int) 0xa831c66d,
407
+				(int) 0xb00327c8,
408
+				(int) 0xbf597fc7,
409
+				(int) 0xc6e00bf3,
410
+				(int) 0xd5a79147,
411
+				(int) 0x06ca6351,
412
+				(int) 0x14292967,
413
+				(int) 0x27b70a85,
414
+				(int) 0x2e1b2138,
415
+				(int) 0x4d2c6dfc,
416
+				(int) 0x53380d13,
417
+				(int) 0x650a7354,
418
+				(int) 0x766a0abb,
419
+				(int) 0x81c2c92e,
420
+				(int) 0x92722c85,
421
+				(int) 0xa2bfe8a1,
422
+				(int) 0xa81a664b,
423
+				(int) 0xc24b8b70,
424
+				(int) 0xc76c51a3,
425
+				(int) 0xd192e819,
426
+				(int) 0xd6990624,
427
+				(int) 0xf40e3585,
428
+				(int) 0x106aa070,
429
+				(int) 0x19a4c116,
430
+				(int) 0x1e376c08,
431
+				(int) 0x2748774c,
432
+				(int) 0x34b0bcb5,
433
+				(int) 0x391c0cb3,
434
+				(int) 0x4ed8aa4a,
435
+				(int) 0x5b9cca4f,
436
+				(int) 0x682e6ff3,
437
+				(int) 0x748f82ee,
438
+				(int) 0x78a5636f,
439
+				(int) 0x84c87814,
440
+				(int) 0x8cc70208,
441
+				(int) 0x90befffa,
442
+				(int) 0xa4506ceb,
443
+				(int) 0xbef9a3f7,
444
+				(int) 0xc67178f2
445 445
 			);
446 446
 
447 447
 			// Pre-processing: Padding the string
@@ -451,14 +451,14 @@  discard block
 block discarded – undo
451 451
 			$M = $this->array_split($binStr, 16);
452 452
 
453 453
 			// Set the initial hash values
454
-			$h[0] = (int)0x6a09e667;
455
-			$h[1] = (int)0xbb67ae85;
456
-			$h[2] = (int)0x3c6ef372;
457
-			$h[3] = (int)0xa54ff53a;
458
-			$h[4] = (int)0x510e527f;
459
-			$h[5] = (int)0x9b05688c;
460
-			$h[6] = (int)0x1f83d9ab;
461
-			$h[7] = (int)0x5be0cd19;
454
+			$h[0] = (int) 0x6a09e667;
455
+			$h[1] = (int) 0xbb67ae85;
456
+			$h[2] = (int) 0x3c6ef372;
457
+			$h[3] = (int) 0xa54ff53a;
458
+			$h[4] = (int) 0x510e527f;
459
+			$h[5] = (int) 0x9b05688c;
460
+			$h[6] = (int) 0x1f83d9ab;
461
+			$h[7] = (int) 0x5be0cd19;
462 462
 
463 463
 			// loop through message blocks and compute hash. ( For i=1 to N : )
464 464
 			$N = count($M);
@@ -467,14 +467,14 @@  discard block
 block discarded – undo
467 467
 				$MI = $M[$i];
468 468
 
469 469
 				// Initialize working variables
470
-				$_a = (int)$h[0];
471
-				$_b = (int)$h[1];
472
-				$_c = (int)$h[2];
473
-				$_d = (int)$h[3];
474
-				$_e = (int)$h[4];
475
-				$_f = (int)$h[5];
476
-				$_g = (int)$h[6];
477
-				$_h = (int)$h[7];
470
+				$_a = (int) $h[0];
471
+				$_b = (int) $h[1];
472
+				$_c = (int) $h[2];
473
+				$_d = (int) $h[3];
474
+				$_e = (int) $h[4];
475
+				$_f = (int) $h[5];
476
+				$_g = (int) $h[6];
477
+				$_h = (int) $h[7];
478 478
 				unset($_s0);
479 479
 				unset($_s1);
480 480
 				unset($_T1);
@@ -504,12 +504,12 @@  discard block
 block discarded – undo
504 504
 
505 505
 				for (; $t < 64; $t++) {
506 506
 					// Continue building the message schedule as we loop
507
-					$_s0 = $W[($t+1) & 0x0F];
507
+					$_s0 = $W[($t + 1) & 0x0F];
508 508
 					$_s0 = $this->sigma_0($_s0);
509
-					$_s1 = $W[($t+14) & 0x0F];
509
+					$_s1 = $W[($t + 14) & 0x0F];
510 510
 					$_s1 = $this->sigma_1($_s1);
511 511
 
512
-					$W[$t & 0xF] = $this->addmod2n($this->addmod2n($this->addmod2n($W[$t & 0xF], $_s0), $_s1), $W[($t+9) & 0x0F]);
512
+					$W[$t & 0xF] = $this->addmod2n($this->addmod2n($this->addmod2n($W[$t & 0xF], $_s0), $_s1), $W[($t + 9) & 0x0F]);
513 513
 
514 514
 					// Compute hash
515 515
 					$_T1 = $this->addmod2n($this->addmod2n($this->addmod2n($this->addmod2n($_h, $this->Sigma1($_e)),
Please login to merge, or discard this patch.
ecrire/prive.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 		// On reexecute pour deboucher sur le include public.
27 27
 		// autrement on insiste
28 28
 		if (is_array($var_auth)) {
29
-			$var_auth = '../?' . $_SERVER['QUERY_STRING'];
29
+			$var_auth = '../?'.$_SERVER['QUERY_STRING'];
30 30
 			spip_setcookie('spip_session', $_COOKIE['spip_session'], time() + 3600 * 24 * 14);
31 31
 		}
32 32
 		include_spip('inc/headers');
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.
ecrire/plugins/installer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 	$dir = constant($dir);
67 67
 	foreach ($infos['install'] as $file) {
68
-		$file = $dir . $plug . "/" . trim($file);
68
+		$file = $dir.$plug."/".trim($file);
69 69
 		if (file_exists($file)) {
70 70
 			include_once($file);
71 71
 		}
72 72
 	}
73 73
 	$version = isset($infos['schema']) ? $infos['schema'] : '';
74 74
 	$arg = $infos;
75
-	$f = $infos['prefix'] . "_install";
75
+	$f = $infos['prefix']."_install";
76 76
 	if (!function_exists($f)) {
77 77
 		$f = isset($infos['schema']) ? 'spip_plugin_install' : '';
78 78
 	} else {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		return true;
95 95
 	}
96 96
 	// Si install et que l'on a la meta d'installation, c'est un upgrade
97
-	if ($action == 'install' && !is_null(lire_meta($infos['prefix'] . '_base_version'))) {
97
+	if ($action == 'install' && !is_null(lire_meta($infos['prefix'].'_base_version'))) {
98 98
 		$infos['upgrade'] = true;
99 99
 	}
100 100
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	if (isset($infos['meta']) and (($table = $infos['meta']) !== 'meta')) {
121 121
 		$nom_meta = "base_version";
122 122
 	} else {
123
-		$nom_meta = $prefix . "_base_version";
123
+		$nom_meta = $prefix."_base_version";
124 124
 		$table = 'meta';
125 125
 	}
126 126
 	switch ($action) {
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 				and spip_version_compare($GLOBALS[$table][$nom_meta], $version_cible, '>='));
131 131
 			break;
132 132
 		case 'install':
133
-			if (function_exists($upgrade = $prefix . "_upgrade")) {
133
+			if (function_exists($upgrade = $prefix."_upgrade")) {
134 134
 				$upgrade($nom_meta, $version_cible, $table);
135 135
 			}
136 136
 			break;
137 137
 		case 'uninstall':
138
-			if (function_exists($vider_tables = $prefix . "_vider_tables")) {
138
+			if (function_exists($vider_tables = $prefix."_vider_tables")) {
139 139
 				$vider_tables($nom_meta, $table);
140 140
 			}
141 141
 			break;
Please login to merge, or discard this patch.
ecrire/plugins/infos_plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 	if (isset($arbre['erreur'])) {
123 123
 		$ret['erreur'] = $arbre['erreur'];
124 124
 		if ($plug) {
125
-			spip_log("infos_plugin $plug " . @join(' ', $arbre['erreur']));
125
+			spip_log("infos_plugin $plug ".@join(' ', $arbre['erreur']));
126 126
 		}
127 127
 	}
128 128
 
Please login to merge, or discard this patch.
ecrire/plugins/get_infos.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
 	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);
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
 
92 92
 function plugins_get_infos_un($plug, $reload, $dir, &$cache) {
93
-	if (!is_readable($file = "$dir$plug/" . ($desc = "paquet") . ".xml")) {
94
-		if (!is_readable($file = "$dir$plug/" . ($desc = "plugin") . ".xml")) {
93
+	if (!is_readable($file = "$dir$plug/".($desc = "paquet").".xml")) {
94
+		if (!is_readable($file = "$dir$plug/".($desc = "plugin").".xml")) {
95 95
 			return false;
96 96
 		}
97 97
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		return false;
119 119
 	}
120 120
 
121
-	$f = charger_fonction('infos_' . $desc, 'plugins');
121
+	$f = charger_fonction('infos_'.$desc, 'plugins');
122 122
 	$ret = $f($texte, $plug, $dir);
123 123
 	$ret['filemtime'] = $time;
124 124
 	$ret['md5_file'] = $md5;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	if (isset($ret['prefix']) and $ret['prefix'] == 'spip') {
129 129
 		$ret['procure']['php'] = array('nom' => 'php', 'version' => phpversion());
130 130
 		foreach (get_loaded_extensions() as $ext) {
131
-			$ret['procure']['php:' . $ext] = array('nom' => 'php:' . $ext, 'version' => phpversion($ext));
131
+			$ret['procure']['php:'.$ext] = array('nom' => 'php:'.$ext, 'version' => phpversion($ext));
132 132
 		}
133 133
 	}
134 134
 	$diff = ($ret != $pcache);
Please login to merge, or discard this patch.