We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e5a76c commit 43b7e2fCopy full SHA for 43b7e2f
lib/Db/LocksRequest.php
@@ -124,8 +124,10 @@ public function getAll(): array {
124
* @throws Exception
125
*/
126
public function getLocksOlderThan(int $timeout): array {
127
+ $now = \OC::$server->get(ITimeFactory::class)->getTime();
128
+ $oldCreationTime = $now - $timeout * 60;
129
$qb = $this->getLocksSelectSql();
- $qb->andWhere($qb->expr()->lt('l.creation', $qb->createNamedParameter($timeout * 60, IQueryBuilder::PARAM_INT)));
130
+ $qb->andWhere($qb->expr()->lt('l.creation', $qb->createNamedParameter($oldCreationTime, IQueryBuilder::PARAM_INT)));
131
132
return $this->getLocksFromRequest($qb);
133
}
0 commit comments