summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-26 10:15:39 +0100
committerGitHub <noreply@github.com>2018-01-26 10:15:39 +0100
commitc2b1bd92d6f6e675f7ffab420cd61c5be701c4a6 (patch)
tree10e093ff030f1436fe3862c4b1944dbcf050723d /apps/files_sharing
parentfab951e4b3d103b68b21ccb864d229c4023b57ac (diff)
parent0a56d2185e79caf81f5160cb8503955d9c3108a6 (diff)
downloadnextcloud-server-c2b1bd92d6f6e675f7ffab420cd61c5be701c4a6.tar.gz
nextcloud-server-c2b1bd92d6f6e675f7ffab420cd61c5be701c4a6.zip
Merge pull request #8063 from nextcloud/inline-value
Return value immediately instead of assigning to a one-time variable
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php4
-rw-r--r--apps/files_sharing/lib/ShareBackend/Folder.php4
2 files changed, 2 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index 575bf01fdb0..742962e6490 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -230,9 +230,7 @@ class ShareesAPIController extends OCSController {
$url = $this->urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/sharees') . '?';
}
$params['page'] = $page + 1;
- $link = '<' . $url . http_build_query($params) . '>; rel="next"';
-
- return $link;
+ return '<' . $url . http_build_query($params) . '>; rel="next"';
}
/**
diff --git a/apps/files_sharing/lib/ShareBackend/Folder.php b/apps/files_sharing/lib/ShareBackend/Folder.php
index 80b141326d3..c48a26300a2 100644
--- a/apps/files_sharing/lib/ShareBackend/Folder.php
+++ b/apps/files_sharing/lib/ShareBackend/Folder.php
@@ -73,9 +73,7 @@ class Folder extends File implements \OCP\Share_Backend_Collection {
$query = \OCP\DB::prepare('SELECT `parent` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($child));
$row = $result->fetchRow();
- $parent = $row ? $row['parent'] : null;
-
- return $parent;
+ return $row ? $row['parent'] : null;
}
public function getChildren($itemSource) {