diff options
-rw-r--r-- | engine/lib/filestore.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index 89aee0d8d..d073a7000 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -153,9 +153,14 @@ * * @param string $directory_root Root directory, must end in "/" */ - public function __construct($directory_root) + public function __construct($directory_root = "") { - $this->dir_root = $directory_root; + global $CONFIG; + + if ($directory_root) + $this->dir_root = $directory_root; + else + $this->dir_root = $CONFIG->dataroot; } public function open(ElggFile $file, $mode) |