From 04bffab6639fb3678ccb043b6e17e957d1ea662e Mon Sep 17 00:00:00 2001 From: Arno Richter Date: Wed, 21 Dec 2022 15:11:04 +0100 Subject: add uploaded files to gitignore, duh --- lib/functions.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/functions.php') 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); } -- cgit v1.2.3