diff options
author | patdenice <patdenice@piwigo.org> | 2009-10-01 10:41:40 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2009-10-01 10:41:40 +0000 |
commit | 6fdaceee165f22d0157f9517834efde9bc2513d0 (patch) | |
tree | aa55de994a1d9d98647cd705d63325337c35e11a /admin/plugins_list.php | |
parent | 6d85089c9aaa43b67c0379e85ff7b6815a90a438 (diff) |
Purge compiled templates when activate or deactivate a plugin.
Cf topic:16250 on french forum.
git-svn-id: http://piwigo.org/svn/branches/2.0@3949 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/plugins_list.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/admin/plugins_list.php b/admin/plugins_list.php index ed115dbb7..2b12f171c 100644 --- a/admin/plugins_list.php +++ b/admin/plugins_list.php @@ -38,10 +38,16 @@ $plugins = new plugins(); //--------------------------------------------------perform requested actions if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser()) { - $page['errors'] = - $plugins->perform_action($_GET['action'], $_GET['plugin']); + $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']); - if (empty($page['errors'])) redirect($base_url); + if (empty($page['errors'])) + { + if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate') + { + $template->delete_compiled_templates(); + } + redirect($base_url); + } } //--------------------------------------------------------------------Tabsheet |