diff --git a/module/bug/control.php b/module/bug/control.php index a445626d66..242dda23fc 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -534,13 +534,6 @@ class bug extends control } } - /* 删除一个文件。*/ - public function deleteFile($fileID) - { - $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); - die(js::reload('parent')); - } - /* 保存模板。*/ public function saveTemplate() { diff --git a/module/doc/control.php b/module/doc/control.php index 416643bc3b..97b90b71b2 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -298,18 +298,4 @@ class doc extends control die(js::locate($this->session->docList, 'parent')); } } - - /* 删除一个文件。*/ - public function deleteFile($fileID, $confirm = 'no') - { - if($confirm == 'no') - { - die(js::confirm($this->lang->doc->confirmDelete, inlink('deleteFile', "fileID=$fileID&confirm=yes"))); - } - else - { - $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); - die(js::reload('parent')); - } - } } diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 26c4a585e6..53015390d1 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -65,5 +65,4 @@ $lang->doc->types['url'] = 'Link'; $lang->doc->types['text'] = 'Html'; $lang->doc->confirmDeleteLib = " Are you sure to delete this doc library?"; -$lang->doc->confirmDelete = " Are you sure to delete this doc?"; $lang->doc->errorEditSystemDoc = "System doc library needn't edit"; diff --git a/module/doc/lang/ja.php b/module/doc/lang/ja.php index 8e719b4831..a6ca1b0efd 100644 --- a/module/doc/lang/ja.php +++ b/module/doc/lang/ja.php @@ -65,5 +65,4 @@ $lang->doc->types['url'] = 'リンク'; $lang->doc->types['text'] = 'HTML形式'; $lang->doc->confirmDeleteLib = "あなたは、このドキュメントライブラリを削除しますか?"; -$lang->doc->confirmDelete = "あなたはこのドキュメントを削除しますか?"; $lang->doc->errorEditSystemDoc = "システムドキュメントライブラリは必要はない編集"; diff --git a/module/doc/lang/ko.php b/module/doc/lang/ko.php index 5d8e270cec..758fb48319 100644 --- a/module/doc/lang/ko.php +++ b/module/doc/lang/ko.php @@ -65,5 +65,4 @@ $lang->doc->types['url'] = '링크'; $lang->doc->types['text'] = 'html로'; $lang->doc->confirmDeleteLib = "당신이 의사 라이브러리를 삭제하시겠습니까?"; -$lang->doc->confirmDelete = "당신이 의사를 삭제하시겠습니까?"; $lang->doc->errorEditSystemDoc = "시스템 의사 도서관은 필요 없어 편집"; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index 257d74ce6e..c51492e162 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -65,5 +65,4 @@ $lang->doc->types['url'] = '链接'; $lang->doc->types['text'] = '网页'; $lang->doc->confirmDeleteLib = " 您确定删除该文档库吗?"; -$lang->doc->confirmDelete = " 您确定删除该文档吗?"; $lang->doc->errorEditSystemDoc = "系统文档库无需修改。"; diff --git a/module/doc/lang/zh-tw.php b/module/doc/lang/zh-tw.php index f93ef66664..31e4a39ee5 100644 --- a/module/doc/lang/zh-tw.php +++ b/module/doc/lang/zh-tw.php @@ -65,5 +65,4 @@ $lang->doc->types['url'] = '鏈接'; $lang->doc->types['text'] = '網頁'; $lang->doc->confirmDeleteLib = " 您確定刪除該文檔庫嗎?"; -$lang->doc->confirmDelete = " 您確定刪除該文檔嗎?"; $lang->doc->errorEditSystemDoc = "系统文档库不需要修改"; diff --git a/module/file/control.php b/module/file/control.php index a72624f3da..05743f2546 100644 --- a/module/file/control.php +++ b/module/file/control.php @@ -92,4 +92,18 @@ class file extends control echo $csvData; die(); } + + /* 删除一个文件。*/ + public function deleteFile($fileID, $confirm = 'no') + { + if($confirm == 'no') + { + die(js::confirm($this->lang->file->confirmDelete, inlink('deleteFile', "fileID=$fileID&confirm=yes"))); + } + else + { + $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); + die(js::reload('parent')); + } + } } diff --git a/module/file/lang/zh-cn.php b/module/file/lang/zh-cn.php index 3c0a4979d2..13330f825e 100644 --- a/module/file/lang/zh-cn.php +++ b/module/file/lang/zh-cn.php @@ -24,4 +24,6 @@ $lang->file->common = '附件'; $lang->file->download = '下载附件'; $lang->file->export2CSV = '导出CSV'; -$lang->file->label = '标题:'; +$lang->file->label = '标题:'; + +$lang->file->confirmDelete = " 您确定删除该附件吗?"; diff --git a/module/file/view/download.html.php b/module/file/view/download.html.php index af7841f56c..e80a04d015 100644 --- a/module/file/view/download.html.php +++ b/module/file/view/download.html.php @@ -6,7 +6,7 @@ function deleteFile(fileID) { if(!fileID) return; - hiddenwin.location.href =createLink('doc', 'deleteFile', 'fileID=' + fileID); + hiddenwin.location.href =createLink('file', 'deleteFile', 'fileID=' + fileID); } /* 下载文件。*/ function downloadFile(fileID){ diff --git a/module/story/control.php b/module/story/control.php index 3688a5f6c6..5e25fc7724 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -223,13 +223,6 @@ class story extends control } } - /* 删除一个文件。*/ - public function deleteFile($fileID) - { - $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); - die(js::reload('parent')); - } - /* 评审一条需求。*/ public function review($storyID) { diff --git a/module/task/control.php b/module/task/control.php index 3699ad6cd5..4592bf656d 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -303,13 +303,6 @@ class task extends control } } - /* 删除一个文件。*/ - public function deleteFile($fileID) - { - $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); - die(js::reload('parent')); - } - /* 发送邮件。*/ private function sendmail($taskID, $actionID) { diff --git a/module/testcase/control.php b/module/testcase/control.php index a622e5f15c..644254c267 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -255,13 +255,6 @@ class testcase extends control } } - /* 删除一个文件。*/ - public function deleteFile($fileID) - { - $this->dao->delete()->from(TABLE_FILE)->where('id')->eq($fileID)->exec(); - die(js::reload('parent')); - } - /* 确认需求变动。*/ public function confirmStoryChange($caseID) {