remove blacklist
This commit is contained in:
parent
0a49fcf9d1
commit
acc902a0b6
|
@ -20,17 +20,13 @@ class Storage {
|
||||||
// config.php configuration:
|
// config.php configuration:
|
||||||
// - files_versions
|
// - files_versions
|
||||||
// - files_versionsfolder
|
// - files_versionsfolder
|
||||||
// - files_versionsblacklist
|
|
||||||
// - files_versionsmaxfilesize
|
// - files_versionsmaxfilesize
|
||||||
// - files_versionsinterval
|
|
||||||
// - files_versionmaxversions
|
|
||||||
//
|
//
|
||||||
// todo:
|
// todo:
|
||||||
// - finish porting to OC_FilesystemView to enable network transparency
|
// - finish porting to OC_FilesystemView to enable network transparency
|
||||||
// - add transparent compression. first test if it´s worth it.
|
// - add transparent compression. first test if it´s worth it.
|
||||||
|
|
||||||
const DEFAULTENABLED=true;
|
const DEFAULTENABLED=true;
|
||||||
const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp';
|
|
||||||
const DEFAULTMAXFILESIZE=10485760; // 10MB
|
const DEFAULTMAXFILESIZE=10485760; // 10MB
|
||||||
const DEFAULTMAXVERSIONS=50;
|
const DEFAULTMAXVERSIONS=50;
|
||||||
|
|
||||||
|
@ -79,15 +75,6 @@ class Storage {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check filetype blacklist
|
|
||||||
$blacklist=explode(' ', \OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST));
|
|
||||||
foreach($blacklist as $bl) {
|
|
||||||
$parts=explode('.', $filename);
|
|
||||||
$ext=end($parts);
|
|
||||||
if(strtolower($ext)==$bl) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// we should have a source file to work with
|
// we should have a source file to work with
|
||||||
if (!$files_view->file_exists($filename)) {
|
if (!$files_view->file_exists($filename)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue