mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-30 20:51:57 +08:00
Drawings now generate revisions, not replace
Updated drawing update test to accomodate. Image deletion system now takes revisions into account.
This commit is contained in:
@ -160,9 +160,9 @@ class ImageRepo
|
||||
* @return Image
|
||||
* @throws \BookStack\Exceptions\ImageUploadException
|
||||
*/
|
||||
public function replaceDrawingContent(Image $image, string $base64Uri)
|
||||
public function updateDrawing(Image $image, string $base64Uri)
|
||||
{
|
||||
return $this->imageService->replaceImageDataFromBase64Uri($image, $base64Uri);
|
||||
return $this->imageService->updateImageFromBase64Uri($image, $base64Uri);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -183,13 +183,14 @@ class ImageRepo
|
||||
|
||||
|
||||
/**
|
||||
* Destroys an Image object along with its files and thumbnails.
|
||||
* Destroys an Image object along with its revisions, files and thumbnails.
|
||||
* @param Image $image
|
||||
* @return bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function destroyImage(Image $image)
|
||||
{
|
||||
$this->imageService->destroyImage($image);
|
||||
$this->imageService->destroy($image);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user