[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / exec / info_plugin.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
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 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
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');
20 echo minipres();
21 } else {
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));
27 }
28 else if (strncmp($plug, _DIR_PLUGINS,strlen(_DIR_PLUGINS)) === 0) {
29 $dir_plugins = _DIR_PLUGINS;
30 $plug = substr($plug,strlen(_DIR_PLUGINS));
31 }
32 // sinon c'est louche, mais on essaye quand meme
33
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));
38 }
39 }
40
41 ?>