Do not query when the list is empty
This commit is contained in:
parent
015b9b1dac
commit
d418e176ce
|
@ -210,6 +210,7 @@ class Share extends \OC\Share\Constants {
|
|||
$fileTargetIDs = array_keys($fileTargets);
|
||||
$fileTargetIDs = array_unique($fileTargetIDs);
|
||||
|
||||
if (!empty($fileTargetIDs)) {
|
||||
$query = \OC_DB::prepare(
|
||||
'SELECT `fileid`, `path`
|
||||
FROM `*PREFIX*filecache`
|
||||
|
@ -228,6 +229,7 @@ class Share extends \OC\Share\Constants {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $sharePaths;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue