Skip to content
Snippets Groups Projects
Commit 2ee2494d authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch 'hotline#38336_only_index_article_on_post_edit_action' into 'stable'

Hotline#38336 only index article on post edit action

See merge request !1482
parents 7322dba9 85876f9f
Branches
Tags
9 merge requests!1587Master,!1553Master,!1519Master,!1505Stable,!1502Master,!1501Stable,!1491Master,!1490Hotline master,!1489Stable
- ticket #38336 : Administration: Correction de la version d'Imagick sur les serveurs hébergés par AFI et correction du déclenchement de l'indexaton des articles à la validation du formulaire
......@@ -33,7 +33,8 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
'successful_add' => $this->_('L\'article "%s" a été sauvegardé'),
'successful_delete' => $this->_('Article "%s" supprimé')],
'actions' => ['add' => ['title' => $this->_("Ajouter un article")]]];
'actions' => ['add' => ['title' => $this->_("Ajouter un article")]],
'after_edit' => function ($model) { $model->index(); }];
}
......@@ -47,11 +48,6 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
}
protected function _postEditAction($article) {
$article->index();
}
protected function _getBibs() {
if (0 != $this->_bib->getId())
return [$this->_bib];
......
......@@ -2061,14 +2061,14 @@ class CmsControllerArticleEditActionWithFormTest extends CmsControllerWithPermis
'description' => 'Mon article avec formulaire',
'contenu' => '<form action="/formulaire/add/id_article/5" method="POST" name="mon form">',
'debut' => '2011-03-20',
'fin' => '2011-03-28',
'fin' => '',
'events_debut' => '2011-03-27 21:00',
'events_fin' => '2011-03-28 22:30',
'cacher_titre' => 1,
'langue' => 'fr',
'tags' => 'concert;jazz',
'avis' => true,
'indexation' => false,
'indexation' => true,
'date_creation' => '2010-12-25 10:23:23',
'date_maj' => '2010-12-26 11:12:34',
'domaine_ids' => [11,12],
......@@ -2080,6 +2080,12 @@ class CmsControllerArticleEditActionWithFormTest extends CmsControllerWithPermis
}
/** @test */
public function artcile5ShouldNotBeIndexed() {
$this->assertNull(Class_Article::find(5)->getNotice());
}
/** @test */
public function emailShouldBePresentOnFourthPosition() {
$this->assertXPath("//table//tr[5]//input[@name='destination_email'][@type='email']",
......
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