diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-03 17:27:26 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-25 17:47:24 +0100 |
commit | ecde48fce8b0cc580161da539b44899c406cd10d (patch) | |
tree | b84b80f2f151e452fa01104302f321c366a4dfa3 /lib/private/share | |
parent | 078fafdc5ace1981a9e5582ac66cc087a1277aed (diff) | |
download | nextcloud-server-ecde48fce8b0cc580161da539b44899c406cd10d.tar.gz nextcloud-server-ecde48fce8b0cc580161da539b44899c406cd10d.zip |
don't assign variables in if conditions
Diffstat (limited to 'lib/private/share')
-rw-r--r-- | lib/private/share/share.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 48dd3cd68ea..69d93797ba0 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -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'; |