summaryrefslogtreecommitdiffstats
path: root/lib/private/share/share.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-06 12:34:19 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-21 15:25:47 +0200
commitde348180ae257017a9a2af05dac72286bf262bed (patch)
tree3fe07523249ca6a6e91defcff781b86be031b98c /lib/private/share/share.php
parent1bfb944d515c88f915739c3b920d39d6da200d29 (diff)
downloadnextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.tar.gz
nextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.zip
Use the public interface and our method instead of the doctrine thing
Diffstat (limited to 'lib/private/share/share.php')
-rw-r--r--lib/private/share/share.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 7fcbb695c68..e3364e0de0b 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -38,7 +38,7 @@
namespace OC\Share;
use OCP\IUserSession;
-use OC\DB\Connection;
+use OCP\IDBConnection;
use OCP\IConfig;
/**
@@ -1195,13 +1195,13 @@ class Share extends Constants {
/**
* Retrieve the owner of a connection
*
- * @param Connection $connection
+ * @param IDBConnection $connection
* @param int $shareId
* @throws \Exception
* @return string uid of share owner
*/
- private static function getShareOwner(Connection $connection, $shareId) {
- $qb = $connection->createQueryBuilder();
+ private static function getShareOwner(IDBConnection $connection, $shareId) {
+ $qb = $connection->getQueryBuilder();
$qb->select('`uid_owner`')
->from('`*PREFIX*share`')
@@ -1221,15 +1221,15 @@ class Share extends Constants {
* Set expiration date for a share
*
* @param IUserSession $userSession
- * @param Connection $connection
+ * @param IDBConnection $connection
* @param IConfig $config
* @param int $shareId
* @param string $password
* @throws \Exception
* @return boolean
*/
- public static function setPassword(IUserSession $userSession,
- Connection $connection,
+ public static function setPassword(IUserSession $userSession,
+ IDBConnection $connection,
IConfig $config,
$shareId, $password) {
$user = $userSession->getUser();
@@ -1252,7 +1252,7 @@ class Share extends Constants {
throw new \Exception('Cannot remove password');
}
- $qb = $connection->createQueryBuilder();
+ $qb = $connection->getQueryBuilder();
$qb->update('`*PREFIX*share`')
->set('`share_with`', ':pass')
->where('`id` = :shareId')