Replace status with active in tables

This commit is contained in:
Deon George
2016-08-31 15:03:09 +10:00
parent 34e1e40f04
commit 54e4425aa8
51 changed files with 95 additions and 159 deletions

View File

@@ -31,15 +31,15 @@ class Model_Account extends lnApp_Model_Account {
);
protected $_display_filters = array(
'active'=>array(
array('StaticList_YesNo::get',array(':value',TRUE)),
),
'date_orig'=>array(
array('Site::Date',array(':value')),
),
'date_last'=>array(
array('Site::Date',array(':value')),
),
'status'=>array(
array('StaticList_YesNo::get',array(':value',TRUE)),
),
);
/** REQUIRED ABSTRACT METHODS **/

View File

@@ -19,7 +19,7 @@ class Model_Group extends Model_Auth_Role {
);
protected $_display_filters = array(
'status'=>array(
'active'=>array(
array('StaticList_YesNo::get',array(':value',TRUE)),
),
);

View File

@@ -1,55 +0,0 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* OSB Application Module Model
*
* This module must remain in applications/ as it is used very early in the
* OSB initialisation.
*
* @package OSB
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Module extends ORM {
// Relationships
protected $_has_one = array(
'record_id'=>array('model'=>'Record_ID','far_key'=>'id'),
);
protected $_has_many = array(
'module_method'=>array('far_key'=>'id'),
);
protected $_sorting = array(
'name'=>'ASC',
);
protected $_display_filters = array(
'external'=>array(
array('StaticList_YesNo::get',array(':value',TRUE)),
),
'name'=>array(
array('strtoupper',array(':value')),
),
'status'=>array(
array('StaticList_YesNo::get',array(':value',TRUE)),
),
);
/**
* Return an instance of this Module's Model
*
* @param $id PK of Model
*/
public function instance($id=NULL) {
if (! $this->loaded())
throw new Kohana_Exception('Cant call an instance of a model when it is not loaded');
return ORM::factory(Kohana::classname($this->name),$id);
}
public function list_external() {
return $this->_where_active()->where('external','=',TRUE)->find_all();
}
}
?>