From e385b2f80c17da07a75ea8af0dc1f90a674f3de2 Mon Sep 17 00:00:00 2001 From: Thomas Speak Date: Tue, 27 Aug 2013 15:32:52 +0100 Subject: [PATCH] FIX Changing `alterCanIncludeInGoogleSitemap` to call owner object and extensions At the moment `alterCanIncludeInGoogleSitemap` is only called on other extensions, but really we'd want to see this called on the owner object and its extensions. Fixed to use `invokeWithExtensions` rather than `extend` --- code/extensions/GoogleSitemapExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/extensions/GoogleSitemapExtension.php b/code/extensions/GoogleSitemapExtension.php index 347dfe7..57541d0 100644 --- a/code/extensions/GoogleSitemapExtension.php +++ b/code/extensions/GoogleSitemapExtension.php @@ -31,7 +31,7 @@ class GoogleSitemapExtension extends DataExtension { $can = $this->owner->getGooglePriority(); } - $this->owner->extend('alterCanIncludeInGoogleSitemap', $can); + $this->owner->invokeWithExtensions('alterCanIncludeInGoogleSitemap', $can); return $can; }