Merge branch 'w46_MDL-42708_m26_mymobile' of https://github.com/skodak/moodle

This commit is contained in:
Marina Glancy
2013-11-07 17:17:42 +11:00
3 changed files with 33 additions and 34 deletions
+1
View File
@@ -904,6 +904,7 @@ class core_plugin_manager {
'qformat' => array('blackboard'),
'enrol' => array('authorize'),
'tool' => array('bloglevelupgrade'),
'theme' => array('mymobile'),
);
if (!isset($plugins[$type])) {
+31 -33
View File
@@ -2780,39 +2780,6 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013102500.01);
}
if ($oldversion < 2013110400.00) {
if (!check_dir_exists($CFG->dirroot . '/theme/mymobile', false)) {
// Delete from config_plugins.
$DB->delete_records('config_plugins', array('plugin' => 'theme_mymobile'));
// Delete the config logs.
$DB->delete_records('config_log', array('plugin' => 'theme_mymobile'));
// Replace the mymobile settings.
$DB->set_field('course', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('course_categories', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('user', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('mnet_host', 'theme', 'clean', array('theme' => 'mymobile'));
// Replace the theme configs.
if (get_config('core', 'theme') == 'mymobile') {
set_config('theme', 'clean');
}
if (get_config('core', 'thememobile') == 'mymobile') {
set_config('thememobile', 'clean');
}
if (get_config('core', 'themelegacy') == 'mymobile') {
set_config('themelegacy', 'clean');
}
if (get_config('core', 'themetablet') == 'mymobile') {
set_config('themetablet', 'clean');
}
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2013110400.00);
}
if ($oldversion < 2013110500.01) {
// MDL-38228. Corrected course_modules upgrade script instead of 2013021801.01.
@@ -2833,5 +2800,36 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013110500.01);
}
if ($oldversion < 2013110600.01) {
if (!file_exists($CFG->dirroot . '/theme/mymobile')) {
// Replace the mymobile settings.
$DB->set_field('course', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('course_categories', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('user', 'theme', 'clean', array('theme' => 'mymobile'));
$DB->set_field('mnet_host', 'theme', 'clean', array('theme' => 'mymobile'));
// Replace the theme configs.
if (get_config('core', 'theme') === 'mymobile') {
set_config('theme', 'clean');
}
if (get_config('core', 'thememobile') === 'mymobile') {
set_config('thememobile', 'clean');
}
if (get_config('core', 'themelegacy') === 'mymobile') {
set_config('themelegacy', 'clean');
}
if (get_config('core', 'themetablet') === 'mymobile') {
set_config('themetablet', 'clean');
}
// Hacky emulation of plugin uninstallation.
unset_all_config_for_plugin('theme_mymobile');
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2013110600.01);
}
return true;
}
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2013110600.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2013110600.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.