* Finish task #93585.

This commit is contained in:
hufangzhou
2023-05-24 17:05:51 +08:00
parent e8995faf85
commit 0b9a3be715
+1 -1
View File
@@ -162,7 +162,7 @@ class editor extends control
if(strpos(strtolower($filePath), strtolower($this->app->getBasePath())) !== 0) return print($this->lang->editor->editFileError);
$fileName = empty($_POST['fileName']) ? '' : trim($this->post->fileName);
if(empty($fileName)) return print(js::error($this->lang->editor->emptyFileName));
if($action != 'newPage' and empty($fileName)) return print(js::error($this->lang->editor->emptyFileName));
if($action != 'edit' and $action != 'newPage') $filePath = $this->editor->getSavePath($filePath, $action);
if($action != 'edit' and $action != 'newPage' and file_exists($filePath) and !$this->post->override) return print(js::error($this->lang->editor->repeatFile));