Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65cbefc
)
MDL-54584 repository: Set a default filename in prepare_file
author
Andrew Nicols
<andrew@nicols.co.uk>
Mon, 16 May 2016 03:07:38 +0000
(11:07 +0800)
committer
Andrew Nicols
<andrew@nicols.co.uk>
Mon, 16 May 2016 03:07:38 +0000
(11:07 +0800)
repository/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/repository/lib.php
b/repository/lib.php
index
f3e8474
..
297ca6f
100644
(file)
--- a/
repository/lib.php
+++ b/
repository/lib.php
@@
-1617,6
+1617,9
@@
abstract class repository implements cacheable_object {
* @return file path
*/
public function prepare_file($filename) {
+ if (empty($filename)) {
+ $filename = 'file';
+ }
return sprintf('%s/%s', make_request_directory(), $filename);
}