summaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
diff options
context:
space:
mode:
authorrobottod <83244577+robottod@users.noreply.github.com>2021-04-26 21:53:56 +0200
committerGitHub <noreply@github.com>2021-04-26 21:53:56 +0200
commit045192799414dfbfb3d03a4982de8755e4a3a333 (patch)
tree63f14e5c5bbc0b96e84fe50ed11a42d9af1ce902 /apps/sharebymail
parent10df6b93c196bba146fc2c44d3cc04b2caf83a3d (diff)
downloadnextcloud-server-045192799414dfbfb3d03a4982de8755e4a3a333.tar.gz
nextcloud-server-045192799414dfbfb3d03a4982de8755e4a3a333.zip
Remove some deprecated calls from ShareByMailProvider.php
This moves the execute calls to the executeQuery and executeUpdate calls Resulting in less calls to deprecated functions Signed-off-by: rtod <robottod@protonmail.com>
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 166b7aae390..12c1be50272 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -642,7 +642,7 @@ class ShareByMailProvider implements IShareProvider {
->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);
}
@@ -696,7 +696,7 @@ class ShareByMailProvider implements IShareProvider {
*/
$qb->setValue('file_target', $qb->createNamedParameter(''));
- $qb->execute();
+ $qb->executeUpdate();
return $qb->getLastInsertId();
}
@@ -732,7 +732,7 @@ class ShareByMailProvider implements IShareProvider {
->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);
@@ -822,7 +822,7 @@ class ShareByMailProvider implements IShareProvider {
$qb->setFirstResult($offset);
$qb->orderBy('id');
- $cursor = $qb->execute();
+ $cursor = $qb->executeQuery();
$shares = [];
while ($data = $cursor->fetch()) {
$shares[] = $this->createShareObject($data);
@@ -843,7 +843,7 @@ class ShareByMailProvider implements IShareProvider {
->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();
@@ -873,7 +873,7 @@ class ShareByMailProvider implements IShareProvider {
->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()) {
@@ -913,7 +913,7 @@ class ShareByMailProvider implements IShareProvider {
$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);
@@ -938,7 +938,7 @@ class ShareByMailProvider implements IShareProvider {
->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();
@@ -964,7 +964,7 @@ class ShareByMailProvider implements IShareProvider {
$qb = $this->dbConnection->getQueryBuilder();
$qb->delete('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($shareId)));
- $qb->execute();
+ $qb->executeUpdate();
}
/**
@@ -1058,7 +1058,7 @@ class ShareByMailProvider implements IShareProvider {
$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();
}
/**
@@ -1093,7 +1093,7 @@ class ShareByMailProvider implements IShareProvider {
->from('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($id)));
- $cursor = $qb->execute();
+ $cursor = $qb->executeQuery();
$data = $cursor->fetch();
$cursor->closeCursor();
@@ -1135,7 +1135,7 @@ class ShareByMailProvider implements IShareProvider {
$qb->orderBy('id');
- $cursor = $qb->execute();
+ $cursor = $qb->executeQuery();
$shares = [];
while ($data = $cursor->fetch()) {
$shares[$data['fileid']][] = $this->createShareObject($data);
@@ -1164,7 +1164,7 @@ class ShareByMailProvider implements IShareProvider {
$qb->expr()->eq('item_type', $qb->createNamedParameter('folder'))
))
->setMaxResults(1);
- $cursor = $qb->execute();
+ $cursor = $qb->executeQuery();
$mail = $cursor->fetch() !== false;
$cursor->closeCursor();
@@ -1183,7 +1183,7 @@ class ShareByMailProvider implements IShareProvider {
)
);
- $cursor = $qb->execute();
+ $cursor = $qb->executeQuery();
while ($data = $cursor->fetch()) {
try {
$share = $this->createShareObject($data);