* code for task#1066.

This commit is contained in:
zhujinyong
2013-01-06 08:12:41 +00:00
parent 0c1b21dd4d
commit b6da64af0e
13 changed files with 376 additions and 322 deletions
+8 -8
View File
@@ -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();
}
/**