Adjusted class hierachy for some rebuild data workers
authorAlexander Ebert <ebert@woltlab.com>
Thu, 10 Jan 2019 12:05:09 +0000 (13:05 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 10 Jan 2019 12:05:09 +0000 (13:05 +0100)
Fixes #2760

wcfsetup/install/files/lib/system/worker/DatabaseConvertEncodingWorker.class.php
wcfsetup/install/files/lib/system/worker/IRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php

index e9a70e40b84246f20b497c622497cb493c444b84..5d86779dc9120bb10b6873e593d2c93c96792ee2 100644 (file)
@@ -7,11 +7,11 @@ use wcf\system\WCF;
  * Worker implementation for database table encoding conversion.
  * 
  * @author     Alexander Ebert
- * @copyright  2001-2018 WoltLab GmbH
+ * @copyright  2001-2019 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\System\Worker
  */
-class DatabaseConvertEncodingWorker extends AbstractWorker {
+class DatabaseConvertEncodingWorker extends AbstractRebuildDataWorker {
        /**
         * @inheritDoc
         */
index 297747bdd320d8ec43109fcaef0e2d72c0931bba..7b793e31503d42eb54ba97e14402ed8423fb6535 100644 (file)
@@ -1,11 +1,12 @@
 <?php
 namespace wcf\system\worker;
+use wcf\data\DatabaseObjectList;
 
 /**
  * Every rebuild data worker has to implement this interface.
  * 
  * @author     Marcel Werk
- * @copyright  2001-2018 WoltLab GmbH
+ * @copyright  2001-2019 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\System\Worker
  */
@@ -13,7 +14,7 @@ interface IRebuildDataWorker extends IWorker {
        /**
         * Returns the list of objects.
         * 
-        * @return      \wcf\data\DatabaseObjectList
+        * @return DatabaseObjectList|null
         */
        public function getObjectList();
 }
index c589e42b014ddae6d507400ba683ea5136bb22f9..f23545848a6f4a64f4ad1bb37b4fb5e12ebc4fe7 100755 (executable)
@@ -19,12 +19,12 @@ use wcf\util\MessageUtil;
  * Worker implementation for rebuilding all sitemaps.
  *
  * @author     Joshua Ruesweg
- * @copyright  2001-2018 WoltLab GmbH
+ * @copyright  2001-2019 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\System\Worker
  * @since      3.1
  */
-class SitemapRebuildWorker extends AbstractWorker {
+class SitemapRebuildWorker extends AbstractRebuildDataWorker {
        /**
         * The limit of objects in one sitemap file.
         */
@@ -62,7 +62,7 @@ class SitemapRebuildWorker extends AbstractWorker {
        /**
         * @inheritDoc
         */
-       protected function countObjects() {
+       public function countObjects() {
                // changes session owner to 'System' during the building of sitemaps
                $this->changeUserToGuest();