From: Christian Weiske Date: Fri, 4 Jul 2014 05:39:32 +0000 (+0200) Subject: make mime_type_plaindetect work in .phar files X-Git-Tag: v0.4.0~27 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/8d4d90d445cc0b0032e0f76ab98cac5a5a29df66 make mime_type_plaindetect work in .phar files --- diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index c9f6a53..fbfea4b 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -232,7 +232,7 @@ class Repository_Post { $tmp = tempnam(sys_get_temp_dir(), 'phorkie-autodetect-'); file_put_contents($tmp, $content); - $type = \MIME_Type_PlainDetect::autoDetect($tmp); + $type = Tool_MIME_Type_PlainDetect::autoDetect($tmp); unlink($tmp); return $this->findExtForType($type); diff --git a/src/phorkie/Tool/MIME/Type/PlainDetect.php b/src/phorkie/Tool/MIME/Type/PlainDetect.php new file mode 100644 index 0000000..235046e --- /dev/null +++ b/src/phorkie/Tool/MIME/Type/PlainDetect.php @@ -0,0 +1,35 @@ +