Добавил проверку изображения в апи постов и ещё по мелочи

This commit is contained in:
shr3dd3r committed 2023-09-07 23:05:23 +03:00
1 parent 9a4658f3ea
commit e487ed79c4
8 files changed
+49 -10

No files matched your search

+7
View File
@@ -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);
}
?>