Minors improvements
This commit is contained in:
parent
1ae99f6a85
commit
f93ce1fd7f
|
|
@ -32,11 +32,12 @@ class Config extends Base
|
|||
if ($this->config->save($values)) {
|
||||
$this->config->reload();
|
||||
$this->session->flash(t('Settings saved successfully.'));
|
||||
$this->response->redirect('?controller=config');
|
||||
}
|
||||
else {
|
||||
$this->session->flashError(t('Unable to save your settings.'));
|
||||
}
|
||||
|
||||
$this->response->redirect('?controller=config');
|
||||
}
|
||||
|
||||
$this->response->html($this->template->layout('config_index', array(
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ class Session
|
|||
{
|
||||
const SESSION_LIFETIME = 2678400;
|
||||
|
||||
public function open($base_path = '/')
|
||||
public function open($base_path = '/', $save_path = '')
|
||||
{
|
||||
if ($save_path !== '') session_save_path($save_path);
|
||||
|
||||
session_set_cookie_params(
|
||||
self::SESSION_LIFETIME,
|
||||
$base_path,
|
||||
|
|
|
|||
|
|
@ -11,10 +11,14 @@ class Config extends Base
|
|||
|
||||
public function getLanguages()
|
||||
{
|
||||
return array(
|
||||
$languages = array(
|
||||
'en_US' => t('English'),
|
||||
'fr_FR' => t('French'),
|
||||
);
|
||||
|
||||
asort($languages);
|
||||
|
||||
return $languages;
|
||||
}
|
||||
|
||||
public function get($name, $default_value = '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue