mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
configurable default language
This commit is contained in:
parent
4bded6738f
commit
4ae7e3cb1d
@ -54,6 +54,14 @@ $config['cron_key'] = '';
|
||||
**/
|
||||
$config['per_page'] = 10;
|
||||
|
||||
/**
|
||||
* Default language
|
||||
*
|
||||
* Preselected language. See application/config/geshi_languages.php for valid values (array keys)
|
||||
*
|
||||
**/
|
||||
$config['default_language'] = 'text';
|
||||
|
||||
/**
|
||||
* Name for anonymous poster
|
||||
*
|
||||
|
@ -124,7 +124,7 @@ class Main extends CI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
function _form_prep($lang = 'php', $title = '', $paste = '', $reply = false)
|
||||
function _form_prep($lang = false, $title = '', $paste = '', $reply = false)
|
||||
{
|
||||
$this->load->model('languages');
|
||||
$this->load->helper('form');
|
||||
@ -147,7 +147,12 @@ class Main extends CI_Controller
|
||||
$data['title_set'] = $title;
|
||||
$data['reply'] = $reply;
|
||||
|
||||
if ($lang != 'php' or ($lang == 'php' and $this->db_session->userdata('lang') == false))
|
||||
if (!$lang)
|
||||
{
|
||||
$lang = $this->config->item('default_language');
|
||||
}
|
||||
|
||||
if ($this->db_session->userdata('lang') == false)
|
||||
{
|
||||
$data['lang_set'] = $lang;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user