diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-19 17:10:42 +0100 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-11-19 18:07:39 +0100 |
commit | f6446a64b62e964e043995f6bfeb2118a7dc489a (patch) | |
tree | 1741ae93ea6710e0a22b033b4b1e28ad715c4418 /apps/federation | |
parent | 6f7aa3392f4ec47d03164a9732842ec034aeae48 (diff) | |
download | nextcloud-server-f6446a64b62e964e043995f6bfeb2118a7dc489a.tar.gz nextcloud-server-f6446a64b62e964e043995f6bfeb2118a7dc489a.zip |
fixing OCI and others
Diffstat (limited to 'apps/federation')
-rw-r--r-- | apps/federation/api/ocsauthapi.php | 10 | ||||
-rw-r--r-- | apps/federation/appinfo/application.php | 13 | ||||
-rw-r--r-- | apps/federation/backgroundjob/getsharedsecret.php | 1 | ||||
-rw-r--r-- | apps/federation/backgroundjob/requestsharedsecret.php | 1 | ||||
-rw-r--r-- | apps/federation/lib/dbhandler.php | 4 |
5 files changed, 9 insertions, 20 deletions
diff --git a/apps/federation/api/ocsauthapi.php b/apps/federation/api/ocsauthapi.php index 3279ae1dd7b..42d7113820d 100644 --- a/apps/federation/api/ocsauthapi.php +++ b/apps/federation/api/ocsauthapi.php @@ -22,10 +22,10 @@ namespace OCA\Federation\API; -use OC\BackgroundJob\JobList; use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; use OCP\AppFramework\Http; +use OCP\BackgroundJob\IJobList; use OCP\IRequest; use OCP\Security\ISecureRandom; use OCP\Security\StringUtils; @@ -45,7 +45,7 @@ class OCSAuthAPI { /** @var ISecureRandom */ private $secureRandom; - /** @var JobList */ + /** @var IJobList */ private $jobList; /** @var TrustedServers */ @@ -55,18 +55,18 @@ class OCSAuthAPI { private $dbHandler; /** - * AuthController constructor. + * OCSAuthAPI constructor. * * @param IRequest $request * @param ISecureRandom $secureRandom - * @param JobList $jobList + * @param IJobList $jobList * @param TrustedServers $trustedServers * @param DbHandler $dbHandler */ public function __construct( IRequest $request, ISecureRandom $secureRandom, - JobList $jobList, + IJobList $jobList, TrustedServers $trustedServers, DbHandler $dbHandler ) { diff --git a/apps/federation/appinfo/application.php b/apps/federation/appinfo/application.php index 72a30f9ae0a..350b140b4dd 100644 --- a/apps/federation/appinfo/application.php +++ b/apps/federation/appinfo/application.php @@ -87,19 +87,6 @@ class Application extends \OCP\AppFramework\App { $c->query('TrustedServers') ); }); - - - $container->registerService('AuthController', function (IAppContainer $c) { - $server = $c->getServer(); - return new AuthController( - $c->getAppName(), - $server->getRequest(), - $server->getSecureRandom(), - $server->getJobList(), - $c->query('TrustedServers'), - $c->query('DbHandler') - ); - }); } private function registerMiddleware() { diff --git a/apps/federation/backgroundjob/getsharedsecret.php b/apps/federation/backgroundjob/getsharedsecret.php index dd095ed117a..88f2a51045a 100644 --- a/apps/federation/backgroundjob/getsharedsecret.php +++ b/apps/federation/backgroundjob/getsharedsecret.php @@ -23,6 +23,7 @@ namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; +use OC\BackgroundJob\JobList; use OC\BackgroundJob\QueuedJob; use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; diff --git a/apps/federation/backgroundjob/requestsharedsecret.php b/apps/federation/backgroundjob/requestsharedsecret.php index c945757818d..f5685e2e0c2 100644 --- a/apps/federation/backgroundjob/requestsharedsecret.php +++ b/apps/federation/backgroundjob/requestsharedsecret.php @@ -24,6 +24,7 @@ namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; +use OC\BackgroundJob\JobList; use OC\BackgroundJob\QueuedJob; use OCA\Federation\DbHandler; use OCA\Federation\TrustedServers; diff --git a/apps/federation/lib/dbhandler.php b/apps/federation/lib/dbhandler.php index 2b57dd75419..976a48f8b09 100644 --- a/apps/federation/lib/dbhandler.php +++ b/apps/federation/lib/dbhandler.php @@ -82,7 +82,7 @@ class DbHandler { $result = $query->execute(); if ($result) { - return $this->connection->lastInsertId($this->dbTable); + return $this->connection->lastInsertId('*PREFIX*'.$this->dbTable); } else { $message = 'Internal failure, Could not add ownCloud as trusted server: ' . $url; $message_t = $this->l->t('Could not add server'); @@ -110,7 +110,7 @@ class DbHandler { */ public function getAllServer() { $query = $this->connection->getQueryBuilder(); - $query->select('url', 'id', 'status')->from($this->dbTable); + $query->select(['url', 'id', 'status'])->from($this->dbTable); $result = $query->execute()->fetchAll(); return $result; } |