aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-11-01 16:46:38 +0100
committerJulius Härtl <jus@bitgrid.net>2018-11-02 12:10:49 +0100
commit77b95ccd12bb946cba96486d859b8241649868ca (patch)
tree1aa1b4cf1a02d6c5ec9ee3d3b603d26c6a9e54ca /lib/private/Share20
parent0fc8a0f58eebc9bdac5544c114517f397838b38e (diff)
downloadnextcloud-server-77b95ccd12bb946cba96486d859b8241649868ca.tar.gz
nextcloud-server-77b95ccd12bb946cba96486d859b8241649868ca.zip
revert tests
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 53fd1728b81..3bdbc69e897 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -617,10 +617,10 @@ class DefaultShareProvider implements IShareProvider {
/**
* Reshares for this user are shares where they are the owner.
*/
- if ($node === null) {
- if ($reshares === false) {
- $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)));
- } else {
+ if ($reshares === false) {
+ $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)));
+ } else {
+ if ($node === null) {
$qb->andWhere(
$qb->expr()->orX(
$qb->expr()->eq('uid_owner', $qb->createNamedParameter($userId)),
@@ -628,7 +628,9 @@ class DefaultShareProvider implements IShareProvider {
)
);
}
- } else {
+ }
+
+ if ($node !== null) {
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
}