From fa37939b6c0d7decc860b7652affc54f469a3454 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 24 Dec 2025 15:42:54 +0100 Subject: [PATCH] Fix wrong spelling of 'identifier' --- .../lib/system/gridView/AbstractGridView.class.php | 4 ++-- .../html/node/AbstractHtmlNodeProcessor.class.php | 14 +++++++++++++- .../html/output/node/HtmlOutputNodePre.class.php | 4 ++-- .../node/HtmlOutputNodeWoltlabMetacode.class.php | 2 +- .../node/HtmlOutputNodeWoltlabQuote.class.php | 2 +- .../node/HtmlOutputNodeWoltlabSpoiler.class.php | 2 +- .../output/node/HtmlOutputUnfurlUrlNode.class.php | 2 +- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/system/gridView/AbstractGridView.class.php b/wcfsetup/install/files/lib/system/gridView/AbstractGridView.class.php index b296c42705c..8a664bb0b21 100644 --- a/wcfsetup/install/files/lib/system/gridView/AbstractGridView.class.php +++ b/wcfsetup/install/files/lib/system/gridView/AbstractGridView.class.php @@ -396,9 +396,9 @@ public function renderQuickInteractions(DatabaseObject $row): string * * @param TDatabaseObject $row */ - protected function getData(DatabaseObject $row, string $identifer): mixed + protected function getData(DatabaseObject $row, string $identifier): mixed { - return $row->__get($identifer); + return $row->__get($identifier); } /** diff --git a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php index 4f36e1f0b38..217280bcfca 100644 --- a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php @@ -418,8 +418,9 @@ protected function invokeNodeHandlers($classNamePattern, array $skipTags = [], ? * Returns a randomly generated tagName+identifier pair for tags. * * @return array{0: string, 1: string} + * @since 6.2 */ - public function getWcfNodeIdentifer(): array + public function getWcfNodeIdentifier(): array { static $counter = 0; static $prefix = null; @@ -435,4 +436,15 @@ public function getWcfNodeIdentifer(): array return [$identifier, "wcfNode-{$identifier}"]; } + + /** + * Returns a randomly generated tagName+identifier pair for tags. + * + * @return array{0: string, 1: string} + * @deprecated 6.2 Use `getWcfNodeIdentifier` instead. + */ + public function getWcfNodeIdentifer(): array + { + return $this->getWcfNodeIdentifier(); + } } diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php index 2fa591b07ad..273c2f41acb 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php @@ -37,7 +37,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc /** @var \DOMElement $element */ foreach ($elements as $element) { if ($element->getAttribute('class') === 'woltlabHtml') { - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, ['rawHTML' => $element->textContent]); $htmlNodeProcessor->renameTag($element, $tagName); @@ -51,7 +51,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc $prefix = ''; // Create a unique prefix if possible $prefix = \str_replace('.', '_', $context['objectType']) . '_' . $context['objectID'] . '_'; - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [ 'content' => $element->textContent, 'file' => $element->getAttribute('data-file'), diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabMetacode.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabMetacode.class.php index 4a2b416a213..d6458758a4d 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabMetacode.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabMetacode.class.php @@ -30,7 +30,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc $name = $element->getAttribute('data-name'); $attributes = $element->getAttribute('data-attributes'); - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $element = $htmlNodeProcessor->renameTag($element, $tagName); diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabQuote.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabQuote.class.php index e042d440275..ad9ed8f34ad 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabQuote.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabQuote.class.php @@ -50,7 +50,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc $link = WCF::getPath() . $link; } - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [ 'author' => $element->getAttribute('data-author'), 'collapse' => $collapse, diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabSpoiler.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabSpoiler.class.php index 13fea1e4174..edac41f28bd 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabSpoiler.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabSpoiler.class.php @@ -29,7 +29,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc /** @var \DOMElement $element */ foreach ($elements as $element) { if ($this->outputType === 'text/html') { - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $htmlNodeProcessor->addNodeData( $this, $nodeIdentifier, diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputUnfurlUrlNode.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputUnfurlUrlNode.class.php index 0e13d237869..18610a048d7 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputUnfurlUrlNode.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputUnfurlUrlNode.class.php @@ -61,7 +61,7 @@ public function process(array $elements, AbstractHtmlNodeProcessor $htmlNodeProc $enableUgc = $processor->enableUgc; } - [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifer(); + [$nodeIdentifier, $tagName] = $htmlNodeProcessor->getWcfNodeIdentifier(); $htmlNodeProcessor->addNodeData($this, $nodeIdentifier, [ 'urlId' => $attribute, 'enableUgc' => $enableUgc,