diff --git a/htdocs/application/config/stikked.php b/htdocs/application/config/stikked.php index 55b5a94..6f82e77 100755 --- a/htdocs/application/config/stikked.php +++ b/htdocs/application/config/stikked.php @@ -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 * diff --git a/htdocs/application/controllers/main.php b/htdocs/application/controllers/main.php index 4c1bb3d..724a6e4 100755 --- a/htdocs/application/controllers/main.php +++ b/htdocs/application/controllers/main.php @@ -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; }