From f884605b4a4ca739df8d6f3bd725f60efad1726e Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Mon, 4 Nov 2013 11:56:51 +1300 Subject: [PATCH] BUG Static publisher republish even when config systems says no --- code/extensions/StaticPublisher.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/extensions/StaticPublisher.php b/code/extensions/StaticPublisher.php index efe4c0d..9b3aa84 100644 --- a/code/extensions/StaticPublisher.php +++ b/code/extensions/StaticPublisher.php @@ -118,7 +118,9 @@ abstract class StaticPublisher extends DataExtension { } public function republish($original) { - if (self::$disable_realtime) return; + if (Config::inst()->get('StaticPublisher', 'disable_realtime')) { + return; + } $urls = array(); @@ -155,7 +157,9 @@ abstract class StaticPublisher extends DataExtension { * Get changes and hook into underlying functionality. */ public function onAfterUnpublish($page) { - if (self::$disable_realtime) return; + if (Config::inst()->get('StaticPublisher', 'disable_realtime')) { + return; + } // Get the affected URLs if($this->owner->hasMethod('pagesAffectedByUnpublishing')) {