From 4496cf6df350541e7c8e6ac837237b0f7b9a0b60 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 7 Nov 2014 00:55:59 +0000 Subject: [PATCH] * fix a bug #651. --- module/my/control.php | 2 +- module/my/view/todo.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index cc7e21db48..aa3c41249d 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -88,7 +88,7 @@ class my extends control /* Assign. */ $this->view->todos = $this->loadModel('todo')->getList($type, $account, $status, 0, $pager, $orderBy); $this->view->date = (int)$type == 0 ? date(DT_DATE1) : date(DT_DATE1, strtotime($type)); - $this->view->type = is_numeric($type) ? 'byDate' : $type; + $this->view->type = $type; $this->view->recTotal = $recTotal; $this->view->recPerPage = $recPerPage; $this->view->pageID = $pageID; diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 50634840e8..cb64a3f6f9 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -25,7 +25,7 @@ } echo "
  • " . html::input('date', $date,"class='form-control form-date' onchange='changeDate(this.value)'") . '
  • '; - if($type == 'bydate') + if(is_numeric($type)) { if($date == date('Y-m-d')) {