Skip to content

Commit acadf0f

Browse files
committed
Reduce length of the 'object ids' parameter
1 parent 3c1b821 commit acadf0f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

wcfsetup/install/files/lib/acp/action/ArticleCategoryAction.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public function handle(ServerRequestInterface $request): ResponseInterface
3434
$request->getQueryParams(),
3535
<<<'EOT'
3636
array {
37-
objectIDs: positive-int[]
37+
ids: positive-int[]
3838
}
3939
EOT
4040
);
4141

42-
if ($parameters['objectIDs'] === []) {
42+
if ($parameters['ids'] === []) {
4343
throw new IllegalLinkException();
4444
}
4545

@@ -62,7 +62,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
6262
WHERE articleID = ?";
6363
$statement = WCF::getDB()->prepare($sql);
6464

65-
foreach ($parameters['objectIDs'] as $articleID) {
65+
foreach ($parameters['ids'] as $articleID) {
6666
$statement->execute([$data['categoryID'], $articleID]);
6767
}
6868

wcfsetup/install/files/lib/acp/action/TagSynonymAction.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ public function handle(ServerRequestInterface $request): ResponseInterface
4242
$parameters = Helper::mapQueryParameters(
4343
$request->getQueryParams(),
4444
<<<'EOT'
45-
array {
46-
objectIDs: array<positive-int>
47-
}
48-
EOT,
45+
array {
46+
ids: array<positive-int>
47+
}
48+
EOT
4949
);
5050
} catch (MappingError) {
5151
throw new IllegalLinkException();
5252
}
5353

54-
if (\count($parameters['objectIDs']) < 2) {
54+
if (\count($parameters['ids']) < 2) {
5555
throw new IllegalLinkException();
5656
}
5757

5858
$tagList = new TagList();
59-
$tagList->setObjectIDs($parameters['objectIDs']);
59+
$tagList->setObjectIDs($parameters['ids']);
6060
$tagList->readObjects();
6161

6262
$form = $this->getForm($tagList->getObjects());

wcfsetup/install/files/lib/action/AbstractModerationAction.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ public function handle(ServerRequestInterface $request): ResponseInterface
4040
<<<'EOT'
4141
array {
4242
id?: positive-int,
43-
objectIDs?: positive-int[]
43+
ids?: positive-int[]
4444
}
4545
EOT
4646
);
4747

48-
if (!isset($parameters['id']) && !isset($parameters['objectIDs'])) {
48+
if (!isset($parameters['id']) && !isset($parameters['ids'])) {
4949
throw new IllegalLinkException();
5050
}
5151

52-
$objectIDs = $parameters['objectIDs'] ?? [$parameters['id']];
52+
$objectIDs = $parameters['ids'] ?? [$parameters['id']];
5353
$moderationList = new ModerationQueueList();
5454
$moderationList->setObjectIDs($objectIDs);
5555
$moderationList->readObjects();

wcfsetup/install/files/lib/system/interaction/bulk/BulkFormBuilderDialogInteraction.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use wcf\util\StringUtil;
1010

1111
/**
12-
* Represents a bulk interaction that call a form builder action.
12+
* Represents a bulk interaction that calls a form builder action.
1313
*
1414
* @author Olaf Braun
1515
* @copyright 2001-2025 WoltLab GmbH
@@ -35,7 +35,7 @@ public function render(array $objects): string
3535
$objectIDs = \array_values(\array_map(fn(DatabaseObject $object) => $object->getObjectID(), $objects));
3636
$endpoint = StringUtil::encodeHTML(
3737
LinkHandler::getInstance()->getControllerLink($this->controller, [
38-
'objectIDs' => $objectIDs
38+
'ids' => $objectIDs
3939
])
4040
);
4141

0 commit comments

Comments
 (0)