BUGFIX Hide pages without view permissions from sitemap.xml. Thanks simon_w! (see #3234)

This commit is contained in:
ischommer 2008-12-18 21:07:07 +00:00
parent 6181a48ced
commit 71e1fddc6d

View File

@ -46,7 +46,7 @@ class GoogleSitemap extends Controller {
if(parse_url($page->AbsoluteLink(), PHP_URL_HOST) == $_SERVER['HTTP_HOST'] && !($page instanceof ErrorPage)) {
// If the page has been set to 0 priority, we set a flag so it won't be included
if(!isset($page->Priority) || $page->Priority > 0) {
if($page->canView() && (!isset($page->Priority) || $page->Priority > 0)) {
// The one field that isn't easy to deal with in the template is
// Change frequency, so we set that here.
$properties = $page->toMap();