Commit 9fb9d801 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Bug 1591052: remove dataroot/smarty directory"

parents fceb1bf3 128a0249
...@@ -99,18 +99,8 @@ $failureicon = 'icon icon-exclamation-triangle left'; ...@@ -99,18 +99,8 @@ $failureicon = 'icon icon-exclamation-triangle left';
$warningicon = 'icon icon-exclamation-triangle left'; $warningicon = 'icon icon-exclamation-triangle left';
// Remove all files in the smarty and dwoo caches // Remove all files in the dwoo cache
// TODO post 1.2 remove the smarty part
require_once('file.php'); 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/'; $basedir = get_config('dataroot') . 'dwoo/compile/';
$dh = new DirectoryIterator($basedir); $dh = new DirectoryIterator($basedir);
foreach ($dh as $themedir) { foreach ($dh as $themedir) {
......
...@@ -4516,5 +4516,11 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -4516,5 +4516,11 @@ function xmldb_core_upgrade($oldversion=0) {
change_field_precision($table, $field); 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; return $status;
} }
...@@ -143,8 +143,7 @@ function ensure_sanity() { ...@@ -143,8 +143,7 @@ function ensure_sanity() {
} }
if ( if (
!check_dir_exists(get_config('dataroot') . 'smarty/compile') || !check_dir_exists(get_config('dataroot') . 'dwoo') ||
!check_dir_exists(get_config('dataroot') . 'smarty/cache') ||
!check_dir_exists(get_config('dataroot') . 'temp') || !check_dir_exists(get_config('dataroot') . 'temp') ||
!check_dir_exists(get_config('dataroot') . 'langpacks') || !check_dir_exists(get_config('dataroot') . 'langpacks') ||
!check_dir_exists(get_config('dataroot') . 'htmlpurifier') || !check_dir_exists(get_config('dataroot') . 'htmlpurifier') ||
......
...@@ -16,7 +16,7 @@ $config = new stdClass(); ...@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy // 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. // 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->series = '16.10';
$config->release = '16.10dev'; $config->release = '16.10dev';
$config->minupgradefrom = 2012080604; $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