mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
Merge branch 'MDL-67731' of https://github.com/paulholden/moodle
This commit is contained in:
commit
c3b26f17b9
1 changed files with 10 additions and 3 deletions
|
@ -305,10 +305,17 @@ class async_helper {
|
||||||
$tabledata = array();
|
$tabledata = array();
|
||||||
|
|
||||||
// Get relevant backup ids based on context instance id.
|
// Get relevant backup ids based on context instance id.
|
||||||
$select = 'itemid = ? AND execution = ? AND status < ? AND status > ?';
|
$select = 'itemid = :itemid AND execution = :execution AND status < :status1 AND status > :status2 ' .
|
||||||
$params = array($instanceid, backup::EXECUTION_DELAYED, backup::STATUS_FINISHED_ERR, backup::STATUS_NEED_PRECHECK);
|
'AND operation = :operation';
|
||||||
$backups = $DB->get_records_select('backup_controllers', $select, $params, 'timecreated DESC', 'id, backupid, timecreated');
|
$params = [
|
||||||
|
'itemid' => $instanceid,
|
||||||
|
'execution' => backup::EXECUTION_DELAYED,
|
||||||
|
'status1' => backup::STATUS_FINISHED_ERR,
|
||||||
|
'status2' => backup::STATUS_NEED_PRECHECK,
|
||||||
|
'operation' => 'backup',
|
||||||
|
];
|
||||||
|
|
||||||
|
$backups = $DB->get_records_select('backup_controllers', $select, $params, 'timecreated DESC', 'id, backupid, timecreated');
|
||||||
foreach ($backups as $backup) {
|
foreach ($backups as $backup) {
|
||||||
$bc = \backup_controller::load_controller($backup->backupid); // Get the backup controller.
|
$bc = \backup_controller::load_controller($backup->backupid); // Get the backup controller.
|
||||||
$filename = $bc->get_plan()->get_setting('filename')->get_value();
|
$filename = $bc->get_plan()->get_setting('filename')->get_value();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue