Commit 128a0249 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Bug 1591052: remove dataroot/smarty directory

Not in use since Mahara 1.2.

Change-Id: I8aa24c11eb82a748465fc58eeadb4819061b8bcd
behatnotneeded: Covered by existing tests
parent df32edc9
......@@ -99,18 +99,8 @@ $failureicon = 'icon icon-exclamation-triangle left';
$warningicon = 'icon icon-exclamation-triangle left';
// Remove all files in the smarty and dwoo caches
// TODO post 1.2 remove the smarty part
// Remove all files in the dwoo cache
require_once('file.php');
$basedir = get_config('dataroot') . 'smarty/compile/';
$dh = new DirectoryIterator($basedir);
foreach ($dh as $themedir) {
if ($themedir->isDot()) continue;
$themedirname = $basedir . $themedir->getFilename();
rmdirr($themedirname);
clearstatcache();
check_dir_exists($themedirname);
}
$basedir = get_config('dataroot') . 'dwoo/compile/';
$dh = new DirectoryIterator($basedir);
foreach ($dh as $themedir) {
......
......@@ -4516,5 +4516,11 @@ function xmldb_core_upgrade($oldversion=0) {
change_field_precision($table, $field);
}
if ($oldversion < 2016070700) {
require_once('file.php');
log_debug('Remove obsolete dataroot/smarty directory');
rmdirr(get_config('dataroot') . 'smarty');
}
return $status;
}
......@@ -143,8 +143,7 @@ function ensure_sanity() {
}
if (
!check_dir_exists(get_config('dataroot') . 'smarty/compile') ||
!check_dir_exists(get_config('dataroot') . 'smarty/cache') ||
!check_dir_exists(get_config('dataroot') . 'dwoo') ||
!check_dir_exists(get_config('dataroot') . 'temp') ||
!check_dir_exists(get_config('dataroot') . 'langpacks') ||
!check_dir_exists(get_config('dataroot') . 'htmlpurifier') ||
......
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2016070500;
$config->version = 2016070700;
$config->series = '16.10';
$config->release = '16.10dev';
$config->minupgradefrom = 2012080604;
......
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