diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 9b2954e7..5fc6fc55 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -7,6 +7,7 @@ use Pagerfanta\Adapter\DoctrineORMAdapter; | |||
7 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; | 7 | use Pagerfanta\Exception\OutOfRangeCurrentPageException; |
8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; |
9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
10 | use Symfony\Component\HttpFoundation\JsonResponse; | ||
10 | use Symfony\Component\HttpFoundation\Request; | 11 | use Symfony\Component\HttpFoundation\Request; |
11 | use Symfony\Component\Routing\Annotation\Route; | 12 | use Symfony\Component\Routing\Annotation\Route; |
12 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | 13 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
@@ -371,6 +372,11 @@ class EntryController extends Controller | |||
371 | $message = 'flashes.entry.notice.entry_archived'; | 372 | $message = 'flashes.entry.notice.entry_archived'; |
372 | } | 373 | } |
373 | 374 | ||
375 | if ($request->query->get('some_var_name')) { | ||
376 | |||
377 | return new JsonResponse($this->get('translator')->trans($message)); | ||
378 | } | ||
379 | |||
374 | $this->get('session')->getFlashBag()->add( | 380 | $this->get('session')->getFlashBag()->add( |
375 | 'notice', | 381 | 'notice', |
376 | $message | 382 | $message |
@@ -381,6 +387,8 @@ class EntryController extends Controller | |||
381 | return $this->redirect($redirectUrl); | 387 | return $this->redirect($redirectUrl); |
382 | } | 388 | } |
383 | 389 | ||
390 | |||
391 | |||
384 | /** | 392 | /** |
385 | * Changes starred status for an entry. | 393 | * Changes starred status for an entry. |
386 | * | 394 | * |