* Fix can read file when user not login.

This commit is contained in:
chaideqing
2023-06-29 09:28:26 +00:00
parent b42c3d60ed
commit 01e2d843ff
+1
View File
@@ -487,6 +487,7 @@ class file extends control
*/
public function read($fileID)
{
if(!$this->loadModel('user')->isLogon()) return print(js::locate($this->createLink('user', 'login')));
$file = $this->file->getById($fileID);
if(empty($file) or !$this->file->fileExists($file)) return false;