mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
don't assign variables in if conditions
This commit is contained in:
parent
078fafdc5a
commit
ecde48fce8
1 changed files with 4 additions and 2 deletions
|
|
@ -923,7 +923,8 @@ class Share extends \OC\Share\Constants {
|
|||
} else {
|
||||
$fileDependent = false;
|
||||
$root = '';
|
||||
if ($includeCollections && !isset($item) && ($collectionTypes = self::getCollectionItemTypes($itemType))) {
|
||||
$collectionTypes = self::getCollectionItemTypes($itemType);
|
||||
if ($includeCollections && !isset($item) && $collectionTypes) {
|
||||
// If includeCollections is true, find collections of this item type, e.g. a music album contains songs
|
||||
if (!in_array($itemType, $collectionTypes)) {
|
||||
$itemTypes = array_merge(array($itemType), $collectionTypes);
|
||||
|
|
@ -986,7 +987,8 @@ class Share extends \OC\Share\Constants {
|
|||
}
|
||||
}
|
||||
if (isset($item)) {
|
||||
if ($includeCollections && $collectionTypes = self::getCollectionItemTypes($itemType)) {
|
||||
$collectionTypes = self::getCollectionItemTypes($itemType);
|
||||
if ($includeCollections && $collectionTypes) {
|
||||
$where .= ' AND (';
|
||||
} else {
|
||||
$where .= ' AND';
|
||||
|
|
|
|||
Loading…
Reference in a new issue