| @@ 246-262 (lines=17) @@ | ||
| 243 | } |
|
| 244 | ||
| 245 | //check for public link shares |
|
| 246 | if (!$publicShare) { |
|
| 247 | $query = \OC_DB::prepare(' |
|
| 248 | SELECT `share_with` |
|
| 249 | FROM `*PREFIX*share` |
|
| 250 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 251 | ); |
|
| 252 | ||
| 253 | $result = $query->execute([$source, self::SHARE_TYPE_LINK]); |
|
| 254 | ||
| 255 | if (\OCP\DB::isError($result)) { |
|
| 256 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 257 | } else { |
|
| 258 | if ($result->fetchRow()) { |
|
| 259 | $publicShare = true; |
|
| 260 | } |
|
| 261 | } |
|
| 262 | } |
|
| 263 | ||
| 264 | //check for remote share |
|
| 265 | if (!$remoteShare) { |
|
| @@ 265-281 (lines=17) @@ | ||
| 262 | } |
|
| 263 | ||
| 264 | //check for remote share |
|
| 265 | if (!$remoteShare) { |
|
| 266 | $query = \OC_DB::prepare(' |
|
| 267 | SELECT `share_with` |
|
| 268 | FROM `*PREFIX*share` |
|
| 269 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 270 | ); |
|
| 271 | ||
| 272 | $result = $query->execute([$source, self::SHARE_TYPE_REMOTE]); |
|
| 273 | ||
| 274 | if (\OCP\DB::isError($result)) { |
|
| 275 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 276 | } else { |
|
| 277 | if ($result->fetchRow()) { |
|
| 278 | $remoteShare = true; |
|
| 279 | } |
|
| 280 | } |
|
| 281 | } |
|
| 282 | ||
| 283 | // let's get the parent for the next round |
|
| 284 | $meta = $cache->get((int)$source); |
|