From b30bdc9833945b782294a682fcf3d6665b921b48 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Thu, 14 Oct 2010 12:13:38 +0000 Subject: [PATCH] While for allowed upload extensions the user was hinted to the need of having to start the list with a space, here it was actually needed code-wise. I rewrote the code so the space was not needed and the documentation follows the actual behaviour. --- src/IDF/Views/Source.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/IDF/Views/Source.php b/src/IDF/Views/Source.php index 2d1b3f8..d53e644 100644 --- a/src/IDF/Views/Source.php +++ b/src/IDF/Views/Source.php @@ -533,8 +533,10 @@ class IDF_Views_Source if (0 === strpos($fileinfo[0], 'text/')) { return true; } - $ext = 'mdtext php-dist h gitignore diff patch' - .Pluf::f('idf_extra_text_ext', ''); + $ext = 'mdtext php-dist h gitignore diff patch'; + $extra_ext = trim(Pluf::f('idf_extra_text_ext', '')); + if (!empty($extra_ext)) + $ext .= ' ' . $extra_ext; $ext = array_merge(self::$supportedExtenstions, explode(' ' , $ext)); return (in_array($fileinfo[2], $ext)); }