aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-07-26 15:07:04 +0200
committerGitHub <noreply@github.com>2019-07-26 15:07:04 +0200
commitcdc43cd39b6681613233ea5438cd421a126055a0 (patch)
tree81552da33bdfa0dab6895f9a582873139aecb8f9 /lib/private
parent323f40a49374af02feca7d21da986b36a7d559e2 (diff)
parent0487144b2679f83f9a6b59b55561af062f692836 (diff)
downloadnextcloud-server-cdc43cd39b6681613233ea5438cd421a126055a0.tar.gz
nextcloud-server-cdc43cd39b6681613233ea5438cd421a126055a0.zip
Merge pull request #16456 from nextcloud/dep/searchByTag
Remove deprecated searchByTag
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Cache/Cache.php46
-rw-r--r--lib/private/Files/Cache/FailedCache.php4
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php12
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheWrapper.php12
-rw-r--r--lib/private/Lockdown/Filesystem/NullCache.php4
5 files changed, 0 insertions, 78 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 6843c3166ae..6958e07be56 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -724,52 +724,6 @@ class Cache implements ICache {
}
/**
- * Search for files by tag of a given users.
- *
- * Note that every user can tag files differently.
- *
- * @param string|int $tag name or tag id
- * @param string $userId owner of the tags
- * @return ICacheEntry[] file data
- */
- public function searchByTag($tag, $userId) {
- $sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, ' .
- '`mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`, ' .
- '`encrypted`, `etag`, `permissions`, `checksum` ' .
- 'FROM `*PREFIX*filecache` `file`, ' .
- '`*PREFIX*vcategory_to_object` `tagmap`, ' .
- '`*PREFIX*vcategory` `tag` ' .
- // JOIN filecache to vcategory_to_object
- 'WHERE `file`.`fileid` = `tagmap`.`objid` ' .
- // JOIN vcategory_to_object to vcategory
- 'AND `tagmap`.`type` = `tag`.`type` ' .
- 'AND `tagmap`.`categoryid` = `tag`.`id` ' .
- // conditions
- 'AND `file`.`storage` = ? ' .
- 'AND `tag`.`type` = \'files\' ' .
- 'AND `tag`.`uid` = ? ';
- if (is_int($tag)) {
- $sql .= 'AND `tag`.`id` = ? ';
- } else {
- $sql .= 'AND `tag`.`category` = ? ';
- }
- $result = $this->connection->executeQuery(
- $sql,
- [
- $this->getNumericStorageId(),
- $userId,
- $tag
- ]
- );
-
- $files = $result->fetchAll();
-
- return array_map(function (array $data) {
- return self::cacheEntryFromData($data, $this->mimetypeLoader);
- }, $files);
- }
-
- /**
* Re-calculate the folder size and the size of all parent folders
*
* @param string|boolean $path
diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php
index b64d66dc697..8fb1623894c 100644
--- a/lib/private/Files/Cache/FailedCache.php
+++ b/lib/private/Files/Cache/FailedCache.php
@@ -115,10 +115,6 @@ class FailedCache implements ICache {
return [];
}
- public function searchByTag($tag, $userId) {
- return [];
- }
-
public function searchQuery(ISearchQuery $query) {
return [];
}
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index 7e113d13678..44402e3382a 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -248,18 +248,6 @@ class CacheJail extends CacheWrapper {
}
/**
- * search for files by mimetype
- *
- * @param string|int $tag name or tag id
- * @param string $userId owner of the tags
- * @return array
- */
- public function searchByTag($tag, $userId) {
- $results = $this->getCache()->searchByTag($tag, $userId);
- return $this->formatSearchResults($results);
- }
-
- /**
* update the folder size and the size of all parent folders
*
* @param string|boolean $path
diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
index 223e678f323..6d7f1876e29 100644
--- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php
+++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php
@@ -241,18 +241,6 @@ class CacheWrapper extends Cache {
}
/**
- * search for files by tag
- *
- * @param string|int $tag name or tag id
- * @param string $userId owner of the tags
- * @return ICacheEntry[] file data
- */
- public function searchByTag($tag, $userId) {
- $results = $this->getCache()->searchByTag($tag, $userId);
- return array_map(array($this, 'formatCacheEntry'), $results);
- }
-
- /**
* update the folder size and the size of all parent folders
*
* @param string|boolean $path
diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php
index d45d1781abe..6ac02abb740 100644
--- a/lib/private/Lockdown/Filesystem/NullCache.php
+++ b/lib/private/Lockdown/Filesystem/NullCache.php
@@ -111,10 +111,6 @@ class NullCache implements ICache {
return [];
}
- public function searchByTag($tag, $userId) {
- return [];
- }
-
public function getIncomplete() {
return [];
}