diff options
author | Arno Richter <oelna@oelna.de> | 2022-12-21 15:11:04 +0100 |
---|---|---|
committer | Arno Richter <oelna@oelna.de> | 2022-12-21 15:11:04 +0100 |
commit | 04bffab6639fb3678ccb043b6e17e957d1ea662e (patch) | |
tree | 23085dc8c2b7bc30909f0a72051bdc9e0b4c7cd9 /lib/functions.php | |
parent | aa8b83a0c1edfa738cae96f2a8f0ce3bfcedbf61 (diff) | |
download | microblog-04bffab6639fb3678ccb043b6e17e957d1ea662e.tar.gz microblog-04bffab6639fb3678ccb043b6e17e957d1ea662e.tar.bz2 microblog-04bffab6639fb3678ccb043b6e17e957d1ea662e.zip |
add uploaded files to gitignore, duh
Diffstat (limited to 'lib/functions.php')
-rw-r--r-- | lib/functions.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/functions.php b/lib/functions.php index e606230..97c93fe 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -304,6 +304,10 @@ function save_file($filename, $extension, $tmp_file, $post_id, $mime='') { 'file_timestamp' => time() ]; + if(!is_dir($files_dir)) { + mkdir($files_dir, 0755); + } + if(!is_dir($files_dir.DS.$insert['file_dir'])) { mkdir($files_dir.DS.$insert['file_dir'], 0755); } |