Completed
Push — master ( da491f...cb557d )
by cam
05:25
created
ecrire/plugins/afficher_plugin.php 1 patch
Spacing   +33 added lines, -34 removed lines patch added patch discarded remove patch
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 		$class_li .= " error";
57 57
 		$erreur = http_img_pack("plugin-err-32.png", _T('plugin_info_erreur_xml'), " class='picto_err'",
58 58
 				_T('plugin_info_erreur_xml'))
59
-			. "<div class='erreur'>" . join('<br >', $info['erreur']) . "</div>";
59
+			. "<div class='erreur'>".join('<br >', $info['erreur'])."</div>";
60 60
 		$checkable = false;
61
-	} elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file])) {
61
+	} elseif (isset($GLOBALS['erreurs_activation_raw'][$dir_plugins.$plug_file])) {
62 62
 		$class_li .= " error";
63 63
 		$erreur = http_img_pack("plugin-err-32.png", _T('plugin_impossible_activer', array('plugin' => $nom)),
64 64
 				" class='picto_err'", _T('plugin_impossible_activer', array('plugin' => $nom)))
65
-			. "<div class='erreur'>" . implode("<br />",
66
-				$GLOBALS['erreurs_activation_raw'][$dir_plugins . $plug_file]) . "</div>";
65
+			. "<div class='erreur'>".implode("<br />",
66
+				$GLOBALS['erreurs_activation_raw'][$dir_plugins.$plug_file])."</div>";
67 67
 	} else {
68 68
 		$cfg = $actif ? plugin_bouton_config($plug_file, $info, $dir_plugins) : "";
69 69
 	}
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 	// numerotons les occurrences d'un meme prefix
72 72
 	$versions[$prefix] = $id = isset($versions[$prefix]) ? intval($versions[$prefix]) + 1 : '';
73 73
 
74
-	$class_li .= ($actif ? " actif" : "") . ($expose ? " on" : "");
74
+	$class_li .= ($actif ? " actif" : "").($expose ? " on" : "");
75 75
 
76 76
 	return "<li id='$prefix$id' class='$class_li'>"
77 77
 	. ((!$checkable and !$checked)
78
-		? '' : plugin_checkbox(++$id_input, $dir_plugins . $plug_file, $checked))
78
+		? '' : plugin_checkbox(++$id_input, $dir_plugins.$plug_file, $checked))
79 79
 	. plugin_resume($info, $dir_plugins, $plug_file, $url_page)
80 80
 	. $cfg
81 81
 	. $erreur
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 	$prefix = strtolower($infos['prefix']);
94 94
 	// si paquet.xml fournit un squelette, le prendre
95 95
 	if (isset($infos['config']) and $infos['config']) {
96
-		return recuperer_fond("$dir$nom/" . $infos['config'],
96
+		return recuperer_fond("$dir$nom/".$infos['config'],
97 97
 			array(
98
-				'script' => 'configurer_' . $prefix,
98
+				'script' => 'configurer_'.$prefix,
99 99
 				'nom' => $nom
100 100
 			));
101 101
 	}
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	// sinon prendre le squelette std sur le nom std
114 114
 	return recuperer_fond("prive/squelettes/inclure/cfg",
115 115
 		array(
116
-			'script' => 'configurer_' . $prefix,
116
+			'script' => 'configurer_'.$prefix,
117 117
 			'nom' => $nom
118 118
 		));
119 119
 }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	. "<input type='checkbox' name='s$name' id='label_$id_input'"
129 129
 	. ($actif ? " checked='checked'" : "")
130 130
 	. " class='checkbox'  value='O' />"
131
-	. "\n<label for='label_$id_input'>" . _T('activer_plugin') . "</label>"
131
+	. "\n<label for='label_$id_input'>"._T('activer_plugin')."</label>"
132 132
 	. "</div>";
133 133
 }
134 134
 
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 	. "<h3><a href='$url' rel='info'>"
177 177
 	. $nom
178 178
 	. "</a></h3>"
179
-	. " <span class='version'>" . $info['version'] . "</span>"
179
+	. " <span class='version'>".$info['version']."</span>"
180 180
 	. " <span class='etat'> - "
181 181
 	. plugin_etat_en_clair($info['etat'])
182 182
 	. "</span>"
183
-	. "<div class='short'>" . $slogan . "</div>"
183
+	. "<div class='short'>".$slogan."</div>"
184 184
 	. $i
185 185
 	. "</div>";
186 186
 }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	$text2 = _T('info_desinstaller_plugin');
196 196
 	$file = basename($plug_file);
197 197
 
198
-	return "<div class='actions'>[" .
198
+	return "<div class='actions'>[".
199 199
 	"<a href='$action'
200 200
 		onclick='return confirm(\"$text $nom ?\\n$text2\")'>"
201 201
 	. $text
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 		$etat = 'developpement';
218 218
 	}
219 219
 
220
-	return _T('plugin_etat_' . $etat);
220
+	return _T('plugin_etat_'.$etat);
221 221
 }
222 222
 
223 223
 // http://code.spip.net/@plugin_propre
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 		$module = substr($module, strlen(_DIR_RACINE));
228 228
 	}
229 229
 	if (preg_match("|^\w+_[\w_]+$|", $texte)) {
230
-		$texte = _T(($module ? "$module:" : '') . $texte, array(), array('force' => false));
230
+		$texte = _T(($module ? "$module:" : '').$texte, array(), array('force' => false));
231 231
 	}
232 232
 
233 233
 	return propre($texte);
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 	if (isset($info['documentation'])
256 256
 		and $lien = $info['documentation']
257 257
 	) {
258
-		$description .= "<p><em class='site'><a href='$lien' class='spip_out'>" . _T('en_savoir_plus') . '</a></em></p>';
258
+		$description .= "<p><em class='site'><a href='$lien' class='spip_out'>"._T('en_savoir_plus').'</a></em></p>';
259 259
 	}
260
-	$s .= "<dd class='desc'>" . $description . "</dd>\n";
260
+	$s .= "<dd class='desc'>".$description."</dd>\n";
261 261
 
262 262
 	if (isset($info['auteur'])) {
263 263
 		if (is_array($info['auteur'])) {
@@ -267,15 +267,15 @@  discard block
 block discarded – undo
267 267
 			$a = trim($info['auteur']);
268 268
 		}
269 269
 		if ($a) {
270
-			$s .= "<dt class='auteurs'>" . _T('public:par_auteur') . "</dt><dd class='auteurs'>" . PtoBR(propre($a,
271
-					$dir)) . "</dd>\n";
270
+			$s .= "<dt class='auteurs'>"._T('public:par_auteur')."</dt><dd class='auteurs'>".PtoBR(propre($a,
271
+					$dir))."</dd>\n";
272 272
 		}
273 273
 	}
274 274
 
275 275
 	if (isset($info['credit'])) {
276 276
 		if ($a = formater_credits($info['credit'], ', ')) {
277
-			$s .= "<dt class='credits'>" . _T('plugin_info_credit') . "</dt><dd class='credits'>" . PtoBR(propre($a,
278
-					$dir)) . "</dd>\n";
277
+			$s .= "<dt class='credits'>"._T('plugin_info_credit')."</dt><dd class='credits'>".PtoBR(propre($a,
278
+					$dir))."</dd>\n";
279 279
 		}
280 280
 	}
281 281
 
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 			$a = trim($info['licence']);
288 288
 		}
289 289
 		if ($a) {
290
-			$s .= "<dt class='licence'>" . _T('intitule_licence') . "</dt><dd class='licence'>" . PtoBR(propre($a,
291
-					$dir)) . "</dd>\n";
290
+			$s .= "<dt class='licence'>"._T('intitule_licence')."</dt><dd class='licence'>".PtoBR(propre($a,
291
+					$dir))."</dd>\n";
292 292
 		}
293 293
 	}
294 294
 
@@ -299,23 +299,22 @@  discard block
 block discarded – undo
299 299
 	//
300 300
 	$infotech = array();
301 301
 
302
-	$version = "<dt>" . _T('version') . "</dt><dd>" . $info['version'];
302
+	$version = "<dt>"._T('version')."</dt><dd>".$info['version'];
303 303
 	// Version SVN
304
-	if ($svn_revision = version_svn_courante($dir_plugins . $plug_file)) {
305
-		$version .= ($svn_revision < 0 ? ' SVN' : '') . ' [' . abs($svn_revision) . ']';
304
+	if ($svn_revision = version_svn_courante($dir_plugins.$plug_file)) {
305
+		$version .= ($svn_revision < 0 ? ' SVN' : '').' ['.abs($svn_revision).']';
306 306
 	}
307 307
 	$version .= "</dd>";
308 308
 	$infotech[] = $version;
309
-	$infotech[] = "<dt>" . _T('repertoire_plugins') . "</dt><dd>" . joli_repertoire("$dir_plugins$plug_file") . "</dd>";
309
+	$infotech[] = "<dt>"._T('repertoire_plugins')."</dt><dd>".joli_repertoire("$dir_plugins$plug_file")."</dd>";
310 310
 	// source zip le cas echeant
311
-	$infotech[] = (lire_fichier($dir_plugins . $plug_file . '/install.log', $log)
311
+	$infotech[] = (lire_fichier($dir_plugins.$plug_file.'/install.log', $log)
312 312
 		and preg_match(',^source:(.*)$,m', $log, $r))
313
-		? '<dt>' . _T('plugin_source') . '</dt><dd>' . trim($r[1]) . "</dd>"
313
+		? '<dt>'._T('plugin_source').'</dt><dd>'.trim($r[1])."</dd>"
314 314
 		: '';
315 315
 
316
-	$infotech[] = !$info['necessite'] ? '' :
317
-		('<dt>' . _T('plugin_info_necessite') . '</dt><dd>' . join(' ',
318
-				array_map('array_shift', $info['necessite'])) . '</dd>');
316
+	$infotech[] = !$info['necessite'] ? '' : ('<dt>'._T('plugin_info_necessite').'</dt><dd>'.join(' ',
317
+				array_map('array_shift', $info['necessite'])).'</dd>');
319 318
 
320 319
 	$s .= "<dl class='tech'>"
321 320
 		. join('', $infotech)
@@ -336,8 +335,8 @@  discard block
 block discarded – undo
336 335
 		$texte .=
337 336
 			(!is_array($_credit))
338 337
 				? PtoBR(propre($_credit))
339
-				: ($_credit['url'] ? '<a href="' . $_credit['url'] . '">' : '') .
340
-				$_credit['nom'] .
338
+				: ($_credit['url'] ? '<a href="'.$_credit['url'].'">' : '').
339
+				$_credit['nom'].
341 340
 				($_credit['url'] ? '</a>' : '');
342 341
 	}
343 342
 
Please login to merge, or discard this patch.