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