Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public function getChildren(IShare $parent) {
->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(IShare::TYPE_EMAIL)))
->orderBy('id');

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
while ($data = $cursor->fetch()) {
$children[] = $this->createShareObject($data);
}
Expand Down Expand Up @@ -696,7 +696,7 @@ protected function addShareToDB($itemSource, $itemType, $shareWith, $sharedBy, $
*/
$qb->setValue('file_target', $qb->createNamedParameter(''));

$qb->execute();
$qb->executeUpdate();
return $qb->getLastInsertId();
}

Expand Down Expand Up @@ -732,7 +732,7 @@ public function update(IShare $share, $plainTextPassword = null) {
->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
->set('note', $qb->createNamedParameter($share->getNote()))
->set('hide_download', $qb->createNamedParameter((int)$share->getHideDownload(), IQueryBuilder::PARAM_INT))
->execute();
->executeUpdate();

if ($originalShare->getNote() !== $share->getNote() && $share->getNote() !== '') {
$this->sendNote($share);
Expand Down Expand Up @@ -822,7 +822,7 @@ public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offs
$qb->setFirstResult($offset);
$qb->orderBy('id');

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
$shares = [];
while ($data = $cursor->fetch()) {
$shares[] = $this->createShareObject($data);
Expand All @@ -843,7 +843,7 @@ public function getShareById($id, $recipientId = null) {
->where($qb->expr()->eq('id', $qb->createNamedParameter($id)))
->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(IShare::TYPE_EMAIL)));

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
$data = $cursor->fetch();
$cursor->closeCursor();

Expand Down Expand Up @@ -873,7 +873,7 @@ public function getSharesByPath(Node $path) {
->from('share')
->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($path->getId())))
->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(IShare::TYPE_EMAIL)))
->execute();
->executeQuery();

$shares = [];
while ($data = $cursor->fetch()) {
Expand Down Expand Up @@ -913,7 +913,7 @@ public function getSharedWith($userId, $shareType, $node, $limit, $offset) {
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
}

$cursor = $qb->execute();
$cursor = $qb->executeQuery();

while ($data = $cursor->fetch()) {
$shares[] = $this->createShareObject($data);
Expand All @@ -938,7 +938,7 @@ public function getShareByToken($token) {
->from('share')
->where($qb->expr()->eq('share_type', $qb->createNamedParameter(IShare::TYPE_EMAIL)))
->andWhere($qb->expr()->eq('token', $qb->createNamedParameter($token)))
->execute();
->executeQuery();

$data = $cursor->fetch();

Expand All @@ -964,7 +964,7 @@ protected function removeShareFromTable($shareId) {
$qb = $this->dbConnection->getQueryBuilder();
$qb->delete('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($shareId)));
$qb->execute();
$qb->executeUpdate();
}

/**
Expand Down Expand Up @@ -1058,7 +1058,7 @@ public function userDeleted($uid, $shareType) {
$qb->delete('share')
->where($qb->expr()->eq('share_type', $qb->createNamedParameter(IShare::TYPE_EMAIL)))
->andWhere($qb->expr()->eq('uid_owner', $qb->createNamedParameter($uid)))
->execute();
->executeUpdate();
}

/**
Expand Down Expand Up @@ -1093,7 +1093,7 @@ protected function getRawShare($id) {
->from('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($id)));

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
$data = $cursor->fetch();
$cursor->closeCursor();

Expand Down Expand Up @@ -1135,7 +1135,7 @@ public function getSharesInFolder($userId, Folder $node, $reshares) {

$qb->orderBy('id');

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
$shares = [];
while ($data = $cursor->fetch()) {
$shares[$data['fileid']][] = $this->createShareObject($data);
Expand Down Expand Up @@ -1164,7 +1164,7 @@ public function getAccessList($nodes, $currentAccess) {
$qb->expr()->eq('item_type', $qb->createNamedParameter('folder'))
))
->setMaxResults(1);
$cursor = $qb->execute();
$cursor = $qb->executeQuery();

$mail = $cursor->fetch() !== false;
$cursor->closeCursor();
Expand All @@ -1183,7 +1183,7 @@ public function getAllShares(): iterable {
)
);

$cursor = $qb->execute();
$cursor = $qb->executeQuery();
while ($data = $cursor->fetch()) {
try {
$share = $this->createShareObject($data);
Expand Down