diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-11 00:25:34 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-11 00:25:34 +0200 |
commit | 51e6565aab8e522e60fc2b6815c6f81697d136f9 (patch) | |
tree | dfa3176868993d872bf1341e4578622b4cbc5a7d /lib/private/preview | |
parent | 26c0007a5ff65a718abce63939b65de0cda9c7a1 (diff) | |
download | nextcloud-server-51e6565aab8e522e60fc2b6815c6f81697d136f9.tar.gz nextcloud-server-51e6565aab8e522e60fc2b6815c6f81697d136f9.zip |
only text/plain is now used to generate text previews
blacklist implementation remove because no longer needed
Diffstat (limited to 'lib/private/preview')
-rw-r--r-- | lib/private/preview/txt.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php index 77e728eb364..4c6048c6bac 100644 --- a/lib/private/preview/txt.php +++ b/lib/private/preview/txt.php @@ -9,20 +9,19 @@ namespace OC\Preview; class TXT extends Provider { - private static $blacklist = array( - 'text/calendar', - 'text/vcard', - ); - public function getMimeType() { - return '/text\/.*/'; + return '/text\/plain/'; } + /** + * @param string $path + * @param int $maxX + * @param int $maxY + * @param boolean $scalingup + * @param \OC\Files\View $fileview + * @return bool|\OC_Image + */ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { - $mimetype = $fileview->getMimeType($path); - if(in_array($mimetype, self::$blacklist)) { - return false; - } $content = $fileview->fopen($path, 'r'); $content = stream_get_contents($content); @@ -80,4 +79,4 @@ class JavaScript extends TXT { } -\OC\Preview::registerProvider('OC\Preview\JavaScript');
\ No newline at end of file +\OC\Preview::registerProvider('OC\Preview\JavaScript'); |