[BUGFIX] Only perform reindex if data has indeed changed 18/51018/2
authorThomas Hohn <tho@systime.dk>
Tue, 13 Dec 2016 20:46:38 +0000 (21:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 27 Jan 2017 10:26:31 +0000 (11:26 +0100)
Change-Id: I889264f34599be556e16b3d37825a3761b681e70
Resolves: #79068
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/51018
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Tested-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/DataHandling/PlainDataResolver.php

index 375075a..cd2c0c1 100644 (file)
@@ -136,17 +136,21 @@ class PlainDataResolver
             return $this->resolvedIds;
         }
 
-        $ids = $this->reindex(
-            $this->processVersionOverlays($this->liveIds)
-        );
-        $ids = $this->reindex(
-            $this->processSorting($ids)
-        );
-        $ids = $this->reindex(
-            $this->applyLiveIds($ids)
-        );
+        $this->resolvedIds = $this->processVersionOverlays($this->liveIds);
+        if ($this->resolvedIds !== $this->liveIds) {
+            $this->resolvedIds = $this->reindex($this->resolvedIds);
+        }
+
+        $tempIds = $this->processSorting($this->resolvedIds);
+        if ($tempIds !== $this->resolvedIds) {
+            $this->resolvedIds = $this->reindex($tempIds);
+        }
+
+        $tempIds = $this->applyLiveIds($this->resolvedIds);
+        if ($tempIds !== $this->resolvedIds) {
+            $this->resolvedIds = $this->reindex($tempIds);
+        }
 
-        $this->resolvedIds = $ids;
         return $this->resolvedIds;
     }