Добавил проверку изображения в апи постов и ещё по мелочи
This commit is contained in:
@@ -18,4 +18,11 @@ function GenerateRandomString (int $length, string $keyspace = "abcdefghijklmnop
|
||||
return implode('', $pieces);
|
||||
}
|
||||
|
||||
// Get aspect ratio from width and height
|
||||
function GetAspectRatio ($x, $y) {
|
||||
if ($x === $y)
|
||||
return 1;
|
||||
return max($x, $y) / min($x, $y);
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user