aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 14:44:35 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 14:44:35 +0000
commit4cbae2be2e063b5835a6edef5d9a0c036c09b4d4 (patch)
treef815475ecb3a54c66b9aa8080748c540837149e7
parentfca19b8d1513c5e714c205d8270b60d9c7f3bcc6 (diff)
downloadelgg-4cbae2be2e063b5835a6edef5d9a0c036c09b4d4.tar.gz
elgg-4cbae2be2e063b5835a6edef5d9a0c036c09b4d4.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Numerous bugs fixed git-svn-id: https://code.elgg.org/elgg/trunk@503 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/filestore.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php
index ab295e390..ba370d557 100644
--- a/engine/lib/filestore.php
+++ b/engine/lib/filestore.php
@@ -240,6 +240,8 @@
{
parent::__construct($guid);
+ // Set default filestore
+ $this->filestore = $this->getFilestore();
}
/**
@@ -268,7 +270,7 @@
*/
public function open($mode)
{
- if (!$this->name)
+ if (!$this->title)
throw new IOException("You must specify a name before opening a file.");
// See if file has already been saved
@@ -394,7 +396,7 @@
$parameters[$name] = $meta->value;
}
}
-
+
// If parameters loaded then create new filestore
if (count($parameters)!=0)
{
@@ -421,13 +423,15 @@
if (!parent::save())
return false;
+ // Get filestore if necessary
+
// Save datastore metadata
$params = $this->filestore->getParameters();
foreach ($params as $k => $v)
$this->setMetaData("filestore::$k", $v);
// Now make a note of the filestore class
- $this->setMetaData("filestore::filestore", get_class($this));
+ $this->setMetaData("filestore::filestore", get_class($this->filestore));
return true;
}