Merge pull request #30 from stojg/use-config-system

BUG Static publisher republish even when config systems says no
This commit is contained in:
Sean Harvey 2013-11-03 15:10:13 -08:00
commit 02c2e66d69
1 changed files with 6 additions and 2 deletions

View File

@ -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')) {