From bf60e58fded867a15699484f38a8dca6e8d500d5 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Wed, 15 Jul 2020 10:39:49 +0200 Subject: [PATCH] Register sitemap values in the registry during update --- .../update_com.woltlab.wcf_5.3_sitemaps.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_sitemaps.php diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_sitemaps.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_sitemaps.php new file mode 100644 index 0000000000..ad22f09574 --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_sitemaps.php @@ -0,0 +1,24 @@ + + * @package WoltLabSuite\Core + */ + +// HEADS UP: This script must be executed, BEFORE the objectType-PIP is executed. + +$sitemapObjects = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.sitemap.object'); + +foreach ($sitemapObjects as $sitemapObject) { + RegistryHandler::getInstance()->set('com.woltlab.wcf', SitemapRebuildWorker::REGISTRY_PREFIX . $sitemapObject->objectType, serialize([ + 'priority' => $sitemapObject->priority, + 'changeFreq' => $sitemapObject->changeFreq, + 'rebuildTime' => $sitemapObject->rebuildTime, + 'isDisabled' => $sitemapObject->isDisabled, + ])); +} -- 2.20.1