Commit 6e2b9636 authored by Mike Kelly's avatar Mike Kelly Committed by Richard Mansfield
Browse files

Add required db fields for 'resize images on upload' feature.



Update artefact.file version to force the database upgrade.

Change-Id: I838acf82a7bbceb9e3d185b33bbf196cb9c5c0a9
Signed-off-by: default avatarMike Kelly <m.f.kelly@arts.ac.uk>
parent 118b7674
......@@ -392,5 +392,14 @@ function xmldb_artefact_file_upgrade($oldversion=0) {
}
}
if ($oldversion < 2012050400) {
if (!get_record('artefact_config', 'plugin', 'file', 'field', 'resizeonuploadenable')) {
insert_record('artefact_config', (object) array('plugin' => 'file', 'field' => 'resizeonuploadenable', 'value' => 0));
insert_record('artefact_config', (object) array('plugin' => 'file', 'field' => 'resizeonuploaduseroption', 'value' => 0));
insert_record('artefact_config', (object) array('plugin' => 'file', 'field' => 'resizeonuploadmaxheight', 'value' => get_config('imagemaxheight')));
insert_record('artefact_config', (object) array('plugin' => 'file', 'field' => 'resizeonuploadmaxwidth', 'value' => get_config('imagemaxwidth')));
}
}
return $status;
}
......@@ -28,5 +28,5 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2011082200;
$config->release = '1.2.0';
$config->version = 2012050400;
$config->release = '1.2.1';
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