From 3c19d401a7209ded9b67070233219e50387284ce Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 15 Mar 2023 17:26:22 +0800 Subject: [PATCH] * adjust for save editor. --- module/editor/control.php | 2 +- module/editor/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/editor/control.php b/module/editor/control.php index 70e31e8fab..a03432e552 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); 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)); - if($this->editor->save($filePath)) return; + if(!$this->editor->save($filePath)) return; echo js::reload('parent.parent.extendWin'); return print(js::locate(inlink('edit', "filePath=" . helper::safe64Encode($filePath) . "&action=edit"), 'parent')); } diff --git a/module/editor/model.php b/module/editor/model.php index a86417cd97..cc57e8760f 100644 --- a/module/editor/model.php +++ b/module/editor/model.php @@ -343,7 +343,7 @@ class editorModel extends model if(get_magic_quotes_gpc()) $fileContent = stripslashes($fileContent); file_put_contents($filePath, $fileContent); - return ''; + return true; } /**