* code for task#1066.
This commit is contained in:
@@ -545,12 +545,12 @@ class actionModel extends model
|
||||
*/
|
||||
public function computeBeginAndEnd($period)
|
||||
{
|
||||
$this->loadModel('todo');
|
||||
$this->loadModel('date');
|
||||
|
||||
$today = $this->todo->today();
|
||||
$tomorrow = $this->todo->tomorrow();
|
||||
$yesterday = $this->todo->yesterday();
|
||||
$twoDaysAgo = $this->todo->twoDaysAgo();
|
||||
$today = $this->date->today();
|
||||
$tomorrow = $this->date->tomorrow();
|
||||
$yesterday = $this->date->yesterday();
|
||||
$twoDaysAgo = $this->date->twoDaysAgo();
|
||||
|
||||
$period = strtolower($period);
|
||||
|
||||
@@ -564,12 +564,12 @@ class actionModel extends model
|
||||
if($period == 'thisweek' or $period == 'lastweek')
|
||||
{
|
||||
$func = "get$period";
|
||||
extract($this->todo->$func());
|
||||
extract($this->date->$func());
|
||||
return array('begin' => $begin, 'end' => $end . ' 23:59:59');
|
||||
}
|
||||
|
||||
if($period == 'thismonth') return $this->todo->getThisMonth();
|
||||
if($period == 'lastmonth') return $this->todo->getLastMonth();
|
||||
if($period == 'thismonth') return $this->date->getThisMonth();
|
||||
if($period == 'lastmonth') return $this->date->getLastMonth();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user