From dcc45ab526e07b198022a523bb6e0a835ea97f0b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 17 May 2023 16:50:53 +0800 Subject: [PATCH] * Fix extend newPage for editor module. --- module/editor/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/editor/control.php b/module/editor/control.php index da2b0ba95c..a2a4a45220 100644 --- a/module/editor/control.php +++ b/module/editor/control.php @@ -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));