From: dj3c1t Date: Sun, 13 Oct 2013 18:55:19 +0000 (+0200) Subject: creation si besoin du dossier upload X-Git-Tag: mtweb.0.10.2 X-Git-Url: http://git.dj3c1t.com/index.cgi?a=commitdiff_plain;h=df71cf8bd8bbaefd3e2389a17def8482f4afb7ef;p=mtweb creation si besoin du dossier upload --- diff --git a/mw/app/data/modules/share/mw_data_users_files.php b/mw/app/data/modules/share/mw_data_users_files.php index 5e35a4f..e2754e3 100644 --- a/mw/app/data/modules/share/mw_data_users_files.php +++ b/mw/app/data/modules/share/mw_data_users_files.php @@ -10,6 +10,9 @@ } if(!isset($id_user) || !$id_user) return false; if(!preg_match("/^[0-9]+$/", $id_user)) return false; + $uploads_dir = $env->path("content")."uploads/"; + if(!is_dir($uploads_dir)) @mkdir($uploads_dir); + if(!is_dir($uploads_dir)) return false; $user_dir = $env->path("content")."uploads/".$id_user; if(!file_exists($user_dir)) @mkdir($user_dir); return file_exists($user_dir);