public function changes()
    {
        // Check viewability of changes
        if (!Config::inst()->get(VersionFeed::class, 'changes_enabled')
            || !$this->owner->PublicHistory
            || $this->owner->Version == ''
        ) {
            return $this->owner->httpError(404, 'Page history not viewable');
        }

        // Cache the diffs to remove DOS possibility.
        $target = $this->owner;
        $key = implode('_', array('changes', $target->ID, $target->Version));
        $entries = $this->filterContent($key, function () use ($target) {
            return $target->getDiffList(null, Config::inst()->get(VersionFeed::class, 'changes_limit'));
        });

        // Generate the output.
        $title = _t(
            'SilverStripe\\VersionFeed\\VersionFeed.SINGLEPAGEFEEDTITLE',
            'Updates to {title} page',
            ['title' => $this->owner->Title]
        );
        $rss = new RSSFeed($entries, $this->owner->request->getURL(), $title, '', 'Title', '', null);
        $rss->setTemplate('Page_changes_rss');
        return $rss->outputToBrowser();
    }
public function changes()
    {
        // Check viewability of changes
        if (!Config::inst()->get(VersionFeed::class, 'changes_enabled')
            || !$this->owner->PublicHistory
            || $this->owner->Version == ''
        ) {
            return $this->owner->httpError(404, 'Page history not viewable');
        }

        // Cache the diffs to remove DOS possibility.
        $target = $this->owner;
        $key = implode('_', array('changes', $target->ID, $target->Version));
        $entries = $this->filterContent($key, function () use ($target) {
            return $target->getDiffList(null, Config::inst()->get(VersionFeed::class, 'changes_limit'));
        });

        // Generate the output.
        $title = _t(
            'SilverStripe\\VersionFeed\\VersionFeed.SINGLEPAGEFEEDTITLE',
            'Updates to {title} page',
            ['title' => $this->owner->Title]
        );
        $rss = new RSSFeed($entries, $this->owner->request->getURL(), $title, '', 'Title', '', null);
        $rss->setTemplate('Page_changes_rss');
        return $rss->outputToBrowser();
    }
public function changes ( ) { // Check viewability of changes if ( ! Config :: inst ( ) -> get ( VersionFeed :: class , 'changes_enabled' ) || ! $ this -> owner -> PublicHistory || $ this -> owner -> Version == '' ) { return $ this -> owner -> httpError ( 404 , 'Page history not viewable' ) ; } // Cache the diffs to remove DOS possibility. $ target = $ this -> owner ; $ key = implode ( '_' , array ( 'changes' , $ target -> ID , $ target -> Version ) ) ; $ entries = $ this -> filterContent ( $ key , function ( ) use ( $ target ) { return $ target -> getDiffList ( null , Config :: inst ( ) -> get ( VersionFeed :: class , 'changes_limit' ) ) ; } ) ; // Generate the output. $ title = _t ( 'SilverStripe\\VersionFeed\\VersionFeed.SINGLEPAGEFEEDTITLE' , 'Updates to {title} page' , [ 'title' => $ this -> owner -> Title ] ) ; $ rss = new RSSFeed ( $ entries , $ this -> owner -> request -> getURL ( ) , $ title , '' , 'Title' , '' , null ) ; $ rss -> setTemplate ( 'Page_changes_rss' ) ; return $ rss -> outputToBrowser ( ) ; }
Get page-specific changes in a RSS feed.
Get page - specific changes in a RSS feed .