bastianallgeier/kirbycms — pull request #17 by podlebar (2012-05-10 21:14:41+00:00)
Title: patch findByExtension to work with arrays

function findByExtension didn't work right when passed extensions in a array like that: array('pdf', 'png')

with this patch you can pass a array of extensions or just a string.
i hope this is not going to break things in other places.

test like that:

snippet('filelist', array(
'extension' => array('pdf','jpg'),
'sort' => 'filename',
'direction' => 'desc'
));

snippet('filelist', array(
'extension' => array('jpg'),
'sort' => 'filename',
'direction' => 'desc'
));

snippet('filelist', array(
'extension' => 'gif',
'sort' => 'filename',
'direction' => 'desc'
));