how to get a list of all file sets
Permalink
I have several file sets and I need to sit in a loop and search each set for particular files (images in this case).
To get the list of file set names I used:
$filesets = FileSet::getMySets($user = false);
This works fine as long as I'm logged in to C5 as admin, but when I log out it seems getMySets produces nothing.
Any clues why this would be the case? I should have thought "$user = false" would remove any user dependencies. Is there another way to get a list of file sets?
Thank you.
To get the list of file set names I used:
$filesets = FileSet::getMySets($user = false);
This works fine as long as I'm logged in to C5 as admin, but when I log out it seems getMySets produces nothing.
Any clues why this would be the case? I should have thought "$user = false" would remove any user dependencies. Is there another way to get a list of file sets?
Thank you.
Something like:
getMySets() takes into consideration users, etc, while the get function of FileSetList is just a simple retrieval. Have a look at: /concrete/core/models/file_set.php
(I haven't tried the above, but I'm pretty sure that's the way to do it)