Skip to content

Commit

Permalink
Merge pull request MightyGorgon#127 from vendethiel/feature/xs-clear-…
Browse files Browse the repository at this point in the history
…cache

XS: clear cache when {un,}installing themes
  • Loading branch information
MightyGorgon authored Aug 15, 2016
2 parents 9b9a3f1 + 51991ff commit a1f8680
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adm/xs_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
if($res)
{
$db->clear_cache('styles_');
$cache->destroy_datafiles(array('_styles'), MAIN_CACHE_FOLDER, 'data', false);
xs_message($lang['Information'], $lang['xs_install_installed'] . '<br /><br />' . $lang['xs_install_back'] . '<br /><br />' . $lang['xs_goto_default']);
}
xs_error($lang['xs_install_error'] . '<br /><br />' . $lang['xs_install_back']);
Expand Down Expand Up @@ -81,6 +82,7 @@
);
}
$db->clear_cache('styles_');
$cache->destroy_datafiles(array('_styles'), MAIN_CACHE_FOLDER, 'data', false);
xs_message($lang['Information'], $lang['xs_install_installed'] . '<br /><br />' . $lang['xs_install_back'] . '<br /><br />' . $lang['xs_goto_default']);
}
}
Expand Down
5 changes: 5 additions & 0 deletions adm/xs_uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ function remove_all($dir)
$sql = "DELETE FROM " . THEMES_TABLE . " WHERE themes_id = '{$remove_id}'";
$db->sql_query($sql);
$template->assign_block_vars('removed', array());

// clear cache
$db->clear_cache('styles_');
$cache->destroy_datafiles(array('_styles'), MAIN_CACHE_FOLDER, 'data', false);

// remove files
if(!empty($remove_dir))
{
Expand Down

0 comments on commit a1f8680

Please sign in to comment.