mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00
Fixed: Folder in OPDS stay be visible when supportedExtensions is configured
This commit is contained in:
parent
2a62589537
commit
26bd6b7d79
1 changed files with 10 additions and 8 deletions
|
@ -47,16 +47,18 @@ class Files extends \OCA\Files\Helper
|
||||||
/* if set, add only files with given extensions */
|
/* if set, add only files with given extensions */
|
||||||
$fileTypes = array_filter(explode(',', strtolower(Config::get('file_types', ''))));
|
$fileTypes = array_filter(explode(',', strtolower(Config::get('file_types', ''))));
|
||||||
$skipList = array_filter(explode(',', strtolower(Config::get('skip_list', 'metadata.opf,cover.jpg'))));
|
$skipList = array_filter(explode(',', strtolower(Config::get('skip_list', 'metadata.opf,cover.jpg'))));
|
||||||
foreach ($fileInfos as $i) {
|
foreach ($fileInfos as $i) {
|
||||||
if((!empty($fileTypes)) && (!in_array(strtolower(substr(strrchr($i->getName(), "."), 1)), $fileTypes))) {
|
if (strcmp($i->getType(), 'dir') !== 0) {
|
||||||
continue;
|
if ((!empty($fileTypes)) && (!in_array(strtolower(substr(strrchr($i->getName(), "."), 1)), $fileTypes))) {
|
||||||
}
|
continue;
|
||||||
if((!empty($skipList)) && (in_array($i->getName(),$skipList))) {
|
}
|
||||||
continue;
|
if ((!empty($skipList)) && (in_array($i->getName(), $skipList))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$files[] = self::formatFileInfo($i);
|
$files[] = self::formatFileInfo($i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $files;
|
return $files;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue