mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-19 20:16:18 +00:00
Alias Config entity to ConfigEntity to not conflict with Craue Config
This commit is contained in:
parent
70d7c2af5f
commit
156158673f
3 changed files with 9 additions and 9 deletions
|
@ -14,7 +14,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint;
|
use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint;
|
||||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
|
||||||
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
||||||
use Wallabag\CoreBundle\Entity\RuleInterface;
|
use Wallabag\CoreBundle\Entity\RuleInterface;
|
||||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||||
|
@ -760,17 +760,17 @@ class ConfigController extends Controller
|
||||||
* Retrieve config for the current user.
|
* Retrieve config for the current user.
|
||||||
* If no config were found, create a new one.
|
* If no config were found, create a new one.
|
||||||
*
|
*
|
||||||
* @return Config
|
* @return ConfigEntity
|
||||||
*/
|
*/
|
||||||
private function getConfig()
|
private function getConfig()
|
||||||
{
|
{
|
||||||
$config = $this->getDoctrine()
|
$config = $this->getDoctrine()
|
||||||
->getRepository(Config::class)
|
->getRepository(ConfigEntity::class)
|
||||||
->findOneByUser($this->getUser());
|
->findOneByUser($this->getUser());
|
||||||
|
|
||||||
// should NEVER HAPPEN ...
|
// should NEVER HAPPEN ...
|
||||||
if (!$config) {
|
if (!$config) {
|
||||||
$config = new Config($this->getUser());
|
$config = new ConfigEntity($this->getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Tests\Wallabag\CoreBundle\Controller;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule;
|
||||||
use Wallabag\CoreBundle\Entity\Tag;
|
use Wallabag\CoreBundle\Entity\Tag;
|
||||||
|
@ -832,7 +832,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||||
|
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$config = new Config($user);
|
$config = new ConfigEntity($user);
|
||||||
|
|
||||||
$config->setTheme('material');
|
$config->setTheme('material');
|
||||||
$config->setItemsPerPage(30);
|
$config->setItemsPerPage(30);
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Tests\Wallabag\CoreBundle\Controller;
|
||||||
|
|
||||||
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
|
||||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config as ConfigEntity;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\CoreBundle\Entity\SiteCredential;
|
use Wallabag\CoreBundle\Entity\SiteCredential;
|
||||||
use Wallabag\CoreBundle\Entity\Tag;
|
use Wallabag\CoreBundle\Entity\Tag;
|
||||||
|
@ -1268,7 +1268,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
|
|
||||||
// Redirect to homepage
|
// Redirect to homepage
|
||||||
$config = $this->getLoggedInUser()->getConfig();
|
$config = $this->getLoggedInUser()->getConfig();
|
||||||
$config->setActionMarkAsRead(Config::REDIRECT_TO_HOMEPAGE);
|
$config->setActionMarkAsRead(ConfigEntity::REDIRECT_TO_HOMEPAGE);
|
||||||
$this->getEntityManager()->persist($config);
|
$this->getEntityManager()->persist($config);
|
||||||
|
|
||||||
$entry = new Entry($this->getLoggedInUser());
|
$entry = new Entry($this->getLoggedInUser());
|
||||||
|
@ -1291,7 +1291,7 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
|
|
||||||
// Redirect to current page
|
// Redirect to current page
|
||||||
$config = $this->getLoggedInUser()->getConfig();
|
$config = $this->getLoggedInUser()->getConfig();
|
||||||
$config->setActionMarkAsRead(Config::REDIRECT_TO_CURRENT_PAGE);
|
$config->setActionMarkAsRead(ConfigEntity::REDIRECT_TO_CURRENT_PAGE);
|
||||||
$this->getEntityManager()->persist($config);
|
$this->getEntityManager()->persist($config);
|
||||||
|
|
||||||
$entry = new Entry($this->getLoggedInUser());
|
$entry = new Entry($this->getLoggedInUser());
|
||||||
|
|
Loading…
Reference in a new issue