diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/lib/Service/TagService.php | 5 | ||||
-rw-r--r-- | apps/files/tests/Service/TagServiceTest.php | 4 |
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', []); |