Skip to content

Commit

Permalink
MDL-40874 Retire MyMobile as a standard theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mouneyrac authored and marinaglancy committed Nov 4, 2013
1 parent 78a4923 commit 7c2efc1
Show file tree
Hide file tree
Showing 186 changed files with 42 additions and 18,446 deletions.
2 changes: 1 addition & 1 deletion lib/classes/plugin_manager.php
Expand Up @@ -1103,7 +1103,7 @@ public static function standard_plugins_list($type) {
'theme' => array(
'afterburner', 'anomaly', 'arialist', 'base', 'binarius', 'bootstrapbase',
'boxxie', 'brick', 'canvas', 'clean', 'formal_white', 'formfactor',
'fusion', 'leatherbound', 'magazine', 'mymobile', 'nimble',
'fusion', 'leatherbound', 'magazine', 'nimble',
'nonzero', 'overlay', 'serenity', 'sky_high', 'splash',
'standard', 'standardold'
),
Expand Down
33 changes: 33 additions & 0 deletions lib/db/upgrade.php
Expand Up @@ -2774,5 +2774,38 @@ 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);
}

return true;
}
162 changes: 0 additions & 162 deletions theme/mymobile/config.php

This file was deleted.

0 comments on commit 7c2efc1

Please sign in to comment.