From 47b3a072490903349922b565ec3b393a82f1c8a9 Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 5 Jun 2008 14:46:06 +0000 Subject: Marcus Povey * More text internationalised git-svn-id: https://code.elgg.org/elgg/trunk@804 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/filestore.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/lib/filestore.php') 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'](); -- cgit v1.2.3