summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes/HubSub.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-22 10:45:34 -0400
committerEvan Prodromou <evan@status.net>2010-09-22 10:45:34 -0400
commitb5cfcba4712809cb17eabba299ce5ff04f4d7d70 (patch)
tree38235bafd6ddf194e484b97321c0c341bea9de38 /plugins/OStatus/classes/HubSub.php
parent91a186251047127ad7f1238f47ff761d9127627c (diff)
parentf0105893b0b78ff88d08cc2417773ad8a44dc2fa (diff)
Merge branch '0.9.x' into activityexport
Conflicts: plugins/OStatus/OStatusPlugin.php
Diffstat (limited to 'plugins/OStatus/classes/HubSub.php')
-rw-r--r--plugins/OStatus/classes/HubSub.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php
index e01ae4e79..825d36ebd 100644
--- a/plugins/OStatus/classes/HubSub.php
+++ b/plugins/OStatus/classes/HubSub.php
@@ -54,7 +54,6 @@ class HubSub extends Memcached_DataObject
*
* @return array array of column definitions
*/
-
function table()
{
return array('hashkey' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
@@ -112,7 +111,6 @@ class HubSub extends Memcached_DataObject
*
* @return array key definitions
*/
-
function keyTypes()
{
return array('hashkey' => 'K');
@@ -206,8 +204,8 @@ class HubSub extends Memcached_DataObject
if ($status >= 200 && $status < 300) {
common_log(LOG_INFO, "Verified $mode of $this->callback:$this->topic");
} else {
- // @todo i18n FIXME: add i18n and use sprintf for parameter.
- throw new ClientException("Hub subscriber verification returned HTTP $status");
+ // TRANS: Client exception. %s is a HTTP status code.
+ throw new ClientException(sprintf(_m('Hub subscriber verification returned HTTP %s.'),$status));
}
$old = HubSub::staticGet($this->topic, $this->callback);
@@ -353,10 +351,9 @@ class HubSub extends Memcached_DataObject
if ($response->isOk()) {
return true;
} else {
- throw new Exception("Callback returned status: " .
- $response->getStatus() .
- "; body: " .
- trim($response->getBody()));
+ // TRANS: Exception. %1$s is a response status code, %2$s is the body of the response.
+ throw new Exception(sprintf(_m('Callback returned status: %1$s. Body: %2$s'),
+ $response->getStatus(),trim($response->getBody())));
}
}
}