| @@ 217-233 (lines=17) @@ | ||
| 214 | } |
|
| 215 | ||
| 216 | //check for public link shares |
|
| 217 | if (!$publicShare) { |
|
| 218 | $query = \OC_DB::prepare(' |
|
| 219 | SELECT `share_with` |
|
| 220 | FROM `*PREFIX*share` |
|
| 221 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 222 | ); |
|
| 223 | ||
| 224 | $result = $query->execute(array($source, self::SHARE_TYPE_LINK)); |
|
| 225 | ||
| 226 | if (\OCP\DB::isError($result)) { |
|
| 227 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 228 | } else { |
|
| 229 | if ($result->fetchRow()) { |
|
| 230 | $publicShare = true; |
|
| 231 | } |
|
| 232 | } |
|
| 233 | } |
|
| 234 | ||
| 235 | //check for remote share |
|
| 236 | if (!$remoteShare) { |
|
| @@ 236-252 (lines=17) @@ | ||
| 233 | } |
|
| 234 | ||
| 235 | //check for remote share |
|
| 236 | if (!$remoteShare) { |
|
| 237 | $query = \OC_DB::prepare(' |
|
| 238 | SELECT `share_with` |
|
| 239 | FROM `*PREFIX*share` |
|
| 240 | WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1 |
|
| 241 | ); |
|
| 242 | ||
| 243 | $result = $query->execute(array($source, self::SHARE_TYPE_REMOTE)); |
|
| 244 | ||
| 245 | if (\OCP\DB::isError($result)) { |
|
| 246 | \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR); |
|
| 247 | } else { |
|
| 248 | if ($result->fetchRow()) { |
|
| 249 | $remoteShare = true; |
|
| 250 | } |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| 254 | // let's get the parent for the next round |
|
| 255 | $meta = $cache->get((int)$source); |
|