Fix #1365 : Collection rename redirect to a wrong URL

This commit is contained in:
Romain Neutron
2013-07-23 17:16:54 +02:00
parent 87f37e767a
commit 50d2d94736
2 changed files with 2 additions and 1 deletions

View File

@@ -982,7 +982,7 @@ class Collection implements ControllerProviderInterface
} }
return $app->redirectPath('admin_display_collection', array( return $app->redirectPath('admin_display_collection', array(
'bas_id' => $collection->get_sbas_id(), 'bas_id' => $collection->get_base_id(),
'success' => (int) $success, 'success' => (int) $success,
'reload-tree' => 1, 'reload-tree' => 1,
)); ));

View File

@@ -351,6 +351,7 @@ class AdminCollectionTest extends \PhraseanetWebTestCaseAuthenticatedAbstract
)); ));
$this->assertTrue(self::$DI['client']->getResponse()->isRedirect()); $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'));
} }
/** /**