From 3e5e6cf6e20435acdc4ed78dcd0e0f2b83c97dca Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 6 Jul 2021 14:23:27 +0800 Subject: [PATCH] * Fix bug #13508. --- module/doc/js/objectlibs.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/module/doc/js/objectlibs.js b/module/doc/js/objectlibs.js index fae47aeda7..f2b03fc66a 100644 --- a/module/doc/js/objectlibs.js +++ b/module/doc/js/objectlibs.js @@ -1,3 +1,12 @@ +/** + * Ajax delete doc. + * + * @param string $link + * @param int $replaceID + * @param stirng $notice + * @access public + * @return void + */ function ajaxDeleteDoc(link, replaceID, notice) { if(confirm(notice)) @@ -8,3 +17,16 @@ function ajaxDeleteDoc(link, replaceID, notice) }) } } + +/** + * Delete a file. + * + * @param int $fileID + * @access public + * @return void + */ +function deleteFile(fileID) +{ + if(!fileID) return; + hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID); +}