Commit 046aba91 authored by Robert Lyon's avatar Robert Lyon

Bug 1737038: Only clear cache on update and not install

behatnotneeded

Change-Id: Idad7f09bfc88042110262e997b8f72bf3a895d0d
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 315e5232
......@@ -98,20 +98,11 @@ $successicon = 'icon icon-check text-success left';
$failureicon = 'icon icon-exclamation-triangle left';
$warningicon = 'icon icon-exclamation-triangle left';
// Remove all files in the dwoo cache
require_once('file.php');
$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);
if (empty($upgrades['core']->install)) {
// Clear all caches on upgrade
clear_all_caches();
}
$loadingstring = json_encode(get_string('upgradeloading', 'admin'));
$installsuccessstring = json_encode(get_string('installsuccess', 'admin'));
$successstring = json_encode(get_string('upgradesuccesstoversion', '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