Update deleteSingle function in Releases class

This commit is contained in:
DariusIII
2018-12-18 09:19:45 +01:00
parent 66d7b889ef
commit 5ccae93ec2
2 changed files with 11 additions and 6 deletions
+9 -6
View File
@@ -494,15 +494,18 @@ class Releases
/**
* Deletes a single release by GUID, and all the corresponding files.
*
* @param array $identifiers ['g' => Release GUID(mandatory), 'id => ReleaseID(optional, pass false)]
* @param NZB $nzb
* @param ReleaseImage $releaseImage
* @param array $identifiers ['g' => Release GUID(mandatory), 'id => ReleaseID(optional, pass
* false)]
* @param \Blacklight\NZB $nzb
* @param \Blacklight\ReleaseImage $releaseImage
*
* @throws \Exception
*/
public function deleteSingle($identifiers, $nzb, $releaseImage): void
public function deleteSingle($identifiers, NZB $nzb, ReleaseImage $releaseImage): void
{
// Delete NZB from disk.
$nzbPath = $nzb->NZBPath($identifiers['g']);
if ($nzbPath) {
if (! empty($nzbPath)) {
File::delete($nzbPath);
}
@@ -513,7 +516,7 @@ class Releases
$this->sphinxSearch->deleteRelease($identifiers);
// Delete from DB.
Release::query()->where('guid', $identifiers['g'])->delete();
Release::whereGuid($identifiers['g'])->delete();
}
/**
+2
View File
@@ -1,3 +1,5 @@
2018-12-18 DariusIII
* Chg: Update deleteSingle function in Releases class
2018-12-17 DariusIII
* Chg: Update ProcessReleases and Releases classes in an attempt to fix deletion of unwanted releases
* Chg: Update package.json and tinymce to version 4.9.2