mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Move size to pixels conversion in its own method in Util\Proxy
This commit is contained in:
parent
4462ad6bf0
commit
5004471770
3 changed files with 30 additions and 76 deletions
|
@ -211,4 +211,21 @@ class Proxy
|
|||
return $matches[1] . self::proxifyUrl(htmlspecialchars_decode($matches[2])) . $matches[3];
|
||||
}
|
||||
|
||||
public static function getPixelsFromSize(string $size): int
|
||||
{
|
||||
switch ($size) {
|
||||
case Proxy::SIZE_MICRO:
|
||||
return Proxy::PIXEL_MICRO;
|
||||
case Proxy::SIZE_THUMB:
|
||||
return Proxy::PIXEL_THUMB;
|
||||
case Proxy::SIZE_SMALL:
|
||||
return Proxy::PIXEL_SMALL;
|
||||
case Proxy::SIZE_MEDIUM:
|
||||
return Proxy::PIXEL_MEDIUM;
|
||||
case Proxy::SIZE_LARGE:
|
||||
return Proxy::PIXEL_LARGE;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue