diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-06 12:34:19 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-21 15:25:47 +0200 |
commit | de348180ae257017a9a2af05dac72286bf262bed (patch) | |
tree | 3fe07523249ca6a6e91defcff781b86be031b98c /lib/private | |
parent | 1bfb944d515c88f915739c3b920d39d6da200d29 (diff) | |
download | nextcloud-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')
-rw-r--r-- | lib/private/repair.php | 10 | ||||
-rw-r--r-- | lib/private/share/share.php | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/private/repair.php b/lib/private/repair.php index 166efd3eb8f..bf385af2c2b 100644 --- a/lib/private/repair.php +++ b/lib/private/repair.php @@ -103,14 +103,14 @@ class Repair extends BasicEmitter { public static function getRepairSteps() { return array( new RepairMimeTypes(), - new RepairLegacyStorages(\OC::$server->getConfig(), \OC_DB::getConnection()), + new RepairLegacyStorages(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()), new RepairConfig(), new AssetCache(), - new FillETags(\OC_DB::getConnection()), - new CleanTags(\OC_DB::getConnection()), - new DropOldTables(\OC_DB::getConnection()), + new FillETags(\OC::$server->getDatabaseConnection()), + new CleanTags(\OC::$server->getDatabaseConnection()), + new DropOldTables(\OC::$server->getDatabaseConnection()), new DropOldJobs(\OC::$server->getJobList()), - new RemoveGetETagEntries(\OC_DB::getConnection()), + new RemoveGetETagEntries(\OC::$server->getDatabaseConnection()), ); } 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') |