From 50d2d947366fa09ec182b2953b6d1b3e8a0b400c Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 23 Jul 2013 17:16:54 +0200 Subject: [PATCH] Fix #1365 : Collection rename redirect to a wrong URL --- lib/Alchemy/Phrasea/Controller/Admin/Collection.php | 2 +- .../Tests/Phrasea/Controller/Admin/AdminCollectionTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Collection.php b/lib/Alchemy/Phrasea/Controller/Admin/Collection.php index e0afae97fd..8204e58506 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Collection.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Collection.php @@ -982,7 +982,7 @@ class Collection implements ControllerProviderInterface } return $app->redirectPath('admin_display_collection', array( - 'bas_id' => $collection->get_sbas_id(), + 'bas_id' => $collection->get_base_id(), 'success' => (int) $success, 'reload-tree' => 1, )); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminCollectionTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminCollectionTest.php index 8fcad117a6..cf77544c78 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminCollectionTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/AdminCollectionTest.php @@ -351,6 +351,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract )); $this->assertTrue(self::$DI['client']->getResponse()->isRedirect()); + $this->assertEquals('/admin/collection/' . $collection->get_base_id() . '/?success=1&reload-tree=1', self::$DI['client']->getResponse()->headers->get('location')); } /**