File: info_plugin.php

package info (click to toggle)
spip 3.0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 30,776 kB
  • sloc: php: 200,550; xml: 4,367; sh: 272; makefile: 39
file content (27 lines) | stat: -rw-r--r-- 791 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

if (!defined('_ECRIRE_INC_VERSION')) return;

include_spip('inc/actions');
// http://doc.spip.org/@exec_info_plugin_dist
function exec_info_plugin_dist() {
	if (!autoriser('configurer', '_plugins')) {
		include_spip('inc/minipres');
		echo minipres();
	} else {
		$plug = _DIR_RACINE . _request('plugin');
		$get_infos = charger_fonction('get_infos','plugins');
		$dir = "";
		if (strncmp($plug,_DIR_PLUGINS,strlen(_DIR_PLUGINS))==0)
			$dir = _DIR_PLUGINS;
		elseif (strncmp($plug,_DIR_PLUGINS_DIST,strlen(_DIR_PLUGINS_DIST))==0)
			$dir = _DIR_PLUGINS_DIST;
		if ($dir)
			$plug = substr($plug,strlen($dir));
		$info = $get_infos($plug,false,$dir);
		$afficher_plugin = charger_fonction("afficher_plugin","plugins");
		ajax_retour(affiche_bloc_plugin($plug, $info, $dir));
	}
}

?>