diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-18 15:06:55 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-26 12:29:19 +0200 |
commit | 0487144b2679f83f9a6b59b55561af062f692836 (patch) | |
tree | e2bd28fe000bb4fba8aed4f657ce16dbc2c40621 /lib | |
parent | b2341cdfd02b3e8ad90f8ae41320f708c3d54bb6 (diff) | |
download | nextcloud-server-0487144b2679f83f9a6b59b55561af062f692836.tar.gz nextcloud-server-0487144b2679f83f9a6b59b55561af062f692836.zip |
Remove deprecated searchByTag
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 46 | ||||
-rw-r--r-- | lib/private/Files/Cache/FailedCache.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 12 | ||||
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheWrapper.php | 12 | ||||
-rw-r--r-- | lib/private/Lockdown/Filesystem/NullCache.php | 4 | ||||
-rw-r--r-- | lib/public/Files/Cache/ICache.php | 13 |
6 files changed, 0 insertions, 91 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 []; } diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index 3207356cb76..b7845ccb88e 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -224,19 +224,6 @@ interface ICache { public function searchQuery(ISearchQuery $query); /** - * 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 - * @since 9.0.0 - * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this - */ - public function searchByTag($tag, $userId); - - /** * find a folder in the cache which has not been fully scanned * * If multiple incomplete folders are in the cache, the one with the highest id will be returned, |