コード例 #1
0
ファイル: sharedstorage.php プロジェクト: GitHubUser4234/core
 /**
  * @param string $path
  */
 public function setMountPoint($path)
 {
     $this->superShare->setTarget($path);
     foreach ($this->groupedShares as $share) {
         $share->setTarget($path);
     }
 }
コード例 #2
0
ファイル: defaultshareprovider.php プロジェクト: gvde/core
 /**
  * Resolve a group share to a user specific share
  * Thus if the user moved their group share make sure this is properly reflected here.
  *
  * @param \OCP\Share\IShare $share
  * @param string $userId
  * @return Share Returns the updated share if one was found else return the original share.
  */
 private function resolveGroupShare(\OCP\Share\IShare $share, $userId)
 {
     $qb = $this->dbConn->getQueryBuilder();
     $stmt = $qb->select('*')->from('share')->where($qb->expr()->eq('parent', $qb->createNamedParameter($share->getId())))->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE_USERGROUP)))->andWhere($qb->expr()->eq('share_with', $qb->createNamedParameter($userId)))->setMaxResults(1)->execute();
     $data = $stmt->fetch();
     $stmt->closeCursor();
     if ($data !== false) {
         $share->setPermissions((int) $data['permissions']);
         $share->setTarget($data['file_target']);
     }
     return $share;
 }
コード例 #3
0
ファイル: sharedmount.php プロジェクト: stweil/owncloud-core
 /**
  * update fileTarget in the database if the mount point changed
  *
  * @param string $newPath
  * @param \OCP\Share\IShare $share
  * @return bool
  */
 private function updateFileTarget($newPath, &$share)
 {
     $share->setTarget($newPath);
     \OC::$server->getShareManager()->moveShare($share, $this->user);
 }
コード例 #4
0
 /**
  * @param string $path
  */
 public function setMountPoint($path)
 {
     $this->newShare->setTarget($path);
 }