From cbc67dec0ef5d05e10fdd7c490888796e8b1a7af Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 30 Sep 2015 18:03:24 +0200 Subject: [PATCH] #PHRAS-741 #time 5m fix used event id to match new tense --- lib/Alchemy/Phrasea/Controller/Admin/Databox.php | 9 +++++++-- .../SearchEngine/Phrasea/PhraseaEngineSubscriber.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php b/lib/Alchemy/Phrasea/Controller/Admin/Databox.php index 2dfa87c1ae..a798578e0e 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Databox.php @@ -11,7 +11,7 @@ namespace Alchemy\Phrasea\Controller\Admin; -use Alchemy\Phrasea\Core\Event\CollectionCreateEvent; +use Alchemy\Phrasea\Core\Event\CollectionCreated; use Alchemy\Phrasea\Core\PhraseaEvents; use Silex\Application; use Silex\ControllerProviderInterface; @@ -1062,7 +1062,12 @@ class Databox implements ControllerProviderInterface } } - $app['dispatcher']->dispatch(PhraseaEvents::COLLECTION_CREATE, new CollectionCreateEvent($collection)); + $app['dispatcher']->dispatch( + PhraseaEvents::COLLECTION_CREATED, + new CollectionCreated( + $collection + ) + ); return $app->redirectPath('admin_display_collection', array('bas_id' => $collection->get_base_id(), 'success' => 1, 'reload-tree' => 1)); } catch (\Exception $e) { diff --git a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineSubscriber.php b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineSubscriber.php index 65ca76eb46..f0579814ac 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineSubscriber.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Phrasea/PhraseaEngineSubscriber.php @@ -65,7 +65,7 @@ class PhraseaEngineSubscriber implements EventSubscriberInterface { return array( PhraseaEvents::POST_AUTHENTICATE => array('onAuthenticate', 0), - PhraseaEvents::COLLECTION_CREATE => array('onCollectionCreate', 0), + PhraseaEvents::COLLECTION_CREATED => array('onCollectionCreate', 0), ); } }