mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Removed restoreDefaultAvatar method
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
241eb7b031
commit
6f3eedf5e6
|
@ -412,25 +412,5 @@ class Setting extends Model
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the default avatar back over if it's missing
|
||||
*
|
||||
* @return string
|
||||
**/
|
||||
|
||||
public static function restoreDefaultAvatar() : void {
|
||||
|
||||
if (Storage::disk('public')->missing(public_path('uploads/avatars/default.png'))) {
|
||||
\Log::debug('default avatar not found');
|
||||
try {
|
||||
Storage::disk('public')->copy(public_path('img/demo/avatars/default.png'), public_path('uploads/avatars/default.png'));
|
||||
\Log::debug('Default avatar copied back over from img/demo/default.png');
|
||||
} catch (\Exception $e) {
|
||||
\Log::debug('Could not copy default avatar. Error: '.$e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue