Commit 3a5d0e95 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Fix warnings when deleting queued portfolio export. Bug 1498248"

parents 09c3a61b 5667ad99
......@@ -51,7 +51,7 @@ if ($action = param_alphanum('action', null)) {
foreach ($rowids as $rowid) {
db_begin();
// Need to relese any pending archiving
$items = get_records_select_array('export_queue_items', 'exportqueueid = ?', array($rowid), 'id');
if ($items = get_records_select_array('export_queue_items', 'exportqueueid = ?', array($rowid), 'id')) {
$views = array();
// To make sure we process the item with this id only once we keep a track of the $lastid
// We don't know if the $item will be a collection or view (or artefact possibly in the future)
......@@ -109,6 +109,7 @@ if ($action = param_alphanum('action', null)) {
log_warn('Unable to delete export queue items for ID: ' . $rowid);
db_rollback();
}
}
if (!delete_records('export_queue', 'id', $rowid)) {
log_warn('Unable to delete export queue row ID: ' . $rowid);
db_rollback();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment