Skip to content
Snippets Groups Projects
Commit 7b015f55 authored by Laurent's avatar Laurent
Browse files

hotline #68975 fix article back button after save

parent 51561674
Branches
Tags
3 merge requests!2464Master,!2463Hotline master,!2458hotline #68975 fix article back button after save
Pipeline #3237 failed with stage
in 24 minutes and 44 seconds
- ticket #68975 : Retour sur les articles en mode liste après sauvegarde : correction de retour sur la catégorie de l'article
\ No newline at end of file
......@@ -67,7 +67,10 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
$this->identity->isRoleLibraryLimited()
? $this->_bib->getId()
: null);
$id_cat = $this->_getParam('id_cat', 0);
$id_cat = ($article = Class_Article::find($this->_getParam('id')))
? $article->getIdCat()
: $this->_getParam('id_cat', 0);
$params = ['page' => $this->_getParam('page', 0),
'search_value' => $search,
......
......@@ -509,3 +509,18 @@ class CmsControllerListModeSearchPostFormTest extends CmsControllerListModeTestC
$this->assertRedirectTo('/admin/cms/index/title_search/abc/order/date_maj/status_search/1');
}
}
class CmsControllerListModeBackToIndexFromArticlesConcertTest extends CmsControllerListModeTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/admin/cms/index/id/4', true);
}
/** @test */
public function breadCrumbShouldDisplayCategoryEvents() {
$this->assertXPathContentContains('//div[@class="breadcrumb"]//a[contains(@href, "id_cat/34")]', 'Evènements');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment