Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-38734: Automated backup failure causing all course to fail

Conflicts:
	backup/moodle2/backup_stepslib.php
  • Loading branch information...
commit 1b55bdb64413426e3cb35b52202275e86f1d03d9 1 parent f8eff10
@tlevi tlevi authored danpoltawski committed
View
1  backup/moodle2/backup_stepslib.php
@@ -39,6 +39,7 @@ protected function define_execution() {
backup_helper::check_and_create_backup_dir($this->get_backupid());// Create backup temp dir
backup_helper::clear_backup_dir($this->get_backupid(), $progress); // Empty temp dir, just in case
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60), $progress); // Delete > 4 hours temp dirs
+ backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
backup_controller_dbops::create_backup_ids_temp_table($this->get_backupid()); // Create ids temp table
$progress->end_progress();
}
View
6 backup/util/dbops/backup_controller_dbops.class.php
@@ -160,8 +160,10 @@ public static function drop_backup_ids_temp_table($backupid) {
$dbman = $DB->get_manager(); // We are going to use database_manager services
$targettablename = 'backup_ids_temp';
- $table = new xmldb_table($targettablename);
- $dbman->drop_table($table); // And drop it
+ if ($dbman->table_exists($targettablename)) {
+ $table = new xmldb_table($targettablename);
+ $dbman->drop_table($table); // And drop it
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.