X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fecrire%2Fplugins%2Fafficher_nom_plugin.php;fp=www%2Fecrire%2Fplugins%2Fafficher_nom_plugin.php;h=c260865bb47e3e24fb73b364bbc6f7a51ba35d4d;hb=4f443dce95ff6f8221c189880a70c74ce1c1f238;hp=fdbecadb20da782d068626118139ff897ffcbd05;hpb=4a628e9b277d3617535f99d663ca79fa2e891177;p=lhc%2Fweb%2Fwww.git diff --git a/www/ecrire/plugins/afficher_nom_plugin.php b/www/ecrire/plugins/afficher_nom_plugin.php index fdbecadb..c260865b 100644 --- a/www/ecrire/plugins/afficher_nom_plugin.php +++ b/www/ecrire/plugins/afficher_nom_plugin.php @@ -3,39 +3,50 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2016 * + * Copyright (c) 2001-2017 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ -if (!defined('_ECRIRE_INC_VERSION')) return; +if (!defined('_ECRIRE_INC_VERSION')) { + return; +} include_spip('inc/charsets'); include_spip('inc/texte'); include_spip('plugins/afficher_plugin'); -// http://doc.spip.org/@ligne_plug -function plugins_afficher_nom_plugin_dist($url_page, $plug_file, $checked, $actif, $expose=false, $class_li="item", $dir_plugins=_DIR_PLUGINS){ - static $id_input=0; +// http://code.spip.net/@ligne_plug +function plugins_afficher_nom_plugin_dist( + $url_page, + $plug_file, + $checked, + $actif, + $expose = false, + $class_li = "item", + $dir_plugins = _DIR_PLUGINS +) { + static $id_input = 0; static $versions = array(); $erreur = false; $s = ""; - $get_infos = charger_fonction('get_infos','plugins'); + $get_infos = charger_fonction('get_infos', 'plugins'); $info = $get_infos($plug_file, false, $dir_plugins); // numerotons les occurences d'un meme prefix $versions[$info['prefix']] = isset($versions[$info['prefix']]) ? $versions[$info['prefix']] + 1 : ''; $id = $info['prefix'] . $versions[$info['prefix']]; - + $class = $class_li; - $class .= $actif?" actif":""; - $class .= $expose?" on":""; + $class .= $actif ? " actif" : ""; + $class .= $expose ? " on" : ""; $erreur = isset($info['erreur']); - if ($erreur) + if ($erreur) { $class .= " error"; + } $s .= "
  • "; // Cartouche Resume @@ -44,19 +55,18 @@ function plugins_afficher_nom_plugin_dist($url_page, $plug_file, $checked, $acti $prefix = $info['prefix']; $dir = "$dir_plugins$plug_file/lang/$prefix"; $desc = plugin_propre($info['description'], $dir); - $url_stat = parametre_url($url_page, "plugin",$dir_plugins.$plug_file); + $url_stat = parametre_url($url_page, "plugin", $dir_plugins . $plug_file); - $s .= "".typo($info['nom']).""; - $s .= " ".$info['version'].""; - $s .= " - ".plugin_etat_en_clair($info['etat']).""; + $s .= "" . typo($info['nom']) . ""; + $s .= " " . $info['version'] . ""; + $s .= " - " . plugin_etat_en_clair($info['etat']) . ""; $s .= ""; - if ($erreur){ + if ($erreur) { $s .= "
    " . join('
    ', $info['erreur']) . "
    "; } $s .= "
  • "; + return $s; } - -?>