]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Controller/WallabagController.php
Convert other imports to Rabbit
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Controller / WallabagController.php
index 76ced0d2c271003ce52d933516d982d6ded1545f..1e6114c5195a4ca4a4bd2309e9d0db24f80129ea 100644 (file)
@@ -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();