typo and updated the if conditions

This commit is contained in:
Nivanka Fonseka 2017-07-27 08:46:17 +05:30 committed by Daniel Hensby
parent 29be1bc504
commit c5388b6e5b
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -48,7 +48,7 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
'<a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=71936#prioritize" '
. 'target="_blank">?</a>'
);
$message .= "</p>";
$message .= "</p>";
$tabset->push(new Tab(
'GoogleSitemap',
@ -145,15 +145,15 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
$list = new ArrayList();
foreach ($this->owner->hasOne() as $field => $type) {
if(is_a(singleton($type), 'Image')) {
if (singleton($type) instanceof Image) {
$image = $this->owner->getComponent($field);
if($image && $image->exists()) {
if ($image && $image->exists()) {
$list->push($image);
}
}
}
foreach ($this->owner->hasMany() as $field => $type) {
if(is_a(singleton($type), 'Image')) {
if (singleton($type) instanceof Image) {
$images = $this->owner->getComponents($field);
foreach ($images as $image) {
if ($image && $image->exists()) {