mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-26 18:21:02 +00:00
Use FQCN as service name for repositories
This commit is contained in:
parent
844e8e9d22
commit
0f9c359476
17 changed files with 68 additions and 50 deletions
|
@ -24,6 +24,8 @@ use Wallabag\CoreBundle\Form\Type\IgnoreOriginUserRuleType;
|
|||
use Wallabag\CoreBundle\Form\Type\TaggingRuleImportType;
|
||||
use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
|
||||
use Wallabag\CoreBundle\Form\Type\UserInformationType;
|
||||
use Wallabag\CoreBundle\Repository\EntryRepository;
|
||||
use Wallabag\CoreBundle\Repository\TagRepository;
|
||||
use Wallabag\CoreBundle\Tools\Utils;
|
||||
use Wallabag\UserBundle\Repository\UserRepository;
|
||||
|
||||
|
@ -562,7 +564,7 @@ class ConfigController extends Controller
|
|||
// manually remove tags to avoid orphan tag
|
||||
$this->removeAllTagsByUserId($this->getUser()->getId());
|
||||
|
||||
$this->get('wallabag_core.entry_repository')->removeAllByUserId($this->getUser()->getId());
|
||||
$this->get(EntryRepository::class)->removeAllByUserId($this->getUser()->getId());
|
||||
break;
|
||||
case 'archived':
|
||||
if ($this->get('doctrine')->getConnection()->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\SqlitePlatform) {
|
||||
|
@ -572,7 +574,7 @@ class ConfigController extends Controller
|
|||
// manually remove tags to avoid orphan tag
|
||||
$this->removeTagsForArchivedByUserId($this->getUser()->getId());
|
||||
|
||||
$this->get('wallabag_core.entry_repository')->removeArchivedByUserId($this->getUser()->getId());
|
||||
$this->get(EntryRepository::class)->removeArchivedByUserId($this->getUser()->getId());
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -691,7 +693,7 @@ class ConfigController extends Controller
|
|||
return;
|
||||
}
|
||||
|
||||
$this->get('wallabag_core.entry_repository')
|
||||
$this->get(EntryRepository::class)
|
||||
->removeTags($userId, $tags);
|
||||
|
||||
// cleanup orphan tags
|
||||
|
@ -713,7 +715,7 @@ class ConfigController extends Controller
|
|||
*/
|
||||
private function removeAllTagsByUserId($userId)
|
||||
{
|
||||
$tags = $this->get('wallabag_core.tag_repository')->findAllTags($userId);
|
||||
$tags = $this->get(TagRepository::class)->findAllTags($userId);
|
||||
$this->removeAllTagsByStatusAndUserId($tags, $userId);
|
||||
}
|
||||
|
||||
|
@ -724,7 +726,7 @@ class ConfigController extends Controller
|
|||
*/
|
||||
private function removeTagsForArchivedByUserId($userId)
|
||||
{
|
||||
$tags = $this->get('wallabag_core.tag_repository')->findForArchivedArticlesByUser($userId);
|
||||
$tags = $this->get(TagRepository::class)->findForArchivedArticlesByUser($userId);
|
||||
$this->removeAllTagsByStatusAndUserId($tags, $userId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue