mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Reverted work on revisions
Improved linkage of drawings and image manager. Updated image updates to create new versions.
This commit is contained in:
@ -20,23 +20,4 @@ class Image extends Ownable
|
||||
return Images::getThumbnail($this, $width, $height, $keepRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the revisions for this image.
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function revisions()
|
||||
{
|
||||
return $this->hasMany(ImageRevision::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of revisions made to this image.
|
||||
* Based off numbers on revisions rather than raw count of attached revisions
|
||||
* as they may be cleared up or revisions deleted at some point.
|
||||
* @return int
|
||||
*/
|
||||
public function revisionCount()
|
||||
{
|
||||
return intval($this->revisions()->max('revision'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user