MDL-51179 Atto: When a resume is aborted - create a fresh draft for future saves.
This commit is contained in:
@@ -154,6 +154,10 @@ if ($action === 'save') {
|
||||
// A response means the draft has been restored and here is the auto-saved text.
|
||||
$response['result'] = $record->drafttext;
|
||||
echo json_encode($response);
|
||||
} else {
|
||||
$DB->delete_records('editor_atto_autosave', array('id' => $record->id));
|
||||
|
||||
// No response means no error.
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user