diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-06 12:03:09 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-06 12:03:09 +0000 |
commit | 0b32313f26f9bb3a299a870ea1615d9c3ebefd26 (patch) | |
tree | a8b1c56b0667ab6ef3aa7e0963bf5515cde824b2 | |
parent | 083ec53cd2ee73b8689a018defdebb8dbe21283a (diff) | |
download | elgg-0b32313f26f9bb3a299a870ea1615d9c3ebefd26.tar.gz elgg-0b32313f26f9bb3a299a870ea1615d9c3ebefd26.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* More internationalisation
git-svn-id: https://code.elgg.org/elgg/trunk@820 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/query.php | 12 | ||||
-rw-r--r-- | languages/en.php | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/engine/lib/query.php b/engine/lib/query.php index 3507bbe2e..61f36dc1e 100644 --- a/engine/lib/query.php +++ b/engine/lib/query.php @@ -362,8 +362,8 @@ $string = " ("; foreach ($this->wheres as $where) { if (!($where instanceof WhereQueryComponent)) - throw new DatabaseException("Where set contains non WhereQueryComponent"); - + throw new DatabaseException(elgg_echo('DatabaseException:WhereSetNonQuery')); + if (!$cnt) $string.= $where->toStringNoLink(); else @@ -650,10 +650,10 @@ $sql .= " $fields from "; } else - throw new DatabaseException("Fields missing on a select style query"); + throw new DatabaseException(elgg_echo('DatabaseException:SelectFieldsMissing')); } else - throw new DatabaseException("Unrecognised or unspecified query type."); + throw new DatabaseException(elgg_echo('DatabaseException:UnspecifiedQueryType')); // Tables if (!empty($this->tables)) @@ -664,7 +664,7 @@ $sql = trim($sql, ", "); } else - throw new DatabaseException("No tables specified for query."); + throw new DatabaseException(elgg_echo('DatabaseException:NoTablesSpecified')); // Joins on select queries if ($this->query_type->query_type == 'select') @@ -710,7 +710,7 @@ $sql .= "{$this->access_control} "; } else - throw new DatabaseException("No access control was provided on query"); + throw new DatabaseException(elgg_echo('DatabaseException:NoACL')); // Order by if (!empty($this->order)) diff --git a/languages/en.php b/languages/en.php index c5f8e113a..86136a574 100644 --- a/languages/en.php +++ b/languages/en.php @@ -78,6 +78,12 @@ 'NotificationException:NoHandlerFound' => "No handler found for '%s' or it was not callable.", 'NotificationException:ErrorNotifyingGuid' => "There was an error while notifying %d", 'NotificationException:NoEmailAddress' => "Could not get the email address for GUID:%d", + + 'DatabaseException:WhereSetNonQuery' => "Where set contains non WhereQueryComponent", + 'DatabaseException:SelectFieldsMissing' => "Fields missing on a select style query", + 'DatabaseException:UnspecifiedQueryType' => "Unrecognised or unspecified query type.", + 'DatabaseException:NoTablesSpecified' => "No tables specified for query.", + 'DatabaseException:NoACL' => "No access control was provided on query", /**
* User details
|