diff --git a/module/my/view/m.todo.html.php b/module/my/view/m.todo.html.php
index 438a78e325..1756a99304 100755
--- a/module/my/view/m.todo.html.php
+++ b/module/my/view/m.todo.html.php
@@ -26,7 +26,11 @@
createLink('todo', 'view', "todoID=$todo->id&from=my"), '#' . $todo->id . ' ' . $todo->name)?>
begin))
+if($todo->status == 'done')
+{
+ echo $lang->todo->finish;
+}
+elseif(empty($todo->begin))
{
echo $lang->todo->lblDisableDate;
}
diff --git a/module/todo/control.php b/module/todo/control.php
index 4bc776bba1..2b0911f205 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -329,9 +329,9 @@ class todo extends control
* @access public
* @return void
*/
- public function import2Today()
+ public function import2Today($todoID = 0)
{
- $todoIDList = $this->post->todoIDList;
+ $todoIDList = $_POST ? $this->post->todoIDList : array($todoID);
$today = date::today();
$this->dao->update(TABLE_TODO)->set('date')->eq($today)->where('id')->in($todoIDList)->exec();
die(js::locate($this->session->todoList));
diff --git a/module/todo/view/m.view.html.php b/module/todo/view/m.view.html.php
index 34d05da41a..836cc9d28e 100755
--- a/module/todo/view/m.view.html.php
+++ b/module/todo/view/m.view.html.php
@@ -32,6 +32,10 @@
$browseLink = $this->createLink('my', 'todo');
}
if(common::hasPriv('todo', 'finish') and $todo->status != 'done') echo '' . html::a($this->createLink('todo', 'finish', "id=$todo->id"), $lang->todo->finish, 'hiddenwin') . '';
+ if($todo->account == $app->user->account and common::hasPriv('todo', 'import2Today') and $todo->date != date('Ymd'))
+ {
+ echo '' . html::a($this->createLink('todo', 'import2Today', "todoID=$todo->id"), $lang->todo->import2Today, 'hiddenwin') . '';
+ }
if($todo->account == $app->user->account and common::hasPriv('todo', 'delete'))
{
echo '' . html::a($this->createLink('todo', 'delete', "todoID=$todo->id"), $lang->delete, 'hiddenwin') . '';