Commit 63382bab authored by Penny Leach's avatar Penny Leach

Remove the dwoo cache on upgrade, and leave a note about deleting smarty

parent 674ba7c3
......@@ -49,7 +49,8 @@ $loadingicon = $THEME->get_url('images/loading.gif');
$successicon = $THEME->get_url('images/success.gif');
$failureicon = $THEME->get_url('images/failure.gif');
// Remove all files in the smarty cache
// Remove all files in the smarty and dwoo caches
// TODO post 1.2 remove the smarty part
require_once('file.php');
$basedir = get_config('dataroot') . 'smarty/compile/';
$dh = new DirectoryIterator($basedir);
......@@ -60,6 +61,16 @@ foreach ($dh as $themedir) {
clearstatcache();
check_dir_exists($themedirname);
}
$basedir = get_config('dataroot') . 'dwoo/compile/';
$dh = new DirectoryIterator($basedir);
foreach ($dh as $themedir) {
if ($themedir->isDot()) continue;
$themedirname = $basedir . $themedir->getFilename();
rmdirr($themedirname);
clearstatcache();
check_dir_exists($themedirname);
}
$loadingstring = json_encode(get_string('upgradeloading', 'admin'));
$installsuccessstring = json_encode(get_string('installsuccess', 'admin'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment