mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Fix Core load event manager
This commit is contained in:
@@ -224,8 +224,8 @@ class Core extends \Pimple
|
||||
|
||||
protected function enableEvents()
|
||||
{
|
||||
|
||||
\phrasea::load_events();
|
||||
$events = \eventsmanager_broker::getInstance(appbox::get_instance(), $this);
|
||||
$events->start();
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -18,10 +18,10 @@ class eventsmanager_broker
|
||||
*/
|
||||
protected $core;
|
||||
|
||||
private function __construct(appbox &$appbox)
|
||||
private function __construct(appbox &$appbox, \Alchemy\Phrasea\Core $core)
|
||||
{
|
||||
$this->appbox = $appbox;
|
||||
$this->core = bootstrap::getCore();
|
||||
$this->core = $core;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -29,11 +29,11 @@ class eventsmanager_broker
|
||||
/**
|
||||
* @return eventsmanager
|
||||
*/
|
||||
public static function getInstance(appbox &$appbox)
|
||||
public static function getInstance(appbox &$appbox, \Alchemy\Phrasea\Core $core)
|
||||
{
|
||||
if (!self::$_instance)
|
||||
{
|
||||
self::$_instance = new self($appbox);
|
||||
self::$_instance = new self($appbox, $core);
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
|
@@ -269,12 +269,6 @@ class phrasea
|
||||
return $user->ACL()->get_granted_base() > 0;
|
||||
}
|
||||
|
||||
public static function load_events()
|
||||
{
|
||||
$events = eventsmanager_broker::getInstance(appbox::get_instance());
|
||||
$events->start();
|
||||
}
|
||||
|
||||
public static function use_i18n($locale, $textdomain = 'phraseanet')
|
||||
{
|
||||
$codeset = "UTF-8";
|
||||
|
Reference in New Issue
Block a user