mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Merge pull request #30 from stojg/use-config-system
BUG Static publisher republish even when config systems says no
This commit is contained in:
commit
02c2e66d69
@ -118,7 +118,9 @@ abstract class StaticPublisher extends DataExtension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function republish($original) {
|
public function republish($original) {
|
||||||
if (self::$disable_realtime) return;
|
if (Config::inst()->get('StaticPublisher', 'disable_realtime')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$urls = array();
|
$urls = array();
|
||||||
|
|
||||||
@ -155,7 +157,9 @@ abstract class StaticPublisher extends DataExtension {
|
|||||||
* Get changes and hook into underlying functionality.
|
* Get changes and hook into underlying functionality.
|
||||||
*/
|
*/
|
||||||
public function onAfterUnpublish($page) {
|
public function onAfterUnpublish($page) {
|
||||||
if (self::$disable_realtime) return;
|
if (Config::inst()->get('StaticPublisher', 'disable_realtime')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the affected URLs
|
// Get the affected URLs
|
||||||
if($this->owner->hasMethod('pagesAffectedByUnpublishing')) {
|
if($this->owner->hasMethod('pagesAffectedByUnpublishing')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user