| @@ 205-221 (lines=17) @@ | ||
| 202 | } |
|
| 203 | ||
| 204 | //check for public link shares |
|
| 205 | if (!$publicShare) { |
|
| 206 | $query = \OC_DB::prepare(' |
|
| 207 | SELECT `share_with` |
|
| 208 | FROM `*PREFIX*share` |
|
| 209 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 210 | ); |
|
| 211 | ||
| 212 | $result = $query->execute([$source, self::SHARE_TYPE_LINK]); |
|
| 213 | ||
| 214 | if (\OCP\DB::isError($result)) { |
|
| 215 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 216 | } else { |
|
| 217 | if ($result->fetchRow()) { |
|
| 218 | $publicShare = true; |
|
| 219 | } |
|
| 220 | } |
|
| 221 | } |
|
| 222 | ||
| 223 | //check for remote share |
|
| 224 | if (!$remoteShare) { |
|
| @@ 224-240 (lines=17) @@ | ||
| 221 | } |
|
| 222 | ||
| 223 | //check for remote share |
|
| 224 | if (!$remoteShare) { |
|
| 225 | $query = \OC_DB::prepare(' |
|
| 226 | SELECT `share_with` |
|
| 227 | FROM `*PREFIX*share` |
|
| 228 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 229 | ); |
|
| 230 | ||
| 231 | $result = $query->execute([$source, self::SHARE_TYPE_REMOTE]); |
|
| 232 | ||
| 233 | if (\OCP\DB::isError($result)) { |
|
| 234 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 235 | } else { |
|
| 236 | if ($result->fetchRow()) { |
|
| 237 | $remoteShare = true; |
|
| 238 | } |
|
| 239 | } |
|
| 240 | } |
|
| 241 | ||
| 242 | // let's get the parent for the next round |
|
| 243 | $meta = $cache->get((int)$source); |
|