concrete5/concrete5 — pull request #1836 by ojalehto (2014-08-26 11:19:24+00:00)
Title: Single file set doesn't get selected in File Manager dialog

Single file set doesn't get selected in File Manager dialog when using `ConcreteAssetLibraryHelper`

If only **one** `fsID` is passed to said helper (as a string or as an only value of array) it will not show up as a selected set in File Manager dialog, but it still affects the results. No set is selected, but only files in specified set will be shown.

E.g.
```php
image(
'image',
'fID[]',
t('Select image'),
null,
array(
'fsID' => array(
1
)
)
); ?>
```

When creating a select for sets in `concrete\elements\files\search_form_advanced.php` value of `$searchRequest['fsID']` is assumed to be an array and only checked via `is_array` and `in_array`. Javascript launcher for File Manager causes a single `fsID` value to be passed as a `string`.

First thought was to ensure that `fsID` is passed on as an array in said helper or while getting the searchRequest. Turns out that search results also checks for string value for `fsID` so someone else might be expecting a string value also. I ended up adding checks for string value while printing sets.