aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:09 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:09 +0100
commit5432f6150939af6e7d2e8bf0faea0576491aaed0 (patch)
treee8c3a6b8b878ee2eb8a07b7001e28d0750e7a80b /src/Wallabag/CoreBundle/Controller
parent00a051add470637f69584c9753dada9ee9f760de (diff)
parent0cf434c00fafb36a6fb07e2c3e43de89038da33e (diff)
downloadwallabag-5432f6150939af6e7d2e8bf0faea0576491aaed0.tar.gz
wallabag-5432f6150939af6e7d2e8bf0faea0576491aaed0.tar.zst
wallabag-5432f6150939af6e7d2e8bf0faea0576491aaed0.zip
Merge pull request #1546 from wallabag/v2-reload-content
v2 – Ability to reload an entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index b437e029..fa580133 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -267,6 +267,33 @@ class EntryController extends Controller
267 } 267 }
268 268
269 /** 269 /**
270 * Reload an entry.
271 * Refetch content from the website and make it readable again.
272 *
273 * @param Entry $entry
274 *
275 * @Route("/reload/{id}", requirements={"id" = "\d+"}, name="reload_entry")
276 *
277 * @return \Symfony\Component\HttpFoundation\RedirectResponse
278 */
279 public function reloadAction(Entry $entry)
280 {
281 $this->checkUserAction($entry);
282
283 $message = 'Entry reloaded';
284 if (false === $this->updateEntry($entry)) {
285 $message = 'Failed to reload entry';
286 }
287
288 $this->get('session')->getFlashBag()->add(
289 'notice',
290 $message
291 );
292
293 return $this->redirect($this->generateUrl('view', array('id' => $entry->getId())));
294 }
295
296 /**
270 * Changes read status for an entry. 297 * Changes read status for an entry.
271 * 298 *
272 * @param Request $request 299 * @param Request $request