From 8e93555417dddc089568b398949382ef6bb1191c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 May 2016 21:18:27 -0400 Subject: [PATCH] Update to the latest version of KB --- Plugin.php | 7 +++---- Template/config/integration.php | 4 ++-- Test/PluginTest.php | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Plugin.php b/Plugin.php index 89504f4..7d62201 100644 --- a/Plugin.php +++ b/Plugin.php @@ -14,7 +14,6 @@ class Plugin extends Base { public function initialize() { - $this->dispatcher->addListener('app.bootstrap', array($this, 'onBootstrap')); $this->dispatcher->addListener(AuthenticationManager::EVENT_SUCCESS, array($this, 'onLoginSuccess')); $this->authenticationManager->register(new GoogleAuthProvider($this->container)); @@ -31,9 +30,9 @@ public function initialize() $this->template->hook->attach('template:user:create-remote:form', 'GoogleAuth:user/create_remote'); } - public function onBootstrap() + public function onStartup() { - Translator::load($this->config->getCurrentLanguage(), __DIR__.'/Locale'); + Translator::load($this->language->getCurrentLanguage(), __DIR__.'/Locale'); } public function onLoginSuccess(AuthSuccessEvent $event) @@ -72,7 +71,7 @@ public function getPluginAuthor() public function getPluginVersion() { - return '1.0.1'; + return '1.0.2'; } public function getPluginHomepage() diff --git a/Template/config/integration.php b/Template/config/integration.php index 3bfbb48..30643c9 100644 --- a/Template/config/integration.php +++ b/Template/config/integration.php @@ -9,9 +9,9 @@ form->label(t('Google Client Secret'), 'google_client_secret') ?> form->password('google_client_secret', $values) ?> -

+

- \ No newline at end of file + diff --git a/Test/PluginTest.php b/Test/PluginTest.php index 53dbc82..9188667 100644 --- a/Test/PluginTest.php +++ b/Test/PluginTest.php @@ -10,6 +10,7 @@ public function testPlugin() { $plugin = new Plugin($this->container); $this->assertSame(null, $plugin->initialize()); + $this->assertSame(null, $plugin->onStartup()); $this->assertNotEmpty($plugin->getPluginName()); $this->assertNotEmpty($plugin->getPluginDescription()); $this->assertNotEmpty($plugin->getPluginAuthor());