Commit | Line | Data |
---|---|---|
c495c100 P |
1 | <?php |
2 | ||
3 | /***************************************************************************\ | |
4 | * SPIP, Systeme de publication pour l'internet * | |
5 | * * | |
6 | * Copyright (c) 2001-2007 * | |
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/plugin'); | |
16 | // http://doc.spip.org/@action_desinstaller_plugin_dist | |
17 | function action_desinstaller_plugin_dist() { | |
18 | ||
19 | $securiser_action = charger_fonction('securiser_action', 'inc'); | |
20 | $plug_file = $securiser_action(); | |
21 | $infos = plugin_get_infos($plug_file); | |
22 | if (isset($infos['install'])){ | |
23 | // desinstaller | |
24 | $etat = desinstalle_un_plugin($plug_file,$infos); | |
25 | // desactiver si il a bien ete desinstalle | |
26 | if (!$etat) | |
27 | ecrire_plugin_actifs(array($plug_file),false,'enleve'); | |
28 | ecrire_metas(); | |
29 | } | |
30 | if ($redirect = _request('redirect')){ | |
31 | include_spip('inc/headers'); | |
32 | $redirect = str_replace('&','&',$redirect); | |
33 | redirige_par_entete($redirect); | |
34 | } | |
35 | } | |
36 | ||
37 | ?> |