Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BUGFIX Hide pages without view permissions from sitemap.xml. Thanks s…
…imon_w! (see #3234)
  • Loading branch information
ischommer committed Dec 18, 2008
1 parent 6181a48 commit 71e1fdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/GoogleSitemap.php
Expand Up @@ -44,9 +44,9 @@ public function Items() {
foreach($this->Pages as $page) {
// Only include pages from this host and pages which are not an instance of ErrorPage
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();
Expand Down

0 comments on commit 71e1fdd

Please sign in to comment.