summaryrefslogtreecommitdiffstats
path: root/apps/federation/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-04 13:38:32 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-12 14:24:47 +0100
commit90d9834c8c0d3ae10cc754595d729821584e76a9 (patch)
tree7a50a81c630c835e131e9da3aaf2ac50aad2c88b /apps/federation/lib
parentdbddbb634bcb6df346988b85cb2847e76e22e632 (diff)
downloadnextcloud-server-90d9834c8c0d3ae10cc754595d729821584e76a9.tar.gz
nextcloud-server-90d9834c8c0d3ae10cc754595d729821584e76a9.zip
Decouple federation and dav app
Diffstat (limited to 'apps/federation/lib')
-rw-r--r--apps/federation/lib/dbhandler.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/federation/lib/dbhandler.php b/apps/federation/lib/dbhandler.php
index f86a8e15d80..0677430f799 100644
--- a/apps/federation/lib/dbhandler.php
+++ b/apps/federation/lib/dbhandler.php
@@ -207,14 +207,15 @@ class DbHandler {
* @param string $url
* @param int $status
*/
- public function setServerStatus($url, $status) {
+ public function setServerStatus($url, $status, $token = null) {
$hash = $this->hash($url);
$query = $this->connection->getQueryBuilder();
$query->update($this->dbTable)
- ->set('status', $query->createParameter('status'))
- ->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
- ->setParameter('url_hash', $hash)
- ->setParameter('status', $status);
+ ->set('status', $query->createNamedParameter($status))
+ ->where($query->expr()->eq('url_hash', $query->createNamedParameter($hash)));
+ if (!is_null($token)) {
+ $query->set('sync_token', $query->createNamedParameter($token));
+ }
$query->execute();
}