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.
This commit is contained in:
Thomas Keller 2010-10-14 12:13:38 +00:00
parent d171a249c5
commit b30bdc9833

View File

@ -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));
}