diff --git a/core/components/tickets/processors/mgr/ticket/update.class.php b/core/components/tickets/processors/mgr/ticket/update.class.php index c5e61fa0..8763152c 100644 --- a/core/components/tickets/processors/mgr/ticket/update.class.php +++ b/core/components/tickets/processors/mgr/ticket/update.class.php @@ -34,6 +34,10 @@ public function initialize() $res->set('class_key', $this->classKey); $res->save(); } + + $this->setDefaultProperties(array( + "syncsite" => $this->modx->getOption("syncsite_default", false), + )); return parent::initialize(); } @@ -268,10 +272,16 @@ public function checkPublishingPermissions() */ public function clearCache() { - $this->object->clearCache(); - /** @var TicketsSection $section */ - if ($section = $this->object->getOne('Section')) { - $section->clearCache(); + parent::clearCache(); + + $syncSite = $this->getProperty('syncsite',false); + $clearCache = $this->getProperty('clearCache',false); + + if (!empty($syncSite) || !empty($clearCache)) { + /** @var TicketsSection $section */ + if ($section = $this->object->getOne('Section')) { + $section->clearCache(); + } } } @@ -400,4 +410,4 @@ public function processFiles() return $count; } -} \ No newline at end of file +}