Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DbLock.php')
-rw-r--r--lib/DbLock.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/DbLock.php b/lib/DbLock.php
index 791c8ed..45a511c 100644
--- a/lib/DbLock.php
+++ b/lib/DbLock.php
@@ -54,10 +54,8 @@ class DbLock implements ILock
*/
public function stillLocked()
{
- $sql = "SELECT `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid`='ojsxc' AND `configkey`='longpolling'";
- $q = $this->con->prepare($sql);
- $q->execute([$this->userId]);
- $r = $q->fetch();
- return $r['configvalue'] === $this->pollingId;
+ $storedPollingId = $this->config->getUserValue($this->userId, 'ojsxc', 'longpolling');
+
+ return $storedPollingId === $this->pollingId;
}
}