From: dongsheng Date: Fri, 5 Sep 2008 02:51:23 +0000 (+0000) Subject: "MDL-13766, use a random path for uploaded file" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f15cfa08c1a02a776eeb9f90c7d24590c1ab9cdf;p=moodle.git "MDL-13766, use a random path for uploaded file" --- diff --git a/repository/upload/repository.class.php b/repository/upload/repository.class.php index 62a1adbb20..89b2b8b687 100755 --- a/repository/upload/repository.class.php +++ b/repository/upload/repository.class.php @@ -13,7 +13,8 @@ class repository_upload extends repository { global $SESSION, $action, $CFG; parent::__construct($repositoryid, $context, $options); if($action=='upload'){ - $this->info = repository_store_to_filepool('repo_upload_file'); + $filepath = '/'.uniqid().'/'; + $this->info = repository_store_to_filepool('repo_upload_file', 'user_draft', $filepath); } }