mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUG AssetAdmin filter array indices (fixes #8014)
This commit is contained in:
parent
2227e7d152
commit
d58b23d6fa
@ -120,11 +120,13 @@ JS
|
||||
|
||||
// Category filter
|
||||
if(isset($params['AppCategory'])) {
|
||||
$exts = File::$app_categories[$params['AppCategory']];
|
||||
$exts = (isset(File::$app_categories[$params['AppCategory']])) ? File::$app_categories[$params['AppCategory']] : array();
|
||||
$categorySQLs = array();
|
||||
foreach($exts as $ext) $categorySQLs[] = '"File"."Name" LIKE \'%.' . $ext . '\'';
|
||||
// TODO Use DataList->filterAny() once OR connectives are implemented properly
|
||||
$list = $list->where('(' . implode(' OR ', $categorySQLs) . ')');
|
||||
if (count($categorySQLs) > 0) {
|
||||
$list = $list->where('(' . implode(' OR ', $categorySQLs) . ')');
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
|
Loading…
Reference in New Issue
Block a user