MDL-30610 remove outdated admin tool upgrade code
This commit is contained in:
@@ -28,37 +28,6 @@ defined('MOODLE_INTERNAL') || die;
|
||||
function xmldb_tool_bloglevelupgrade_install() {
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
// this is a hack - admins were long ago instructed to upgrade blog levels,
|
||||
// the problem is that blog is not supposed to be course level activity!!
|
||||
|
||||
if (!empty($CFG->bloglevel_upgrade_complete)) {
|
||||
// somebody already upgrades, we do not need this any more
|
||||
unset_config('bloglevel_upgrade_complete');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($CFG->bloglevel)) {
|
||||
// fresh install?
|
||||
return;
|
||||
}
|
||||
|
||||
if (($CFG->bloglevel == BLOG_COURSE_LEVEL || $CFG->bloglevel == BLOG_GROUP_LEVEL)) {
|
||||
// inform admins that some settings require attention after upgrade
|
||||
$site = get_site();
|
||||
|
||||
$a = new StdClass;
|
||||
$a->sitename = $site->fullname;
|
||||
$a->fixurl = "$CFG->wwwroot/$CFG->admin/tool/bloglevelupgrade/index.php";
|
||||
|
||||
$subject = get_string('bloglevelupgrade', 'tool_bloglevelupgrade');
|
||||
$description = get_string('bloglevelupgradedescription', 'tool_bloglevelupgrade', $a);
|
||||
|
||||
// can not use messaging here because it is not configured yet!
|
||||
upgrade_log(UPGRADE_LOG_NOTICE, null, $subject, $description);
|
||||
set_config('tool_bloglevelupgrade_pending', 1);
|
||||
|
||||
echo $OUTPUT->notification($description);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,24 +28,6 @@ defined('MOODLE_INTERNAL') || die;
|
||||
function xmldb_tool_customlang_install() {
|
||||
global $CFG, $OUTPUT, $DB;
|
||||
|
||||
// this is a hack - this plugin used to live in admin/report/customlang,
|
||||
// we want to remove the orphaned version info and capability
|
||||
// unless there is a new report type with the same name
|
||||
// the original tables can be dropped because they are used for caching only
|
||||
|
||||
if (!file_exists("$CFG->dirroot/report/customlang")) {
|
||||
unset_all_config_for_plugin('report_customlang');
|
||||
capabilities_cleanup('report_customlang');
|
||||
$dbman = $DB->get_manager();
|
||||
$table = new xmldb_table('report_customlang');
|
||||
if ($dbman->table_exists($table)) {
|
||||
$dbman->drop_table($table);
|
||||
}
|
||||
$table = new xmldb_table('report_customlang_components');
|
||||
if ($dbman->table_exists($table)) {
|
||||
$dbman->drop_table($table);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ function xmldb_tool_customlang_upgrade($oldversion) {
|
||||
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Moodle v2.2.0 release upgrade line
|
||||
// Put any upgrade step following this
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,11 +28,4 @@ defined('MOODLE_INTERNAL') || die;
|
||||
function xmldb_tool_qeupgradehelper_install() {
|
||||
global $CFG;
|
||||
|
||||
// this is a hack - this plugin used to live in local/qeupgradehelper,
|
||||
// we want to remove the orphaned version info and capability
|
||||
// unless there is a local plugin type with the same name
|
||||
|
||||
if (!file_exists("$CFG->dirroot/local/qeupgradehelper")) {
|
||||
unset_all_config_for_plugin('local_qeupgradehelper');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +28,4 @@ defined('MOODLE_INTERNAL') || die;
|
||||
function xmldb_tool_unittest_install() {
|
||||
global $CFG;
|
||||
|
||||
// this is a hack - this plugin used to live in admin/report/unittest,
|
||||
// we want to remove the orphaned version info and capability
|
||||
// unless there is a new report type with the same name
|
||||
|
||||
if (!file_exists("$CFG->dirroot/report/unittest")) {
|
||||
unset_all_config_for_plugin('report_unittest');
|
||||
capabilities_cleanup('report_unittest');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,4 @@ defined('MOODLE_INTERNAL') || die;
|
||||
function xmldb_tool_unsuproles_install() {
|
||||
global $CFG;
|
||||
|
||||
// this is a hack - this plugin used to live in admin/report/unsuproles,
|
||||
// we want to remove the orphaned version info unless there is a new
|
||||
// report type with the same name
|
||||
|
||||
if (!file_exists("$CFG->dirroot/report/report_unsuproles")) {
|
||||
unset_all_config_for_plugin('report_unsuproles');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user