diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-21 11:12:56 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-21 11:12:56 -0800 |
commit | 85528ccb1f5840a8c73f6c939f12d98bb3680cde (patch) | |
tree | be0f09c02a2bf003c23d6be98919783347b9786d /lib/atom10feed.php | |
parent | 86f2f530ef60fdb601720885d493cf5b2a446e6b (diff) | |
parent | 3e7a2a4014dd93637f5a666e238dde13e397523c (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/atom10feed.php')
-rw-r--r-- | lib/atom10feed.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/atom10feed.php b/lib/atom10feed.php index 14a3beb83..5e17b20d3 100644 --- a/lib/atom10feed.php +++ b/lib/atom10feed.php @@ -78,7 +78,7 @@ class Atom10Feed extends XMLStringer $this->authors = array(); $this->links = array(); $this->entries = array(); - $this->addNamespace('xmlns', 'http://www.w3.org/2005/Atom'); + $this->addNamespace('', 'http://www.w3.org/2005/Atom'); } /** @@ -162,7 +162,14 @@ class Atom10Feed extends XMLStringer { $this->xw->startDocument('1.0', 'UTF-8'); $commonAttrs = array('xml:lang' => 'en-US'); - $commonAttrs = array_merge($commonAttrs, $this->namespaces); + foreach ($this->namespaces as $prefix => $uri) { + if ($prefix == '') { + $attr = 'xmlns'; + } else { + $attr = 'xmlns:' . $prefix; + } + $commonAttrs[$attr] = $uri; + } $this->elementStart('feed', $commonAttrs); $this->element('id', null, $this->id); |