[SPIP] +spip v3.0.17
[lhc/web/clavette_www.git] / www / ecrire / exec / info_plugin.php
1 <?php
2
3 if (!defined('_ECRIRE_INC_VERSION')) return;
4
5 include_spip('inc/actions');
6 // http://doc.spip.org/@exec_info_plugin_dist
7 function exec_info_plugin_dist() {
8 if (!autoriser('configurer', '_plugins')) {
9 include_spip('inc/minipres');
10 echo minipres();
11 } else {
12 $plug = _DIR_RACINE . _request('plugin');
13 $get_infos = charger_fonction('get_infos','plugins');
14 $dir = "";
15 if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
16 $dir = _DIR_PLUGINS;
17 elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
18 $dir = _DIR_PLUGINS_DIST;
19 if ($dir)
20 $plug = substr($plug,strlen($dir));
21 $info = $get_infos($plug,false,$dir);
22 $afficher_plugin = charger_fonction("afficher_plugin","plugins");
23 ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
24 }
25 }
26
27 ?>