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

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'; ...@@ -98,20 +98,11 @@ $successicon = 'icon icon-check text-success left';
$failureicon = 'icon icon-exclamation-triangle left'; $failureicon = 'icon icon-exclamation-triangle left';
$warningicon = 'icon icon-exclamation-triangle left'; $warningicon = 'icon icon-exclamation-triangle left';
if (empty($upgrades['core']->install)) {
// Remove all files in the dwoo cache // Clear all caches on upgrade
require_once('file.php'); clear_all_caches();
$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')); $loadingstring = json_encode(get_string('upgradeloading', 'admin'));
$installsuccessstring = json_encode(get_string('installsuccess', 'admin')); $installsuccessstring = json_encode(get_string('installsuccess', 'admin'));
$successstring = json_encode(get_string('upgradesuccesstoversion', 'admin')); $successstring = json_encode(get_string('upgradesuccesstoversion', 'admin'));
......
Supports Markdown
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