X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=src%2FWallabag%2FImportBundle%2FController%2FWallabagController.php;h=1e6114c5195a4ca4a4bd2309e9d0db24f80129ea;hb=7f7531171f6e49110b5842f869e37c766a682473;hp=01883d4a67799a79c3092cdf05a9e853e6d18d7f;hpb=b787a7757ea73b9d10c14cb21758feb07dfc5885;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Controller/WallabagController.php b/src/Wallabag/ImportBundle/Controller/WallabagController.php index 01883d4a..1e6114c5 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagController.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagController.php @@ -38,6 +38,7 @@ abstract class WallabagController extends Controller $form->handleRequest($request); $wallabag = $this->getImportService(); + $wallabag->setUser($this->getUser()); if ($form->isValid()) { $file = $form->get('file')->getData(); @@ -46,7 +47,6 @@ abstract class WallabagController extends Controller if (in_array($file->getClientMimeType(), $this->getParameter('wallabag_import.allow_mimetypes')) && $file->move($this->getParameter('wallabag_import.resource_dir'), $name)) { $res = $wallabag - ->setUser($this->getUser()) ->setFilepath($this->getParameter('wallabag_import.resource_dir').'/'.$name) ->setMarkAsRead($markAsRead) ->import(); @@ -55,10 +55,10 @@ abstract class WallabagController extends Controller if (true === $res) { $summary = $wallabag->getSummary(); - $message = $this->get('translator')->trans('flashes.import.notice.summary', array( + $message = $this->get('translator')->trans('flashes.import.notice.summary', [ '%imported%' => $summary['imported'], '%skipped%' => $summary['skipped'], - )); + ]); unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); }