Completed
Push — master ( 7208c3...09b169 )
by cam
01:22
created
ecrire/inc/lang_liste.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	'cpf_dom' => "Kreyòl",
52 52
 	'cpf_hat' => "Kreyòl (Peyi Dayiti)",
53 53
 	'cs' => "čeština",
54
-	'cy' => "Cymraeg",  # welsh, gallois
54
+	'cy' => "Cymraeg", # welsh, gallois
55 55
 	'da' => "dansk",
56 56
 	'de' => "Deutsch",
57 57
 	'dz' => "Bhutani",
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	'hi' => "हिंदी",
93 93
 	'hr' => "hrvatski",
94 94
 	'hu' => "magyar",
95
-	'hy' => "Հայերեն",// Arménien
95
+	'hy' => "Հայերեն", // Arménien
96 96
 	'ia' => "Interlingua",
97 97
 	'id' => "Indonesia",
98 98
 	'ie' => "Interlingue",
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	'ka' => "ქართული",
107 107
 	'kk' => "қазақ тілі", // Kazakh
108 108
 	'kl' => "kalaallisut",
109
-	'km' => "ភាសាខ្មែរ",// Khmer
109
+	'km' => "ភាសាខ្មែរ", // Khmer
110 110
 	'kn' => "Kannada",
111 111
 	'ko' => "한국어",
112 112
 	'kok' => "कोंकणी",
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 	'sh_latn' => 'srpskohrvastski',
177 177
 	'sh_cyrl' => 'Српскохрватски',
178 178
 	'si' => "Sinhalese",
179
-	'sk' => "slovenčina",  // (Slovakia)
180
-	'sl' => "slovenščina",  // (Slovenia)
179
+	'sk' => "slovenčina", // (Slovakia)
180
+	'sl' => "slovenščina", // (Slovenia)
181 181
 	'sm' => "Samoan",
182 182
 	'sn' => "Shona",
183 183
 	'so' => "Somali",
Please login to merge, or discard this patch.
ecrire/inc/json.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 		case is_null($var):
32 32
 			return 'null';
33 33
 		case is_string($var):
34
-			return '"' . addcslashes($var, "\"\\\n\r/") . '"';
34
+			return '"'.addcslashes($var, "\"\\\n\r/").'"';
35 35
 		case is_bool($var):
36 36
 			return $var ? 'true' : 'false';
37 37
 		case is_scalar($var):
38
-			return (string)$var;
38
+			return (string) $var;
39 39
 		case is_object($var):// blam
40 40
 			$var = get_object_vars($var);
41 41
 			$asso = true;
@@ -50,19 +50,19 @@  discard block
 block discarded – undo
50 50
 			if ($asso) {
51 51
 				$ret = '{';
52 52
 				foreach ($var as $key => $elt) {
53
-					$ret .= $sep . '"' . $key . '":' . var2js($elt);
53
+					$ret .= $sep.'"'.$key.'":'.var2js($elt);
54 54
 					$sep = ',';
55 55
 				}
56 56
 
57
-				return $ret . '}';
57
+				return $ret.'}';
58 58
 			} else {
59 59
 				$ret = '[';
60 60
 				foreach ($var as $elt) {
61
-					$ret .= $sep . var2js($elt);
61
+					$ret .= $sep.var2js($elt);
62 62
 					$sep = ',';
63 63
 				}
64 64
 
65
-				return $ret . ']';
65
+				return $ret.']';
66 66
 			}
67 67
 	}
68 68
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	// flag indiquant qu'on est en iframe et qu'il faut proteger nos
83 83
 	// donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop
84 84
 	if (defined('FILE_UPLOAD')) {
85
-		return '<textarea>' . spip_htmlspecialchars($var) . '</textarea>';
85
+		return '<textarea>'.spip_htmlspecialchars($var).'</textarea>';
86 86
 	} else {
87 87
 		return $var;
88 88
 	}
Please login to merge, or discard this patch.
ecrire/inc/config.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 			if (strncmp($url, 'configurer_', 11) == 0) {
341 341
 				$deja[$url] = $b;
342 342
 			} elseif ($b['url'] == 'configurer' and preg_match(',cfg=([a-z0-9_]+),i', $b['args'], $match)) {
343
-				$deja["configurer_" . $match[1]] = $b;
343
+				$deja["configurer_".$match[1]] = $b;
344 344
 			}
345 345
 		}
346 346
 
@@ -354,10 +354,10 @@  discard block
 block discarded – undo
354 354
 
355 355
 	// trouver toutes les pages configurer_xxx de l'espace prive
356 356
 	// et construire un tableau des entrees qui ne sont pas dans $deja
357
-	$pages = find_all_in_path("prive/squelettes/contenu/", "configurer_.*[.]" . _EXTENSION_SQUELETTES . '$');
357
+	$pages = find_all_in_path("prive/squelettes/contenu/", "configurer_.*[.]"._EXTENSION_SQUELETTES.'$');
358 358
 
359 359
 	foreach ($pages as $page) {
360
-		$configurer = basename($page, "." . _EXTENSION_SQUELETTES);
360
+		$configurer = basename($page, "."._EXTENSION_SQUELETTES);
361 361
 		if (!isset($exclure[$configurer])) {
362 362
 			$liste[$configurer] = array(
363 363
 				'parent' => 'bando_configuration',
@@ -377,9 +377,9 @@  discard block
 block discarded – undo
377 377
 
378 378
 	// trouver tous les formulaires/configurer_
379 379
 	// et construire un tableau des entrees
380
-	$pages = find_all_in_path("formulaires/", "configurer_.*[.]" . _EXTENSION_SQUELETTES . '$');
380
+	$pages = find_all_in_path("formulaires/", "configurer_.*[.]"._EXTENSION_SQUELETTES.'$');
381 381
 	foreach ($pages as $page) {
382
-		$configurer = basename($page, "." . _EXTENSION_SQUELETTES);
382
+		$configurer = basename($page, "."._EXTENSION_SQUELETTES);
383 383
 		if (!isset($forms[$configurer])
384 384
 			and !isset($liste[$configurer])
385 385
 			and !isset($exclure[$configurer])
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 			$liste[$configurer] = array(
388 388
 				'parent' => 'bando_configuration',
389 389
 				'url' => 'configurer',
390
-				'args' => 'cfg=' . substr($configurer, 11),
390
+				'args' => 'cfg='.substr($configurer, 11),
391 391
 				'titre' => _T("configurer:{$configurer}_titre"),
392 392
 				'icone' => find_in_theme($i = "images/{$configurer}-16.png") ? $i : $icone_defaut,
393 393
 			);
@@ -419,8 +419,8 @@  discard block
 block discarded – undo
419 419
 
420 420
 	// evaluer le fond en lui passant un exec coherent pour que les pipelines le reconnaissent
421 421
 	// et reperer les formulaires CVT configurer_xx insereres par les plugins via pipeline
422
-	$config = basename(substr($file, 0, -strlen("." . _EXTENSION_SQUELETTES)));
423
-	spip_log('Calcul de ' . "prive/squelettes/contenu/$config");
422
+	$config = basename(substr($file, 0, -strlen("."._EXTENSION_SQUELETTES)));
423
+	spip_log('Calcul de '."prive/squelettes/contenu/$config");
424 424
 	$fond = recuperer_fond("prive/squelettes/contenu/$config", array("exec" => $config));
425 425
 
426 426
 	// passer dans le pipeline affiche_milieu pour que les plugins puissent ajouter leur formulaires...
Please login to merge, or discard this patch.
ecrire/inc/lien_court.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
 	$coupe_url = defined('_MAX_COUPE_URL') ? _MAX_COUPE_URL : 35;
27 27
 
28 28
 	if (strlen($url) > $long_url) {
29
-		$url = substr($url, 0, $coupe_url) . '...';
29
+		$url = substr($url, 0, $coupe_url).'...';
30 30
 	}
31 31
 
32 32
 	return $url;
Please login to merge, or discard this patch.
ecrire/inc/log.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
 	// si spip_log() dans mes_options, ou repertoire log/ non present, poser dans tmp/
54 54
 	if (!defined('_DIR_LOG') or !$test_repertoire[$d]) {
55
-		$logfile = _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES . $logname . '.log';
55
+		$logfile = _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES.$logname.'.log';
56 56
 	}
57 57
 
58 58
 	$rotate = 0;
59
-	$pid = '(pid ' . @getmypid() . ')';
59
+	$pid = '(pid '.@getmypid().')';
60 60
 
61 61
 	// accepter spip_log( Array )
62 62
 	if (!is_string($message)) {
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 			$fi = substr($fi, strlen(_ROOT_RACINE));
72 72
 		}
73 73
 		$fu = isset($debug[2]['function']) ? $debug[2]['function'] : '';
74
-		$debugverb = "$fi:L$l:$fu" . '():';
74
+		$debugverb = "$fi:L$l:$fu".'():';
75 75
 	}
76 76
 
77
-	$m = date('Y-m-d H:i:s') . ' ' . (isset($GLOBALS['ip']) ? $GLOBALS['ip'] : '') . ' ' . $pid . ' '
77
+	$m = date('Y-m-d H:i:s').' '.(isset($GLOBALS['ip']) ? $GLOBALS['ip'] : '').' '.$pid.' '
78 78
 		//distinguer les logs prives et publics dans les grep
79 79
 		. $debugverb
80 80
 		. (test_espace_prive() ? ':Pri:' : ':Pub:')
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 	if ($rotate-- > 0
98 98
 		and function_exists('spip_unlink')
99 99
 	) {
100
-		spip_unlink($logfile . '.' . $rotate);
100
+		spip_unlink($logfile.'.'.$rotate);
101 101
 		while ($rotate--) {
102
-			@rename($logfile . ($rotate ? '.' . $rotate : ''), $logfile . '.' . ($rotate + 1));
102
+			@rename($logfile.($rotate ? '.'.$rotate : ''), $logfile.'.'.($rotate + 1));
103 103
 		}
104 104
 	}
105 105
 
Please login to merge, or discard this patch.
ecrire/inc/nfslock.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	if (!$max_age) {
107 107
 		$max_age = _DEFAULT_LOCKTIME;
108 108
 	}
109
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
109
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
110 110
 
111 111
 
112 112
 	/*
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 
117 117
 	$id = creer_uniqid();
118
-	$tpath = _DIR_TMP . "slock.$id";
118
+	$tpath = _DIR_TMP."slock.$id";
119 119
 	$tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ...
120 120
 	if (!$tmpfd) {  /* open failed */
121 121
 		@fclose($tmpfd);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 *    thinks the current time is (our_tmp.st_ctime)..
242 242
 	 */
243 243
 
244
-	$tpath = _DIR_TMP . "stime.$id";
244
+	$tpath = _DIR_TMP."stime.$id";
245 245
 	$tmpfd = @fopen($tpath, 'w');
246 246
 	if ((!$tmpfd)
247 247
 		or (@fputs($tmpfd, 'zz', 2) != 2)
@@ -254,14 +254,14 @@  discard block
 block discarded – undo
254 254
 		return false; //(NFSL_SYSF);
255 255
 	}
256 256
 
257
-	@fclose($tmpfd);    /* We don't need this once we have our_tmp.st_ctime. */
257
+	@fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */
258 258
 	spip_unlink($tpath);
259 259
 
260 260
 	/*
261 261
 	 * 2. make fullpath, a buffer for the full pathname of the lock file
262 262
 	 */
263 263
 
264
-	$lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8);
264
+	$lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8);
265 265
 
266 266
 	/*
267 267
 	 * 3. If the ctime hasn't been modified, unlink the file and return. If the
@@ -280,10 +280,10 @@  discard block
 block discarded – undo
280 280
 			if (!$test) {
281 281
 				return false;
282 282
 			} //(NFSL_LOST);
283
-			sleep(1 + (random(0, 4)));    /* so sleep a bit */
283
+			sleep(1 + (random(0, 4))); /* so sleep a bit */
284 284
 		}
285 285
 
286
-		return true;//(NFSL_OK);			/* success */
286
+		return true; //(NFSL_OK);			/* success */
287 287
 	}
288 288
 
289 289
 	/*
Please login to merge, or discard this patch.
ecrire/inc/roles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 			$role = $roles['roles']['defaut'];
150 150
 		}
151 151
 		// where
152
-		$cond = array("$colonne_role=" . sql_quote($role));
152
+		$cond = array("$colonne_role=".sql_quote($role));
153 153
 	}
154 154
 
155 155
 	return array($role, $colonne_role, $cond);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	if ($colonne_role) {
185 185
 		// on ajoute la condition du role aux autres conditions.
186 186
 		if ($role != '*') {
187
-			$cond[] = "$colonne_role=" . sql_quote($role);
187
+			$cond[] = "$colonne_role=".sql_quote($role);
188 188
 		}
189 189
 	}
190 190
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 	$all = sql_allfetsel(
369 369
 		"DISTINCT $colone_role",
370 370
 		$l,
371
-		'objet=' . sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source)
371
+		'objet='.sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source)
372 372
 	);
373 373
 	$done[$hash] = array_map('reset', $all);
374 374
 
Please login to merge, or discard this patch.
ecrire/inc/simplexml_to_array.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 			$namespace[null] = null;
58 58
 		}
59 59
 
60
-		$name = strtolower((string)$obj->getName());
61
-		$text = trim((string)$obj);
60
+		$name = strtolower((string) $obj->getName());
61
+		$text = trim((string) $obj);
62 62
 		if (strlen($text) <= 0) {
63 63
 			$text = null;
64 64
 		}
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 			// attributes
72 72
 			$objAttributes = $obj->attributes($ns, true);
73 73
 			foreach ($objAttributes as $attributeName => $attributeValue) {
74
-				$attribName = strtolower(trim((string)$attributeName));
75
-				$attribVal = trim((string)$attributeValue);
74
+				$attribName = strtolower(trim((string) $attributeName));
75
+				$attribVal = trim((string) $attributeValue);
76 76
 				if (!empty($ns)) {
77
-					$attribName = $ns . ':' . $attribName;
77
+					$attribName = $ns.':'.$attribName;
78 78
 				}
79 79
 				$attributes[$attribName] = $attribVal;
80 80
 			}
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 			// children
83 83
 			$objChildren = $obj->children($ns, true);
84 84
 			foreach ($objChildren as $childName => $child) {
85
-				$childName = strtolower((string)$childName);
85
+				$childName = strtolower((string) $childName);
86 86
 				if (!empty($ns)) {
87
-					$childName = $ns . ':' . $childName;
87
+					$childName = $ns.':'.$childName;
88 88
 				}
89 89
 				$children[$childName][] = xmlObjToArr($child, $namespace);
90 90
 			}
Please login to merge, or discard this patch.
ecrire/inc/lister_objets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	$fond = "prive/objets/liste/$vue";
48
-	if (!find_in_path($fond . "." . _EXTENSION_SQUELETTES)) {
48
+	if (!find_in_path($fond."."._EXTENSION_SQUELETTES)) {
49 49
 		// traiter les cas particuliers
50 50
 		include_spip('base/connect_sql');
51 51
 		$vue = table_objet($vue);
52 52
 		$fond = "prive/objets/liste/$vue";
53
-		if (!find_in_path($fond . "." . _EXTENSION_SQUELETTES)) {
53
+		if (!find_in_path($fond."."._EXTENSION_SQUELETTES)) {
54 54
 			return _L("vue $vue introuvable pour lister les objets");
55 55
 		}
56 56
 	}
Please login to merge, or discard this patch.