From 347bc8ad0df8de6f2372b83985b362b84a9d588e Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Wed, 30 May 2012 08:26:51 +0000 Subject: [PATCH] * code for task#804. --- module/todo/control.php | 2 +- module/todo/model.php | 6 ++---- module/todo/view/batchedit.html.php | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/module/todo/control.php b/module/todo/control.php index 6c55773d1d..b12a22e466 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -201,7 +201,7 @@ class todo extends control } } - die(js::locate($this->session->todoList)); + die(js::locate($this->session->todoList, 'parent')); } } diff --git a/module/todo/model.php b/module/todo/model.php index 16eca31920..ce35100cef 100644 --- a/module/todo/model.php +++ b/module/todo/model.php @@ -135,7 +135,6 @@ class todoModel extends model /* Adjust whether the post data is complete, if not, remove the last element of $todoIDList. */ if($this->session->showSuhosinInfo) array_pop($taskIDList); - if(!empty($todoIDList)) { /* Initialize todos from the post data. */ @@ -144,7 +143,7 @@ class todoModel extends model $todo->date = $this->post->dates[$todoID]; $todo->type = $this->post->types[$todoID]; $todo->pri = $this->post->pris[$todoID]; - $todo->name = $todo->type == 'custom' ? $this->post->names[$todoID] : ''; + $todo->name = $todo->type == 'custom' ? htmlspecialchars($this->post->names[$todoID]) : ''; $todo->begin = $this->post->begins[$todoID]; $todo->end = $this->post->ends[$todoID]; if($todo->type == 'task') $todo->idvalue = isset($this->post->tasks[$todoID]) ? $this->post->tasks[$todoID] : 0; @@ -172,8 +171,7 @@ class todoModel extends model } else { - echo js::error(dao::getError()); - die(js::locate('back')); + die(js::error('todo#' . $todoID . dao::getError(true))); } } } diff --git a/module/todo/view/batchedit.html.php b/module/todo/view/batchedit.html.php index 6ad3bef534..89fdf481be 100755 --- a/module/todo/view/batchedit.html.php +++ b/module/todo/view/batchedit.html.php @@ -12,7 +12,7 @@ ?> -
'> +'>
todo->batchEdit . $lang->colon;?>