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')); } /**