* adjust for save editor.

This commit is contained in:
wangyidong
2023-03-15 17:26:22 +08:00
parent 21ef127eea
commit 3c19d401a7
2 changed files with 2 additions and 2 deletions
+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);
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'));
}
+1 -1
View File
@@ -343,7 +343,7 @@ class editorModel extends model
if(get_magic_quotes_gpc()) $fileContent = stripslashes($fileContent);
file_put_contents($filePath, $fileContent);
return '';
return true;
}
/**