Skip to content

Commit

Permalink
Fixed mapping of hidden routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom32i committed Oct 9, 2015
1 parent c13919f commit 70b26e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/Console/EventListener/SitemapListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public function onKernelReponse(FilterResponseEvent $event)
if ($route && $route->isMapped()) {
$url = $request->attributes->get('_canonical');
$lastModified = new DateTime($response->headers->get('Last-Modified'));

$this->sitemap->add($url, $lastModified);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function hideFromSitemap()
*/
public function isMapped()
{
return !$this->getOption('hide-from-sitemap');
return $this->isVisible() && !$this->getOption('hide-from-sitemap');
}

/**
Expand Down

0 comments on commit 70b26e5

Please sign in to comment.