diff --git a/core/components/fileattach/elements/snippets/snippet.fileattach.php b/core/components/fileattach/elements/snippets/snippet.fileattach.php index 81c4d76..134dd0d 100644 --- a/core/components/fileattach/elements/snippets/snippet.fileattach.php +++ b/core/components/fileattach/elements/snippets/snippet.fileattach.php @@ -50,6 +50,9 @@ $offset = $modx->getOption('offset', $scriptProperties, 0); $totalVar = $modx->getOption('totalVar', $scriptProperties, 'total'); +$ext = str_replace(' ', '', $ext); +$ext = explode(",", $ext); + // Check access if ($groups != '') { // Forbid access for non-authorized visitor @@ -136,7 +139,7 @@ $itemArr['ext'] = strtolower( pathinfo($itemArr['name'], PATHINFO_EXTENSION)); - if (($ext != '') && ($ext != $itemArr['ext'])) continue; + if (($ext != '') && (in_array($itemArr['ext'], $ext)) == false) continue; } $list[] = $modx->getChunk($tpl, $itemArr);