diff options
author | Evan Prodromou <evan@status.net> | 2010-09-02 22:56:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-02 22:56:18 -0400 |
commit | 6c14235d6c3359a6c9012ec49077f8defe117779 (patch) | |
tree | a2c9abccb56d4c017a49ac27634d075dd54d57be /plugins/OStatus/lib/salmon.php | |
parent | 388495f6b1fe5de9af7fc6a01b12da1a5c36093e (diff) | |
parent | 1bfbe9badfbe3e79f82e7216d1401f05a2750677 (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/OStatus/lib/salmon.php')
-rw-r--r-- | plugins/OStatus/lib/salmon.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/OStatus/lib/salmon.php b/plugins/OStatus/lib/salmon.php index ef7719a40..631ebc7d8 100644 --- a/plugins/OStatus/lib/salmon.php +++ b/plugins/OStatus/lib/salmon.php @@ -31,10 +31,10 @@ class Salmon const REL_SALMON = 'salmon'; const REL_MENTIONED = 'mentioned'; - // XXX: these are deprecated + // XXX: these are deprecated const NS_REPLIES = "http://salmon-protocol.org/ns/salmon-replies"; const NS_MENTIONS = "http://salmon-protocol.org/ns/salmon-mention"; - + /** * Sign and post the given Atom entry as a Salmon message. * @@ -87,9 +87,10 @@ class Salmon // No keypair yet, let's generate one. $magickey = new Magicsig(); $magickey->generate($user->id); - } + } } else { - throw new Exception("Salmon invalid actor for signing"); + // @todo i18n FIXME: added i18n and use sprintf when using parameters. + throw new Exception("Salmon invalid actor for signing."); } try { @@ -104,7 +105,7 @@ class Salmon public function verifyMagicEnv($text) { $magic_env = new MagicEnvelope(); - + $env = $magic_env->parse($text); return $magic_env->verify($env); |