fixing OCI and others

remotes/origin/fix-delete-homeidr-on-userdelete
Thomas Müller 9 years ago committed by Björn Schießle
parent 6f7aa3392f
commit f6446a64b6
  1. 10
      apps/federation/api/ocsauthapi.php
  2. 13
      apps/federation/appinfo/application.php
  3. 1
      apps/federation/backgroundjob/getsharedsecret.php
  4. 1
      apps/federation/backgroundjob/requestsharedsecret.php
  5. 4
      apps/federation/lib/dbhandler.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
) {

@ -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() {

@ -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;

@ -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;

@ -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;
}

Loading…
Cancel
Save