diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-05 14:46:06 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-05 14:46:06 +0000 |
commit | 47b3a072490903349922b565ec3b393a82f1c8a9 (patch) | |
tree | 9f0dbe0776dbb45f8704563d38ca2bbc02fa6ee3 /engine/lib/filestore.php | |
parent | 31c42efb3fad99bef4916cfedfc99395ebfb087f (diff) | |
download | elgg-47b3a072490903349922b565ec3b393a82f1c8a9.tar.gz elgg-47b3a072490903349922b565ec3b393a82f1c8a9.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* More text internationalised
git-svn-id: https://code.elgg.org/elgg/trunk@804 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/filestore.php')
-rw-r--r-- | engine/lib/filestore.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index 603293413..0ade1e906 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -221,7 +221,7 @@ if (!$owner) $owner = $_SESSION['user']; - if ((!$owner) || (!$owner->username)) throw InvalidParameterException("All files must have an owner!"); + if ((!$owner) || (!$owner->username)) throw InvalidParameterException(elgg_echo('InvalidParameterException:MissingOwner')); return $this->dir_root . $this->make_file_matrix($owner->username) . $file->getFilename(); } @@ -234,7 +234,7 @@ protected function make_directory_root($dirroot) { if (!@mkdir($dirroot, 0700, true)) - throw new IOException("Could not make $dirroot"); + throw new IOException(sprintf(elgg_echo('IOException:CouldNotMake'), $dirroot)); return true; } @@ -368,7 +368,7 @@ public function open($mode) { if (!$this->getFilename()) - throw new IOException("You must specify a name before opening a file."); + throw new IOException(elgg_echo('IOException:MissingFileName')); // See if file has already been saved // seek on datastore, parameters and name? @@ -379,7 +379,7 @@ ($mode!="write") && ($mode!="append") ) - throw new InvalidParameterException("Unrecognised file mode '$mode'"); + throw new InvalidParameterException(sprintf(elgg_echo('InvalidParameterException:UnrecognisedFileMode'), $mode)); // Get the filestore $fs = $this->getFilestore(); @@ -530,7 +530,7 @@ { // Create new filestore object if ((!isset($parameters['filestore'])) || (!class_exists($parameters['filestore']))) - throw new ClassNotFoundException("Filestore not found or class not saved with file!"); + throw new ClassNotFoundException(elgg_echo('ClassNotFoundException:NotFoundNotSavedWithFile')); $this->filestore = new $parameters['filestore'](); |