aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-05-29 13:12:30 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-05-29 13:12:30 +0200
commit672811c103a352ecb4bc33c2071b9b4493398b30 (patch)
tree632ed772f67ab4fd794a67150d5cb6d9eb6c4cb8 /lib/public
parentb44192f3668ae2e8e9685479fa62a78cfc5500ba (diff)
downloadnextcloud-server-672811c103a352ecb4bc33c2071b9b4493398b30.tar.gz
nextcloud-server-672811c103a352ecb4bc33c2071b9b4493398b30.zip
if one public link share was found, we don't have to check it for the other folders
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 58e6131af58..558efb49c0b 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -185,24 +185,26 @@ class Share {
}
//check for public link shares
- $query = \OC_DB::prepare(
- 'SELECT share_with
+ if (!$publicShare) {
+ $query = \OC_DB::prepare(
+ 'SELECT share_with
FROM
`*PREFIX*share`
WHERE
item_source = ? AND share_type = ?'
- );
+ );
- $result = $query->execute(array($source, self::SHARE_TYPE_LINK));
+ $result = $query->execute(array($source, self::SHARE_TYPE_LINK));
- if (\OC_DB::isError($result)) {
- \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
- }
+ if (\OC_DB::isError($result)) {
+ \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result), \OC_Log::ERROR);
+ }
- if ($result->fetchRow()) {
- $publicShare = true;
+ if ($result->fetchRow()) {
+ $publicShare = true;
+ }
}
-
+
// let's get the parent for the next round
$meta = $cache->get((int)$source);
$parent = $meta['parent'];