3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2014 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 include_spip('inc/actions');
16 // http://doc.spip.org/@exec_info_plugin_dist
17 function exec_info_plugin_dist() {
18 if (!autoriser('configurer', 'plugins')) {
19 include_spip('inc/minipres');
22 $plug = _request('plugin');
23 $dir_plugins = _DIR_PLUGINS
;
24 if (strncmp($plug, _DIR_EXTENSIONS
,strlen(_DIR_EXTENSIONS
)) === 0) {
25 $dir_plugins = _DIR_EXTENSIONS
;
26 $plug = substr($plug,strlen(_DIR_EXTENSIONS
));
28 else if (strncmp($plug, _DIR_PLUGINS
,strlen(_DIR_PLUGINS
)) === 0) {
29 $dir_plugins = _DIR_PLUGINS
;
30 $plug = substr($plug,strlen(_DIR_PLUGINS
));
32 // sinon c'est louche, mais on essaye quand meme
34 $get_infos = charger_fonction('get_infos','plugins');
35 $info = $get_infos($plug, false, $dir_plugins);
36 $afficher_plugin = charger_fonction("afficher_plugin","plugins");
37 ajax_retour(affiche_bloc_plugin($plug, $info));