Mercurial > SimpleWebPresenter
diff Sitemap.inc @ 78:7c68015b211a
Common source for all page generators.
Support for compressed output.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 12 Oct 2012 16:43:26 +0200 |
| parents | 1d5166aba2c5 |
| children | b9654b9c4a66 |
line wrap: on
line diff
--- a/Sitemap.inc Fri Oct 12 01:54:51 2012 +0200 +++ b/Sitemap.inc Fri Oct 12 16:43:26 2012 +0200 @@ -5,13 +5,13 @@ $baseDir = dirname(__FILE__); $cache = ScriptIncludeCache::instance(__FILE__); $cache->includeOnce('common-functions.inc', $baseDir); -$cache->includeOnce('Options.inc', dirname(__FILE__)); +$cache->includeOnce('Page.inc', dirname(__FILE__)); /// @endcond /** * Functionality for generating a sitemap */ -class Sitemap +class Sitemap extends Page { private $master; private $options; @@ -28,7 +28,12 @@ $this->options = new Options($this->master); } - function genPage() { + function cacheCheck() + { + return false; + } + + function generateContent() { /// The final output variable $out = '<?xml version="1.0" encoding="UTF-8"?>'; $out .= "\n"; @@ -99,7 +104,7 @@ $out .= '</urlset>'; header('Content-type: application/xml'); - print $out; + return $out; } } ?>
