From 1cff2fc3c804423edb8ea8e89ca8fea69a7453db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Mon, 30 Oct 2017 15:34:17 +0100 Subject: [PATCH] [Cache] Cleanup BC code from 6.7 --- .../Persistence/Cache/ObjectStateHandler.php | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/eZ/Publish/Core/Persistence/Cache/ObjectStateHandler.php b/eZ/Publish/Core/Persistence/Cache/ObjectStateHandler.php index 06402a82dd0..7b22f2fce82 100644 --- a/eZ/Publish/Core/Persistence/Cache/ObjectStateHandler.php +++ b/eZ/Publish/Core/Persistence/Cache/ObjectStateHandler.php @@ -67,19 +67,9 @@ public function loadAllGroups($offset = 0, $limit = -1) $this->logger->logCall(__METHOD__, array('offset' => $offset, 'limit' => $limit)); $stateGroups = $this->persistenceHandler->objectStateHandler()->loadAllGroups(0, -1); $cache->set($stateGroups)->save(); - $stateGroups = array_slice($stateGroups, $offset, $limit > -1 ?: null); - } else { - $stateGroups = array_slice($stateGroups, $offset, $limit > -1 ?: null); - // BC for updates to 6.7LTS installs where cache contains ID's and not objects - // @todo Remove in later branches - foreach ($stateGroups as $key => $stateGroup) { - if (is_numeric($stateGroup)) { - $stateGroups[$key] = $this->loadGroup($stateGroup); - } - } } - return $stateGroups; + return array_slice($stateGroups, $offset, $limit > -1 ?: null); } /** @@ -93,14 +83,6 @@ public function loadObjectStates($groupId) $this->logger->logCall(__METHOD__, array('groupId' => $groupId)); $objectStates = $this->persistenceHandler->objectStateHandler()->loadObjectStates($groupId); $cache->set($objectStates)->save(); - } else { - // BC for updates to 6.7LTS installs where cache contains ID's and not objects - // @todo Remove in later branches - foreach ($objectStates as $key => $state) { - if (is_numeric($state)) { - $objectStates[$key] = $this->load($state); - } - } } return $objectStates;