Skip to content

Commit

Permalink
Merge branch 'MDL-38734-24' of git://github.com/danpoltawski/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_24_STABLE
  • Loading branch information
Damyon Wiese committed Oct 30, 2013
2 parents c3673c5 + 8beb495 commit 7b8dba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions backup/moodle2/backup_stepslib.php
Expand Up @@ -37,6 +37,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()); // Empty temp dir, just in case
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60)); // 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
}
}
Expand Down
6 changes: 4 additions & 2 deletions backup/util/dbops/backup_controller_dbops.class.php
Expand Up @@ -164,8 +164,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
}
}

/**
Expand Down

0 comments on commit 7b8dba0

Please sign in to comment.