Skip to content

Commit

Permalink
[TASK] Remove unused property ReferenceIndex->WSOL
Browse files Browse the repository at this point in the history
The public property in ReferenceIndex->WSOL was removed in 2006
and documented like that, but it has no effect, as it was never evaluated
since 14 years.

This property is removed, as the recommended way is to use the
->setWorkspaceId() anyway since a few years.

Resolves: #90217
Releases: master
Change-Id: Ib3b58c6823ec78cb0b51f19b104aa80186f0dfe6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63047
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
  • Loading branch information
bmack authored and ohader committed Jan 27, 2020
1 parent a0b9ca1 commit 0465759
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 1 addition & 14 deletions typo3/sysext/core/Classes/Database/ReferenceIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,6 @@ class ReferenceIndex implements LoggerAwareInterface
*/
public $temp_flexRelations = [];

/**
* This variable used to indicate whether referencing should take workspace overlays into account
* It is not used since commit 0c34dac08605ba from 10.04.2006, the bug is investigated in https://forge.typo3.org/issues/65725
*
* @var bool
* @see getRelations()
*/
public $WSOL = false;

/**
* An index of all found references of a single record created in createEntryData() and accumulated in generateRefIndexData()
*
Expand Down Expand Up @@ -207,10 +198,6 @@ public function getWorkspaceId()
*/
public function updateRefIndexTable($tableName, $uid, $testOnly = false)
{
// First, secure that the index table is not updated with workspace tainted relations:
$this->WSOL = false;

// Init:
$result = [
'keptNodes' => 0,
'deletedNodes' => 0,
Expand Down Expand Up @@ -322,7 +309,7 @@ public function updateRefIndexTable($tableName, $uid, $testOnly = false)

/**
* Returns array of arrays with an index of all references found in record from table/uid
* If the result is used to update the sys_refindex table then ->WSOL must NOT be TRUE (no workspace overlay anywhere!)
* If the result is used to update the sys_refindex table then no workspaces must be applied (no workspace overlay anywhere!)
*
* @param string $tableName Table name from $GLOBALS['TCA']
* @param int $uid Record UID
Expand Down
2 changes: 0 additions & 2 deletions typo3/sysext/impexp/Classes/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ public function export_addRecord($table, $row, $relationLevel = 0)
// Initialize reference index object:
$refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
$refIndexObj->enableRuntimeCache();
// Yes to workspace overlays for exporting....
$refIndexObj->WSOL = true;
$relations = $refIndexObj->getRelations($table, $row);
$relations = $this->fixFileIDsInRelations($relations);
$relations = $this->removeSoftrefsHavingTheSameDatabaseRelation($relations);
Expand Down

0 comments on commit 0465759

Please sign in to comment.