Add option to pass acceptable mime types to

MD_STD_IN::move_uploaded_file
This commit is contained in:
2021-07-20 02:04:55 +02:00
parent 6adf0ee0a2
commit d53303e617
2 changed files with 11 additions and 6 deletions

View File

@ -675,7 +675,7 @@ final class MD_STD {
*/
public static function string_to_color_code(string $str):string {
$code = substr(dechex(crc32($str)), 0, 6);
$code = \substr(\dechex(\crc32($str)), 0, 6);
return $code;
}
@ -689,11 +689,11 @@ final class MD_STD {
*/
public static function check_is_writable(string $dir):void {
if (is_dir($dir) === false) {
if (\is_dir($dir) === false) {
throw new MDFileDoesNotExist("Directory " . $dir . " does not exist");
}
if (is_writable($dir) === false) {
if (\is_writable($dir) === false) {
throw new MDFileIsNotWritable("Directory " . $dir . " is not writable");
}