Misc fixes from live site
This commit is contained in:
@@ -26,16 +26,19 @@ class Model_Export_Module extends ORM_OSB {
|
||||
'display',
|
||||
);
|
||||
|
||||
public function list_export() {
|
||||
public function list_export($days=NULL) {
|
||||
if (! is_numeric($days))
|
||||
$days = 90;
|
||||
|
||||
$o = $this->module->module();
|
||||
|
||||
return $o
|
||||
return $o
|
||||
->select(array($this->export_item->table_name().'.date_orig','exported'))
|
||||
->join($this->export_item->table_name(),'LEFT OUTER')
|
||||
->on($this->export_item->table_name().'.site_id','=',$o->table_name().'.site_id') // @todo This should be automatic
|
||||
->on($this->export_item->table_name().'.item_id','=',$o->table_name().'.id')
|
||||
->on('export_module_id','=',$this->id)
|
||||
->where($o->table_name().'.date_orig','>=',time()-86400*90)
|
||||
->where($o->table_name().'.date_orig','>=',time()-86400*$days)
|
||||
->find_all();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user