Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-theme_boost_campus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-theme_boost_campus
Commits
7e757a97
Commit
7e757a97
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Added upgrade.php to handle all settings changes correctly.
parent
4a78db7e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.md
+1
-0
1 addition, 0 deletions
CHANGES.md
db/upgrade.php
+54
-0
54 additions, 0 deletions
db/upgrade.php
with
55 additions
and
0 deletions
CHANGES.md
+
1
−
0
View file @
7e757a97
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
db/upgrade.php
0 → 100644
+
54
−
0
View file @
7e757a97
<?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
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment