Language ID rework
This commit is contained in:
@@ -20,6 +20,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
);
|
||||
protected $_has_one = array(
|
||||
'affiliate' => array('far_key'=>'id'),
|
||||
'language'=>array('foreign_key'=>'id','far_key'=>'language_id'),
|
||||
);
|
||||
|
||||
protected $_display_filters = array(
|
||||
@@ -60,11 +61,6 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
return StaticList_Module::form($name,'country',$this->country_id,'id','name',array('active'=>'=:1'),FALSE,array('class'=>'form_button'));
|
||||
}
|
||||
|
||||
public function language($name) {
|
||||
// @todo To setup
|
||||
return 'en';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the groups that an account belongs to
|
||||
*/
|
||||
|
16
application/classes/model/language.php
Normal file
16
application/classes/model/language.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* OSB Language Model
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Modules
|
||||
* @category Models
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Model_Language extends ORMOSB {
|
||||
protected $_form = array('id'=>'id','value'=>'name');
|
||||
}
|
||||
?>
|
@@ -19,6 +19,7 @@ class Model_Setup extends ORMOSB {
|
||||
|
||||
protected $_has_one = array(
|
||||
'country'=>array('foreign_key'=>'id','far_key'=>'country_id'),
|
||||
'language'=>array('foreign_key'=>'id','far_key'=>'language_id'),
|
||||
);
|
||||
|
||||
public function rules() {
|
||||
|
Reference in New Issue
Block a user