Skip to content

Commit

Permalink
Update to the latest version of KB
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed May 8, 2016
1 parent 2600158 commit 00b21d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Controller/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function activate()
public function create(array $values = array(), array $errors = array())
{
$this->response->html($this->helper->layout->app('Registration:register/create', array(
'timezones' => $this->config->getTimezones(true),
'languages' => $this->config->getLanguages(true),
'timezones' => $this->timezone->getTimezones(true),
'languages' => $this->language->getLanguages(true),
'errors' => $errors,
'values' => $values,
'title' => t('Sign up'),
Expand Down
11 changes: 6 additions & 5 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ class Plugin extends Base
{
public function initialize()
{
$this->on('app.bootstrap', function ($container) {
Translator::load($container['config']->getCurrentLanguage(), __DIR__.'/Locale');
});

$this->applicationAccessMap->add('Register', '*', Role::APP_PUBLIC);
$this->route->addRoute('/signup', 'Register', 'create', 'Registration');
$this->route->addRoute('/signup/activate/:user_id/:token', 'Register', 'activate', 'Registration');
Expand All @@ -22,6 +18,11 @@ public function initialize()
$this->template->hook->attach('template:auth:login-form:after', 'Registration:auth/login');
}

public function onStartup()
{
Translator::load($this->language->getCurrentLanguage(), __DIR__.'/Locale');
}

public function getClasses()
{
return array(
Expand All @@ -46,7 +47,7 @@ public function getPluginAuthor()

public function getPluginVersion()
{
return '1.0.1';
return '1.0.2';
}

public function getPluginHomepage()
Expand Down
1 change: 1 addition & 0 deletions Test/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 00b21d6

Please sign in to comment.