Browse Source

don't assign variables in if conditions

tags/v7.0.0alpha2
Bjoern Schiessle 10 years ago
parent
commit
ecde48fce8
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      lib/private/share/share.php

+ 4
- 2
lib/private/share/share.php View File

@@ -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…
Cancel
Save