4 * Gestion d'affichage d'un descriptif de plugin en ajax
6 * @package SPIP\Core\Exec
9 if (!defined('_ECRIRE_INC_VERSION')) {
13 include_spip('inc/actions');
16 * Affichage de la description d'un plugin (en ajax)
18 * @uses plugins_get_infos_dist()
19 * @uses plugins_afficher_plugin_dist()
20 * @uses affiche_bloc_plugin()
23 function exec_info_plugin_dist() {
24 if (!autoriser('configurer', '_plugins')) {
25 include_spip('inc/minipres');
28 $plug = _DIR_RACINE
. htmlspecialchars(_request('plugin'));
29 $get_infos = charger_fonction('get_infos', 'plugins');
31 if (strncmp($plug, _DIR_PLUGINS
, strlen(_DIR_PLUGINS
)) == 0) {
33 } elseif (strncmp($plug, _DIR_PLUGINS_DIST
, strlen(_DIR_PLUGINS_DIST
)) == 0) {
34 $dir = _DIR_PLUGINS_DIST
;
37 $plug = substr($plug, strlen($dir));
39 $info = $get_infos($plug, false, $dir);
40 $afficher_plugin = charger_fonction("afficher_plugin", "plugins");
41 ajax_retour(affiche_bloc_plugin($plug, $info, $dir));