profile_photo: use Photo model function to get photo and image

This commit is contained in:
fabrixxm 2018-11-21 16:29:23 +01:00 committed by Hypolite Petovan
parent 3ca0b0bf9d
commit 76579e02cc
2 changed files with 11 additions and 7 deletions

View file

@ -124,7 +124,7 @@ class Photo extends BaseModule
private static function stripExtension($name)
{
$name = str_replace([".jpg", ".png", ".gif"], ["", "", ""], $name);
foreach (Image::supportedTypes() AS $m => $e) {
foreach (Image::supportedTypes() as $m => $e) {
$name = str_replace("." . $e, "", $name);
}
return $name;