Skip to content
Snippets Groups Projects
Commit 7f223acb authored by Benni Mack's avatar Benni Mack Committed by Oliver Bartsch
Browse files

[BUGFIX] Clean up TCA Tree code base

This change simplifies further
work on the TCA Tree logic.

a) use imported names
b) ensure to use int|string for Node->getId() as Core uses this
   for integers within e.g. sys_category
c) fix some phpdoc infos
d) remove an unused property
e) use proper casting for integers
f) use $this->lookupField instead of $this->getLookupField()
   when using 10000 of categories, this function call is superfluous.

By using int|string, the changed code

  if ($node->getId() !== 0 && $node->getId() !== '0')

saves 1 (!) DB query on every request.

This change is meant also to be backported
to v11, for this reason no changes to the types within properties are
made (only type hints).

Resolves: #99005
Releases: main, 11.5
Change-Id: I291cdd0925f77b0e48e224f207eb5e1b0c4fa041
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76444


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent a96758c7
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment