summaryrefslogtreecommitdiffstats
path: root/apps/files_external/service/dbconfigservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/service/dbconfigservice.php')
-rw-r--r--apps/files_external/service/dbconfigservice.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/files_external/service/dbconfigservice.php b/apps/files_external/service/dbconfigservice.php
index 76f7052c4ed..810a57963f8 100644
--- a/apps/files_external/service/dbconfigservice.php
+++ b/apps/files_external/service/dbconfigservice.php
@@ -214,6 +214,34 @@ class DBConfigService {
/**
* @param int $mountId
+ * @param string $newMountPoint
+ */
+ public function setMountPoint($mountId, $newMountPoint) {
+ $builder = $this->connection->getQueryBuilder();
+
+ $query = $builder->update('external_mounts')
+ ->set('mount_point', $builder->createNamedParameter($newMountPoint))
+ ->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, \PDO::PARAM_INT)));
+
+ $query->execute();
+ }
+
+ /**
+ * @param int $mountId
+ * @param string $newAuthBackend
+ */
+ public function setAuthBackend($mountId, $newAuthBackend) {
+ $builder = $this->connection->getQueryBuilder();
+
+ $query = $builder->update('external_mounts')
+ ->set('auth_backend', $builder->createNamedParameter($newAuthBackend))
+ ->where($builder->expr()->eq('mount_id', $builder->createNamedParameter($mountId, \PDO::PARAM_INT)));
+
+ $query->execute();
+ }
+
+ /**
+ * @param int $mountId
* @param string $key
* @param string $value
*/