diff --git a/html/webapp/components/escape/Text.class.php b/html/webapp/components/escape/Text.class.php index c3e1ae6..7572899 100644 --- a/html/webapp/components/escape/Text.class.php +++ b/html/webapp/components/escape/Text.class.php @@ -445,6 +445,11 @@ function _escapeWysiwygAllowHtmltag($string) { $script_flag = false; foreach ($parts as $part) { // script-/scriptまではそのまま連結 + if(preg_match("/<\/script>$/u", $part)) { + $script_flag = false; + $string .= $part; + continue; + } if(preg_match("/^/u", $part) || $script_flag == true) { $script_flag = true; if (preg_match("/<\!\-\-comment\-\->/u", $part)) { @@ -453,10 +458,6 @@ function _escapeWysiwygAllowHtmltag($string) { } $string .= $part; continue; - } else if(preg_match("/<\/script>$/u", $part)) { - $script_flag = false; - $string .= $part; - continue; } if (preg_match("/<\!\-\-comment\-\->/u", $part)) { diff --git a/html/webapp/modules/todo/action/dicon.ini b/html/webapp/modules/todo/action/dicon.ini index a22cc43..d94360c 100644 --- a/html/webapp/modules/todo/action/dicon.ini +++ b/html/webapp/modules/todo/action/dicon.ini @@ -1,3 +1,4 @@ [DIContainer] todoAction = "modules://todo.components.action" -todoView = "modules://todo.components.view" \ No newline at end of file +todoView = "modules://todo.components.view" +calendarPlanAction = "calendar.action" diff --git a/html/webapp/modules/todo/action/edit/delete/Delete.class.php b/html/webapp/modules/todo/action/edit/delete/Delete.class.php index bf49ca8..d2d0144 100644 --- a/html/webapp/modules/todo/action/edit/delete/Delete.class.php +++ b/html/webapp/modules/todo/action/edit/delete/Delete.class.php @@ -19,6 +19,7 @@ class Todo_Action_Edit_Delete extends Action // 使用コンポーネントを受け取るため var $todoAction = null; var $db = null; + var $calendarPlanAction = null; /** * Todo削除アクション @@ -27,6 +28,19 @@ class Todo_Action_Edit_Delete extends Action */ function execute() { + $whereParams = array( + "todo_id" => $this->todo_id, + "calendar_id!=0" => null + ); + $tasks = $this->db->selectExecute('todo_task', $whereParams); + if(!empty($tasks)) { + foreach($tasks as $task) { + if (!$this->calendarPlanAction->deletePlan($task["calendar_id"], CALENDAR_PLAN_EDIT_THIS)) { + return false; + } + } + } + $whereParams = array( "todo_id" => $this->todo_id ); diff --git a/html/webapp/modules/todo/action/edit/delete/maple.ini b/html/webapp/modules/todo/action/edit/delete/maple.ini index ba8de50..6bf5c35 100644 --- a/html/webapp/modules/todo/action/edit/delete/maple.ini +++ b/html/webapp/modules/todo/action/edit/delete/maple.ini @@ -6,6 +6,7 @@ key:room_id,block_id,todo_id.todo.todoExists = "1:lang._invalid_input" [Action] db = "ref:DbObject" +calendarPlanAction = "ref:calendarPlanAction" [View] success = "action:todo_view_edit_list" \ No newline at end of file