aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggAnnotation.php6
-rw-r--r--engine/classes/ElggDiskFilestore.php8
-rw-r--r--engine/classes/ElggExtender.php10
-rw-r--r--engine/classes/ElggFile.php8
-rw-r--r--engine/classes/ElggFileCache.php2
-rw-r--r--engine/classes/ElggGroup.php6
-rw-r--r--engine/classes/ElggMemcache.php6
-rw-r--r--engine/classes/ElggMetadata.php8
-rw-r--r--engine/classes/ElggObject.php6
-rw-r--r--engine/classes/ElggRelationship.php4
-rw-r--r--engine/classes/ElggSite.php6
-rw-r--r--engine/classes/ElggUser.php6
12 files changed, 38 insertions, 38 deletions
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php
index da43aea23..60a79bac9 100644
--- a/engine/classes/ElggAnnotation.php
+++ b/engine/classes/ElggAnnotation.php
@@ -16,10 +16,10 @@ class ElggAnnotation extends ElggExtender {
protected function initializeAttributes() {
parent::initializeAttributes();
-
+
$this->attributes['type'] = 'annotation';
}
-
+
/**
* Construct a new annotation, optionally from a given id value or db object.
*
@@ -59,7 +59,7 @@ class ElggAnnotation extends ElggExtender {
$this->value_type, $this->owner_guid, $this->access_id);
if (!$this->id) {
- throw new IOException(sprintf(elgg_echo('IOException:UnableToSaveNew'), get_class()));
+ throw new IOException(elgg_echo('IOException:UnableToSaveNew', array(get_class())));
}
return $this->id;
}
diff --git a/engine/classes/ElggDiskFilestore.php b/engine/classes/ElggDiskFilestore.php
index 4f9aae1af..780598a87 100644
--- a/engine/classes/ElggDiskFilestore.php
+++ b/engine/classes/ElggDiskFilestore.php
@@ -83,7 +83,7 @@ class ElggDiskFilestore extends ElggFilestore {
$mode = "a+b";
break;
default:
- $msg = sprintf(elgg_echo('InvalidParameterException:UnrecognisedFileMode'), $mode);
+ $msg = elgg_echo('InvalidParameterException:UnrecognisedFileMode', array($mode));
throw new InvalidParameterException($msg);
}
@@ -206,8 +206,8 @@ class ElggDiskFilestore extends ElggFilestore {
}
if ((!$owner) || (!$owner->username)) {
- $msg = sprintf(elgg_echo('InvalidParameterException:MissingOwner'),
- $file->getFilename(), $file->guid);
+ $msg = elgg_echo('InvalidParameterException:MissingOwner',
+ array($file->getFilename(), $file->guid));
throw new InvalidParameterException($msg);
}
@@ -278,7 +278,7 @@ class ElggDiskFilestore extends ElggFilestore {
protected function makeDirectoryRoot($dirroot) {
if (!file_exists($dirroot)) {
if (!@mkdir($dirroot, 0700, true)) {
- throw new IOException(sprintf(elgg_echo('IOException:CouldNotMake'), $dirroot));
+ throw new IOException(elgg_echo('IOException:CouldNotMake', array($dirroot)));
}
}
diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php
index 8d0f4bd66..78ccea395 100644
--- a/engine/classes/ElggExtender.php
+++ b/engine/classes/ElggExtender.php
@@ -21,10 +21,10 @@ abstract class ElggExtender extends ElggData
{
protected function initializeAttributes() {
parent::initializeAttributes();
-
+
$this->attributes['type'] = '';
}
-
+
/**
* Returns an attribute
*
@@ -48,8 +48,8 @@ abstract class ElggExtender extends ElggData
break;
default :
- $msg = sprintf(elgg_echo('InstallationException:TypeNotSupported'),
- $this->attributes['value_type']);
+ $msg = elgg_echo('InstallationException:TypeNotSupported', array(
+ $this->attributes['value_type']));
throw new InstallationException($msg);
break;
@@ -96,7 +96,7 @@ abstract class ElggExtender extends ElggData
public function getOwnerEntity() {
return get_entity($this->owner_guid);
}
-
+
/**
* Return the entity this describes.
*
diff --git a/engine/classes/ElggFile.php b/engine/classes/ElggFile.php
index 46cd0b6a0..a55bbc443 100644
--- a/engine/classes/ElggFile.php
+++ b/engine/classes/ElggFile.php
@@ -164,7 +164,7 @@ class ElggFile extends ElggObject {
($mode != "write") &&
($mode != "append")
) {
- $msg = sprintf(elgg_echo('InvalidParameterException:UnrecognisedFileMode'), $mode);
+ $msg = elgg_echo('InvalidParameterException:UnrecognisedFileMode', array($mode));
throw new InvalidParameterException($msg);
}
@@ -343,9 +343,9 @@ class ElggFile extends ElggObject {
if (isset($parameters['filestore'])) {
if (!class_exists($parameters['filestore'])) {
- $msg = sprintf(elgg_echo('ClassNotFoundException:NotFoundNotSavedWithFile'),
- $parameters['filestore'],
- $this->guid);
+ $msg = elgg_echo('ClassNotFoundException:NotFoundNotSavedWithFile',
+ array($parameters['filestore'],
+ $this->guid));
throw new ClassNotFoundException($msg);
}
diff --git a/engine/classes/ElggFileCache.php b/engine/classes/ElggFileCache.php
index 2072af620..c27e9aa32 100644
--- a/engine/classes/ElggFileCache.php
+++ b/engine/classes/ElggFileCache.php
@@ -188,7 +188,7 @@ class ElggFileCache extends ElggCache {
$files = scandir($dir);
if (!$files) {
- throw new IOException(sprintf(elgg_echo('IOException:NotDirectory'), $dir));
+ throw new IOException(elgg_echo('IOException:NotDirectory', array($dir)));
}
// Perform cleanup
diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php
index 00502dd39..963d80821 100644
--- a/engine/classes/ElggGroup.php
+++ b/engine/classes/ElggGroup.php
@@ -54,7 +54,7 @@ class ElggGroup extends ElggEntity
if ($guid instanceof stdClass) {
// Load the rest
if (!$this->load($guid->guid)) {
- $msg = sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid->guid);
+ $msg = elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid->guid));
throw new IOException($msg);
}
@@ -73,7 +73,7 @@ class ElggGroup extends ElggEntity
// We assume if we have got this far, $guid is an int
} else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid)));
}
} else {
throw new InvalidParameterException(elgg_echo('InvalidParameterException:UnrecognisedValue'));
@@ -342,7 +342,7 @@ class ElggGroup extends ElggEntity
// Check the type
if ($this->attributes['type'] != 'group') {
- $msg = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, get_class());
+ $msg = elgg_echo('InvalidClassException:NotValidElggStar', array($guid, get_class()));
throw new InvalidClassException($msg);
}
diff --git a/engine/classes/ElggMemcache.php b/engine/classes/ElggMemcache.php
index e0d8e7bee..7d19fb2c7 100644
--- a/engine/classes/ElggMemcache.php
+++ b/engine/classes/ElggMemcache.php
@@ -85,10 +85,10 @@ class ElggMemcache extends ElggSharedMemoryCache {
// Get version
$this->version = $this->memcache->getVersion();
if (version_compare($this->version, ElggMemcache::$MINSERVERVERSION, '<')) {
- $msg = sprintf(elgg_echo('memcache:versiontoolow'),
- ElggMemcache::$MINSERVERVERSION,
+ $msg = elgg_echo('memcache:versiontoolow',
+ array(ElggMemcache::$MINSERVERVERSION,
$this->version
- );
+ ));
throw new ConfigurationException($msg);
}
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php
index 90cbba5bd..12e458629 100644
--- a/engine/classes/ElggMetadata.php
+++ b/engine/classes/ElggMetadata.php
@@ -8,13 +8,13 @@
* @subpackage Metadata
*/
class ElggMetadata extends ElggExtender {
-
+
protected function initializeAttributes() {
parent::initializeAttributes();
-
+
$this->attributes['type'] = "metadata";
}
-
+
/**
* Construct a new site object, optionally from a given id value or row.
*
@@ -68,7 +68,7 @@ class ElggMetadata extends ElggExtender {
$this->value_type, $this->owner_guid, $this->access_id);
if (!$this->id) {
- throw new IOException(sprintf(elgg_echo('IOException:UnableToSaveNew'), get_class()));
+ throw new IOException(elgg_echo('IOException:UnableToSaveNew', array(get_class())));
}
return $this->id;
}
diff --git a/engine/classes/ElggObject.php b/engine/classes/ElggObject.php
index b721c479c..a808f4b9f 100644
--- a/engine/classes/ElggObject.php
+++ b/engine/classes/ElggObject.php
@@ -69,7 +69,7 @@ class ElggObject extends ElggEntity {
if ($guid instanceof stdClass) {
// Load the rest
if (!$this->load($guid->guid)) {
- $msg = sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid->guid);
+ $msg = elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid->guid));
throw new IOException($msg);
}
@@ -88,7 +88,7 @@ class ElggObject extends ElggEntity {
// We assume if we have got this far, $guid is an int
} else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid)));
}
} else {
throw new InvalidParameterException(elgg_echo('InvalidParameterException:UnrecognisedValue'));
@@ -112,7 +112,7 @@ class ElggObject extends ElggEntity {
// Check the type
if ($this->attributes['type'] != 'object') {
- $msg = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, get_class());
+ $msg = elgg_echo('InvalidClassException:NotValidElggStar', array($guid, get_class()));
throw new InvalidClassException($msg);
}
diff --git a/engine/classes/ElggRelationship.php b/engine/classes/ElggRelationship.php
index 413527df3..50a86fff1 100644
--- a/engine/classes/ElggRelationship.php
+++ b/engine/classes/ElggRelationship.php
@@ -73,7 +73,7 @@ class ElggRelationship extends ElggData implements
$this->id = add_entity_relationship($this->guid_one, $this->relationship, $this->guid_two);
if (!$this->id) {
- throw new IOException(sprintf(elgg_echo('IOException:UnableToSaveNew'), get_class()));
+ throw new IOException(elgg_echo('IOException:UnableToSaveNew', array(get_class())));
}
return $this->id;
@@ -168,7 +168,7 @@ class ElggRelationship extends ElggData implements
// save
$result = $this->save();
if (!$result) {
- throw new ImportException(sprintf(elgg_echo('ImportException:ProblemSaving'), get_class()));
+ throw new ImportException(elgg_echo('ImportException:ProblemSaving', array(get_class())));
}
return $this;
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index febd70be6..0a4c48d8e 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -82,7 +82,7 @@ class ElggSite extends ElggEntity {
if ($guid instanceof stdClass) {
// Load the rest
if (!$this->load($guid->guid)) {
- $msg = sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid->guid);
+ $msg = elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid->guid));
throw new IOException($msg);
}
@@ -108,7 +108,7 @@ class ElggSite extends ElggEntity {
// We assume if we have got this far, $guid is an int
} else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid)));
}
} else {
throw new InvalidParameterException(elgg_echo('InvalidParameterException:UnrecognisedValue'));
@@ -132,7 +132,7 @@ class ElggSite extends ElggEntity {
// Check the type
if ($this->attributes['type'] != 'site') {
- $msg = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, get_class());
+ $msg = elgg_echo('InvalidClassException:NotValidElggStar', array($guid, get_class()));
throw new InvalidClassException($msg);
}
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php
index ec951b359..cb2d565fc 100644
--- a/engine/classes/ElggUser.php
+++ b/engine/classes/ElggUser.php
@@ -65,7 +65,7 @@ class ElggUser extends ElggEntity
if ($guid instanceof stdClass) {
// Load the rest
if (!$this->load($guid->guid)) {
- $msg = sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid->guid);
+ $msg = elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid->guid));
throw new IOException($msg);
}
@@ -91,7 +91,7 @@ class ElggUser extends ElggEntity
// We assume if we have got this far, $guid is an int
} else if (is_numeric($guid)) {
if (!$this->load($guid)) {
- throw new IOException(sprintf(elgg_echo('IOException:FailedToLoadGUID'), get_class(), $guid));
+ throw new IOException(elgg_echo('IOException:FailedToLoadGUID', array(get_class(), $guid)));
}
} else {
throw new InvalidParameterException(elgg_echo('InvalidParameterException:UnrecognisedValue'));
@@ -116,7 +116,7 @@ class ElggUser extends ElggEntity
// Check the type
if ($this->attributes['type'] != 'user') {
- $msg = sprintf(elgg_echo('InvalidClassException:NotValidElggStar'), $guid, get_class());
+ $msg = elgg_echo('InvalidClassException:NotValidElggStar', array($guid, get_class()));
throw new InvalidClassException($msg);
}