summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-03-09 18:47:20 -0500
committerJames Walker <walkah@walkah.net>2010-03-11 14:49:12 -0500
commit06612e35e433109e00167ac62d65299210ef0032 (patch)
treeed71247073f4a9d9914373c8757a2d2ef4543a52 /plugins/OStatus/lib
parent89582e72262bdba65e6b07699536555d5fa6a497 (diff)
remove hard-coded me:env check in magicenvelope
Diffstat (limited to 'plugins/OStatus/lib')
-rw-r--r--plugins/OStatus/lib/magicenvelope.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/OStatus/lib/magicenvelope.php b/plugins/OStatus/lib/magicenvelope.php
index e8835165c..c927209e4 100644
--- a/plugins/OStatus/lib/magicenvelope.php
+++ b/plugins/OStatus/lib/magicenvelope.php
@@ -193,11 +193,12 @@ class MagicEnvelope
public function fromDom($dom)
{
- if ($dom->documentElement->tagName == 'entry') {
+ $env_element = $dom->getElementsByTagNameNS(MagicEnvelope::NS, 'env')->item(0);
+ if (!$env_element) {
$env_element = $dom->getElementsByTagNameNS(MagicEnvelope::NS, 'provenance')->item(0);
- } else if ($dom->documentElement->tagName == 'me:env') {
- $env_element = $dom->documentElement;
- } else {
+ }
+
+ if (!$env_element) {
return false;
}