public function backup_migrate_destination_dropbox::delete_file in Backup and Migrate Dropbox 7.2
Same name and namespace in other branches
- 7.3 destinations.dropbox.inc \backup_migrate_destination_dropbox::delete_file()
File
- ./
destinations.dropbox.inc, line 330 - destinations.dropbox.inc
Class
- backup_migrate_destination_dropbox
- A destination for sending database backups to a Dropbox account.
Code
public function delete_file($file_id) {
// Smart caching: update the cache instead of clearing it.
$this->prevent_cache_clear = true;
parent::delete_file($file_id);
$files = $this
->file_cache_get();
$file_info_id = $this
->_file_info_filename($file_id);
// Was this file or its info file in the cache?
if (isset($files[$file_id]) || isset($files[$file_info_id])) {
// Yes: delete them from the cache and update the cache entry.
unset($files[$file_id]);
unset($files[$file_info_id]);
$this
->file_cache_set($files);
}
$this->prevent_cache_clear = false;
}