summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-02-11 21:40:01 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-02-12 15:11:58 +0100
commit6235175b6dba4ab416db60a21559a69db2defa83 (patch)
treece479c4e32aefe6c7730cfe7ec158cfb1f70f3d9 /apps/files
parentd2d7e37b7bf00ea7929da02459e4abb8640d064a (diff)
downloadnextcloud-server-6235175b6dba4ab416db60a21559a69db2defa83.tar.gz
nextcloud-server-6235175b6dba4ab416db60a21559a69db2defa83.zip
Make TAG_FAVORITE public
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Service/TagService.php5
-rw-r--r--apps/files/tests/Service/TagServiceTest.php4
2 files changed, 4 insertions, 5 deletions
diff --git a/apps/files/lib/Service/TagService.php b/apps/files/lib/Service/TagService.php
index a03261812b3..a477db324ac 100644
--- a/apps/files/lib/Service/TagService.php
+++ b/apps/files/lib/Service/TagService.php
@@ -24,7 +24,6 @@
namespace OCA\Files\Service;
-use OC\Tags;
use OCA\Files\Activity\FavoriteProvider;
use OCP\Activity\IManager;
use OCP\Files\Folder;
@@ -92,14 +91,14 @@ class TagService {
$newTags = array_diff($tags, $currentTags);
foreach ($newTags as $tag) {
- if ($tag === Tags::TAG_FAVORITE) {
+ if ($tag === ITags::TAG_FAVORITE) {
$this->addActivity(true, $fileId, $path);
}
$this->tagger->tagAs($fileId, $tag);
}
$deletedTags = array_diff($currentTags, $tags);
foreach ($deletedTags as $tag) {
- if ($tag === Tags::TAG_FAVORITE) {
+ if ($tag === ITags::TAG_FAVORITE) {
$this->addActivity(false, $fileId, $path);
}
$this->tagger->unTag($fileId, $tag);
diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php
index 2e0d98e1fed..7366c926b90 100644
--- a/apps/files/tests/Service/TagServiceTest.php
+++ b/apps/files/tests/Service/TagServiceTest.php
@@ -25,9 +25,9 @@
namespace OCA\Files\Tests\Service;
-use OC\Tags;
use OCA\Files\Service\TagService;
use OCP\Activity\IManager;
+use OCP\ITags;
use OCP\IUser;
use OCP\IUserSession;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -172,7 +172,7 @@ class TagServiceTest extends \Test\TestCase {
);
// set tags
- $this->tagService->updateFileTags('subdir/test.txt', [Tags::TAG_FAVORITE]);
+ $this->tagService->updateFileTags('subdir/test.txt', [ITags::TAG_FAVORITE]);
// remove tag
$this->tagService->updateFileTags('subdir/test.txt', []);