From 15ecb28d50e5b8ce4100075caa52d96d4f00ae13 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 12 Dec 2014 11:18:35 +0100 Subject: Make $userId mandatory for searchByTags $userId is now a mandatory parameter for searchByTags. Also fixed some places in the code where the argument was missing (Node API and View) --- lib/private/files/cache/cache.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/private/files/cache/cache.php') diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index a4ae3a069fe..9df64db7f07 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -512,10 +512,7 @@ class Cache { * @param string $userId owner of the tags * @return array file data */ - public function searchByTag($tag, $userId = null) { - if (is_null($userId)) { - $userId = \OC::$server->getUserSession()->getUser()->getUID(); - } + public function searchByTag($tag, $userId) { $sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, ' . '`mimetype`, `mimepart`, `size`, `mtime`, ' . '`encrypted`, `unencrypted_size`, `etag`, `permissions` ' . -- cgit v1.2.3