aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/filestore.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-18 17:20:03 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-18 17:20:03 +0000
commit4e151c9728ee9adeb3714db2323720f4450a0163 (patch)
tree890114b1e3386151bacd527c40436b983178cabe /engine/lib/filestore.php
parent547fcaebf6e509bbd73989d5d97135355aef01ea (diff)
downloadelgg-4e151c9728ee9adeb3714db2323720f4450a0163.tar.gz
elgg-4e151c9728ee9adeb3714db2323720f4450a0163.tar.bz2
Closes #601: Provides default for new ElggFilestore objects to remove warning message.
git-svn-id: https://code.elgg.org/elgg/trunk@3345 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r--engine/lib/filestore.php9
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)