fix: 🐛 fix wrong usave of copy (should have been move_uploaded_file)
Some checks failed
/ phplint (push) Failing after 3s
Some checks failed
/ phplint (push) Failing after 3s
This commit is contained in:
parent
a82290cf73
commit
2f5d59dd32
1 changed files with 2 additions and 4 deletions
|
@ -55,7 +55,7 @@ class PostHandler extends MySQLAdapter {
|
|||
|
||||
function save_file($post_path, $file_path) {
|
||||
$this->bump_post($post_path);
|
||||
copy($file_path, $this->data_directory . $post_path);
|
||||
move_uploaded_file($file_path, $this->data_directory . $post_path);
|
||||
}
|
||||
|
||||
function save_markdown_post($post_path, $post_data) {
|
||||
|
@ -66,7 +66,6 @@ class PostHandler extends MySQLAdapter {
|
|||
$post_metadata = $frontmatter_post->matter();
|
||||
|
||||
if(basename($post_path) == "README.md") {
|
||||
|
||||
$readme_metadata = [];
|
||||
if(isset($post_metadata['directory_data'])) {
|
||||
$readme_metadata = $post_metadata['directory_data'];
|
||||
|
@ -86,8 +85,7 @@ class PostHandler extends MySQLAdapter {
|
|||
case "md":
|
||||
$this->save_markdown_post($post_path, file_get_contents($file_path));
|
||||
|
||||
file_put_contents($this->data_directory . $post_path,
|
||||
$post_data);
|
||||
move_uploaded_file($file_path, $this->data_directory . $post_path);
|
||||
break;
|
||||
case "mddesc":
|
||||
$this->save_markdown_post(chop($post_path, '.mddesc'), file_get_contents($file_path));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue