Skip to content

Commit

Permalink
chore: code formatting (fixes #199)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr authored Oct 23, 2024
1 parent 794778a commit 675df31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
use SilverStripe\Core\ClassInfo;
use Wilr\GoogleSitemaps\GoogleSitemap;

if (0 === strpos(ltrim($_SERVER['REQUEST_URI'], '/'), 'sitemap')) {
foreach (ClassInfo::implementorsOf(Sitemapable::class) as $className) {
GoogleSitemap::register_dataobject($className);
if (array_key_exists('REQUEST_URI', $_SERVER)) {
if (0 === strpos(ltrim($_SERVER['REQUEST_URI'], '/'), 'sitemap')) {
foreach (ClassInfo::implementorsOf(Sitemapable::class) as $className) {
GoogleSitemap::register_dataobject($className);
}
}
}

0 comments on commit 675df31

Please sign in to comment.