aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/Watcher.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-17 10:43:23 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-11-22 11:42:53 +0100
commitea8f9a7e841061ed96f291aa3c9a413fe2402b5c (patch)
tree74097b752215fe63b583c2b239abc4f1d4d53089 /lib/private/Files/Cache/Watcher.php
parentba1af2b22e5409c62ea2bdf7eb0e13c282ed70e8 (diff)
downloadnextcloud-server-ea8f9a7e841061ed96f291aa3c9a413fe2402b5c.tar.gz
nextcloud-server-ea8f9a7e841061ed96f291aa3c9a413fe2402b5c.zip
refactor: Repalce array_search with in_array in lib/
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Files/Cache/Watcher.php')
-rw-r--r--lib/private/Files/Cache/Watcher.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php
index acc76f263dc..61ea5b2f848 100644
--- a/lib/private/Files/Cache/Watcher.php
+++ b/lib/private/Files/Cache/Watcher.php
@@ -129,7 +129,7 @@ class Watcher implements IWatcher {
* @return bool
*/
public function needsUpdate($path, $cachedData) {
- if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and array_search($path, $this->checkedPaths) === false)) {
+ if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and !in_array($path, $this->checkedPaths))) {
$this->checkedPaths[] = $path;
return $this->storage->hasUpdated($path, $cachedData['storage_mtime']);
}