修复默认统计按最新年份统计问题

This commit is contained in:
wlx 2011-12-23 03:53:08 +00:00
parent d3ceeb9aa1
commit df166ae7ed
1 changed files with 4 additions and 4 deletions

View File

@ -50,9 +50,9 @@ class Admin_StatController extends Zend_Controller_Action
function unitAction() function unitAction()
{ {
$y = $this->_request->getParam('y'); $y = (int)$this->_request->getParam('y');
if(!empty($y)||!is_numeric($y)) if(!empty($y))
{ {
$n = date("Y",time()); $n = date("Y",time());
if($y<2004 || $y>$n) if($y<2004 || $y>$n)
@ -94,9 +94,9 @@ class Admin_StatController extends Zend_Controller_Action
function monthAction(){ function monthAction(){
$y = $this->_request->getParam('y'); $y = (int)$this->_request->getParam('y');
if(!empty($y)||!is_numeric($y)) if(!empty($y))
{ {
$n = date("Y",time()); $n = date("Y",time());
if($y<2004 || $y>$n) if($y<2004 || $y>$n)