function format($changes) { include_once 'lib/RssWriter.php'; $rss = new RssWriter(); $rss->channel($this->channel_properties()); if ($props = $this->image_properties()) { $rss->image($props); } if ($props = $this->textinput_properties()) { $rss->textinput($props); } $first = true; while ($rev = $changes->next()) { // enforce view permission if (mayAccessPage('view', $rev->_pagename)) { $rss->addItem($this->item_properties($rev), $this->pageURI($rev)); if ($first) { $this->setValidators($rev); } $first = false; } } global $request; $request->discardOutput(); $rss->finish(); //header("Content-Type: application/rss+xml; charset=" . $GLOBALS['charset']); printf("\n<!-- Generated by PhpWiki-%s -->\n", PHPWIKI_VERSION); // Flush errors in comment, otherwise it's invalid XML. global $ErrorManager; if ($errors = $ErrorManager->getPostponedErrorsAsHTML()) { printf("\n<!-- PHP Warnings:\n%s-->\n", AsXML($errors)); } $request->finish(); // NORETURN!!!! }