]> git.agnieray.net Git - galette.git/commitdiff
Redirect on text once updated
authorJohan Cwiklinski <johan@x-tnd.be>
Sat, 24 Apr 2021 09:27:18 +0000 (11:27 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sat, 24 Apr 2021 09:27:18 +0000 (11:27 +0200)
galette/lib/Galette/Controllers/TextController.php

index df36da41b20645aeb4e42c4a3b0a4950fac40c44..d680b9554a49e683691a41ffdba5266f6ca07c49 100644 (file)
@@ -7,7 +7,7 @@
  *
  * PHP version 5
  *
- * Copyright © 2020 The Galette Team
+ * Copyright © 2020-2021 The Galette Team
  *
  * This file is part of Galette (http://galette.tuxfamily.org).
  *
@@ -28,7 +28,7 @@
  * @package   Galette
  *
  * @author    Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020 The Galette Team
+ * @copyright 2020-2021 The Galette Team
  * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
  * @version   SVN: $Id$
  * @link      http://galette.tuxfamily.org
@@ -49,7 +49,7 @@ use Analog\Analog;
  * @name      TextController
  * @package   Galette
  * @author    Johan Cwiklinski <johan@x-tnd.be>
- * @copyright 2020 The Galette Team
+ * @copyright 2020-2021 The Galette Team
  * @license   http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
  * @link      http://galette.tuxfamily.org
  * @since     Available since 0.9.4dev - 2020-06-08
@@ -174,6 +174,15 @@ class TextController extends AbstractController
 
         return $response
             ->withStatus(301)
-            ->withHeader('Location', $this->router->pathFor('texts'));
+            ->withHeader(
+                'Location',
+                $this->router->pathFor(
+                    'texts',
+                    [
+                        'lang'  => $cur_lang,
+                        'ref'   => $cur_ref
+                    ]
+                )
+            );
     }
 }