From 06ca127c7023bb3ac0079928e86d5bf7aefc8611 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 24 Jun 2017 12:52:39 +0200 Subject: [PATCH] Code cleanup See #2286 --- constants.php | 1 + .../lib/system/worker/SitemapRebuildWorker.class.php | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/constants.php b/constants.php index 6cd03be089..fc5737c7e5 100644 --- a/constants.php +++ b/constants.php @@ -225,3 +225,4 @@ define('ENABLE_POLLING', 1); define('ENABLE_DESKTOP_NOTIFICATIONS', 1); define('FB_SHARE_APP_ID', ''); define('MODULE_CONTACT_FORM', 0); +define('SITEMAP_INDEX_TIME_FRAME', 365); diff --git a/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php b/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php index 6d0dd98dc7..c0c60c1327 100755 --- a/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php @@ -1,5 +1,6 @@ + * @var ObjectType[] */ - public $sitemapObjects = null; + public $sitemapObjects = []; /** * The current worker data. - * @var array + * @var mixed[] */ public $workerData = []; @@ -48,13 +49,13 @@ class SitemapRebuildWorker extends AbstractWorker { * The current temporary file as File object. * @var File */ - public $file = null; + public $file; /** * The user profile of the actual user. * @var User */ - private $actualUser = null; + private $actualUser; /** * @inheritDoc @@ -120,6 +121,7 @@ class SitemapRebuildWorker extends AbstractWorker { $sitemapObject = $this->sitemapObjects[$this->workerData['sitemap']]->getProcessor(); $sitemapLoopCount = $this->workerData['sitemapLoopCount']; + /** @var DatabaseObjectList $objectList */ $objectList = $sitemapObject->getObjectList(); if (SITEMAP_INDEX_TIME_FRAME > 0 && $sitemapObject->getLastModifiedColumn() !== null) { -- 2.20.1