#PHRAS-741 #time 5m

fix used event id to match new tense
This commit is contained in:
Jean-Yves Gaulier
2015-09-30 18:03:24 +02:00
parent 7298477fc7
commit cbc67dec0e
2 changed files with 8 additions and 3 deletions

View File

@@ -11,7 +11,7 @@
namespace Alchemy\Phrasea\Controller\Admin; namespace Alchemy\Phrasea\Controller\Admin;
use Alchemy\Phrasea\Core\Event\CollectionCreateEvent; use Alchemy\Phrasea\Core\Event\CollectionCreated;
use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Core\PhraseaEvents;
use Silex\Application; use Silex\Application;
use Silex\ControllerProviderInterface; 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)); return $app->redirectPath('admin_display_collection', array('bas_id' => $collection->get_base_id(), 'success' => 1, 'reload-tree' => 1));
} catch (\Exception $e) { } catch (\Exception $e) {

View File

@@ -65,7 +65,7 @@ class PhraseaEngineSubscriber implements EventSubscriberInterface
{ {
return array( return array(
PhraseaEvents::POST_AUTHENTICATE => array('onAuthenticate', 0), PhraseaEvents::POST_AUTHENTICATE => array('onAuthenticate', 0),
PhraseaEvents::COLLECTION_CREATE => array('onCollectionCreate', 0), PhraseaEvents::COLLECTION_CREATED => array('onCollectionCreate', 0),
); );
} }
} }