function showFeed($aoPages) { $sFeedTitle = $this->t_("title") . " - " . self::globalCfgWebsiteName(); $oFeed = new AnwFeed(AnwEnv::_GET("feed"), $sFeedTitle, AnwUtils::aLinkAbsolute("untranslated")); foreach ($aoPages as $oPage) { //add to feed $sUserDisplayName = ""; $sItemTitle = '[' . $oPage->getLang() . '] ' . $oPage->getName() . ' (' . $oPage->getTranslatedPercent() . '%) - ' . Anwi18n::dateTime($oPage->getTime()); $sPageLink = AnwUtils::linkAbsolute($oPage); $oFeedItem = new AnwFeedItem($sItemTitle, $sPageLink); $oFeedItem->setDate($oPage->getTime()); $oFeedItem->setAuthor($sUserDisplayName); $oFeed->addItem($oFeedItem); } $oFeed->output(); }
function showFeed($aoChanges) { $sFeedTitle = $this->t_("title") . " - " . self::globalCfgWebsiteName(); $oFeed = new AnwFeed(AnwEnv::_GET("feed"), $sFeedTitle, AnwUtils::aLinkAbsolute("lastchanges")); foreach ($aoChanges as $oChange) { $sType = AnwChange::changeTypei18n($oChange->getType()); $sPageLink = ""; if ($oChange->activePageExists()) { $oActivePage = $oChange->getActivePage(); $sPageLink = AnwUtils::linkAbsolute($oActivePage); //active link, if it exists $sPageTitle = $oActivePage->getName() . ' (' . $oActivePage->getLang() . ')'; //show old name from the change } else { $sPageTitle = '(DEL)' . $oChange->getPageName() . ' (' . $oChange->getPageLang() . ')'; } //add to feed $sUserDisplayName = $oChange->getUser()->getDisplayName(); $sItemTitle = $sPageTitle . ' - ' . $sType . ' - ' . $sUserDisplayName; $oFeedItem = new AnwFeedItem($sItemTitle, $sPageLink); $oFeedItem->setDate($oChange->getTime()); $oFeedItem->setAuthor($sUserDisplayName); $oFeed->addItem($oFeedItem); } $oFeed->output(); }