mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Update GoogleSitemapSiteTreeExtension.php
This commit is contained in:
parent
67c8ad044e
commit
67e8d601d5
@ -163,15 +163,15 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
|
|||||||
foreach ($this->owner->manyMany() as $field => $type) {
|
foreach ($this->owner->manyMany() as $field => $type) {
|
||||||
$image = false;
|
$image = false;
|
||||||
|
|
||||||
if (strpos($type, '.') !== false) {
|
|
||||||
$type = explode('.', $type)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($type) && isset($type['through'])) {
|
if (is_array($type) && isset($type['through'])) {
|
||||||
if (singleton($type['through']) instanceof Image) {
|
if (singleton($type['through']) instanceof Image) {
|
||||||
$image = true;
|
$image = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (strpos($type, '.') !== false) {
|
||||||
|
$type = explode('.', $type)[0];
|
||||||
|
}
|
||||||
|
|
||||||
if (singleton($type) instanceof Image) {
|
if (singleton($type) instanceof Image) {
|
||||||
$image = true;
|
$image = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user