Changeset 3949 for branches


Ignore:
Timestamp:
Oct 1, 2009, 12:41:40 PM (15 years ago)
Author:
patdenice
Message:

Purge compiled templates when activate or deactivate a plugin.
Cf topic:16250 on french forum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/plugins_list.php

    r3046 r3949  
    3939if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser())
    4040{
    41   $page['errors'] =
    42     $plugins->perform_action($_GET['action'], $_GET['plugin']);
     41  $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']);
    4342
    44   if (empty($page['errors'])) redirect($base_url);
     43  if (empty($page['errors']))
     44  {
     45    if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate')
     46    {
     47      $template->delete_compiled_templates();
     48    }
     49    redirect($base_url);
     50  }
    4551}
    4652
Note: See TracChangeset for help on using the changeset viewer.