Skip to content

Commit 00b21d6

Browse files
committed
Update to the latest version of KB
1 parent 2600158 commit 00b21d6

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Controller/Register.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public function activate()
4141
public function create(array $values = array(), array $errors = array())
4242
{
4343
$this->response->html($this->helper->layout->app('Registration:register/create', array(
44-
'timezones' => $this->config->getTimezones(true),
45-
'languages' => $this->config->getLanguages(true),
44+
'timezones' => $this->timezone->getTimezones(true),
45+
'languages' => $this->language->getLanguages(true),
4646
'errors' => $errors,
4747
'values' => $values,
4848
'title' => t('Sign up'),

Plugin.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ class Plugin extends Base
1010
{
1111
public function initialize()
1212
{
13-
$this->on('app.bootstrap', function ($container) {
14-
Translator::load($container['config']->getCurrentLanguage(), __DIR__.'/Locale');
15-
});
16-
1713
$this->applicationAccessMap->add('Register', '*', Role::APP_PUBLIC);
1814
$this->route->addRoute('/signup', 'Register', 'create', 'Registration');
1915
$this->route->addRoute('/signup/activate/:user_id/:token', 'Register', 'activate', 'Registration');
@@ -22,6 +18,11 @@ public function initialize()
2218
$this->template->hook->attach('template:auth:login-form:after', 'Registration:auth/login');
2319
}
2420

21+
public function onStartup()
22+
{
23+
Translator::load($this->language->getCurrentLanguage(), __DIR__.'/Locale');
24+
}
25+
2526
public function getClasses()
2627
{
2728
return array(
@@ -46,7 +47,7 @@ public function getPluginAuthor()
4647

4748
public function getPluginVersion()
4849
{
49-
return '1.0.1';
50+
return '1.0.2';
5051
}
5152

5253
public function getPluginHomepage()

Test/PluginTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public function testPlugin()
1010
{
1111
$plugin = new Plugin($this->container);
1212
$this->assertSame(null, $plugin->initialize());
13+
$this->assertSame(null, $plugin->onStartup());
1314
$this->assertNotEmpty($plugin->getPluginName());
1415
$this->assertNotEmpty($plugin->getPluginDescription());
1516
$this->assertNotEmpty($plugin->getPluginAuthor());

0 commit comments

Comments
 (0)