aboutsummaryrefslogtreecommitdiff
path: root/lib/functions.php
diff options
context:
space:
mode:
authorArno Richter <oelna@oelna.de>2022-12-21 15:11:04 +0100
committerArno Richter <oelna@oelna.de>2022-12-21 15:11:04 +0100
commit04bffab6639fb3678ccb043b6e17e957d1ea662e (patch)
tree23085dc8c2b7bc30909f0a72051bdc9e0b4c7cd9 /lib/functions.php
parentaa8b83a0c1edfa738cae96f2a8f0ce3bfcedbf61 (diff)
downloadmicroblog-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.php4
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);
}