Skip to content
Snippets Groups Projects
Commit 7e757a97 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Added upgrade.php to handle all settings changes correctly.

parent 4a78db7e
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ Changes ...@@ -6,6 +6,7 @@ Changes
### Unreleased ### Unreleased
* 2018-05-17 - Added upgrade.php to handle all settings changes correctly.
* 2018-05-15 - Changes to navdrawerfullwidth setting (corrections and removing code because MDL-61411 is integrated into core). * 2018-05-15 - Changes to navdrawerfullwidth setting (corrections and removing code because MDL-61411 is integrated into core).
* 2018-05-16 - Minor improvement to block controls for footer blocks. * 2018-05-16 - Minor improvement to block controls for footer blocks.
* 2018-05-16 - Fixed imagearea setting due to changes in Moodle core. * 2018-05-16 - Fixed imagearea setting due to changes in Moodle core.
......
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Theme Boost Campus - Upgrade script
*
* @package theme_boost_campus
* @copyright 2017 Kathrin Osswald, Ulm University kathrin.osswald@uni-ulm.de
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
/**
* Function to upgrade theme_boost_campus
* @param int $oldversion the version we are upgrading from
* @return bool result
*/
function xmldb_theme_boost_campus_upgrade($oldversion) {
global $DB;
if ($oldversion < 2018051701) {
// The setting "theme_boost_campus|navdrawericons" has been deleted because this functionality was
// integrated into core.
// Set the config to null.
set_config('navdrawericons', null, 'theme_boost_campus');
// The setting "theme_boost_campus|nawdrawerfullwidth" has been renamed to navdrawerfullwidth.
// If the setting is configured.
if ($oldnavdrawerfullwidth = get_config('theme_boost_campus', 'nawdrawerfullwidth')) {
// Set the value of the setting to the new setting.
set_config('navdrawerfullwidth', $oldnavdrawerfullwidth, 'theme_boost_campus');
// Drop the old setting.
set_config('nawdrawerfullwidth', null, 'theme_boost_campus');
}
upgrade_plugin_savepoint(true, 2018051701, 'theme', 'boost_campus');
}
return true;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment