From 0ee231be6f43e3b7fe9c9b13891606b6edf483f4 Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Sat, 11 Nov 2023 11:54:09 +0100 Subject: [PATCH 1/8] replace `CryptoUtil::randomBytes` with `random_bytes` --- files/lib/acp/form/ApiSecretAddForm.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lib/acp/form/ApiSecretAddForm.class.php b/files/lib/acp/form/ApiSecretAddForm.class.php index 17a170e..654610e 100644 --- a/files/lib/acp/form/ApiSecretAddForm.class.php +++ b/files/lib/acp/form/ApiSecretAddForm.class.php @@ -77,7 +77,7 @@ public function readFormParameters() { if (!empty($_POST['secretKey'])) { $this->secretKey = StringUtil::trim($_POST['secretKey']); } else { - $this->secretKey = bin2hex(CryptoUtil::randomBytes(16)); + $this->secretKey = bin2hex(random_bytes(16)); } if (!empty($_POST['secretDescription'])) { From da74b2cbd7415d438f4d20664d43e1c7be2798f9 Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Sat, 11 Nov 2023 11:55:49 +0100 Subject: [PATCH 2/8] add missing uses --- files/lib/api/ThreadApi.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/lib/api/ThreadApi.class.php b/files/lib/api/ThreadApi.class.php index b4fee83..8da2762 100644 --- a/files/lib/api/ThreadApi.class.php +++ b/files/lib/api/ThreadApi.class.php @@ -1,9 +1,12 @@ Date: Sat, 11 Nov 2023 11:57:41 +0100 Subject: [PATCH 3/8] add missing properties --- files/lib/api/ThreadApi.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/files/lib/api/ThreadApi.class.php b/files/lib/api/ThreadApi.class.php index 8da2762..214ea62 100644 --- a/files/lib/api/ThreadApi.class.php +++ b/files/lib/api/ThreadApi.class.php @@ -14,6 +14,21 @@ * @package at.megathorx.wsc-api */ class ThreadApi extends BaseApi { + protected $attachmentHandler; + + protected $htmlInputProcessor; + + protected $enableTimeObj; + + protected $subscribeThread; + + protected $optionHandler; + + protected $type; + + protected $boardIDs; + + protected $labelIDs; /** * @api From a8e27e4377966fae1f1b3a77b3f88537a921ead0 Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Sat, 11 Nov 2023 11:59:05 +0100 Subject: [PATCH 4/8] add missing types --- .../notification/event/WscApiUserNotificationEvent.class.php | 4 ++-- .../object/ApiNotificationUserNotificationObject.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/lib/system/user/notification/event/WscApiUserNotificationEvent.class.php b/files/lib/system/user/notification/event/WscApiUserNotificationEvent.class.php index 6e5b70a..cf62d53 100644 --- a/files/lib/system/user/notification/event/WscApiUserNotificationEvent.class.php +++ b/files/lib/system/user/notification/event/WscApiUserNotificationEvent.class.php @@ -31,7 +31,7 @@ protected function prepare() { /** * @inheritDoc */ - public function getTitle() { + public function getTitle(): string { return $this->getUserNotificationObject()->title; } @@ -69,7 +69,7 @@ public function getEventHash() { /** * @inheritDoc */ - public function getLink() { + public function getLink(): string { return $this->getUserNotificationObject()->url; } diff --git a/files/lib/system/user/notification/object/ApiNotificationUserNotificationObject.class.php b/files/lib/system/user/notification/object/ApiNotificationUserNotificationObject.class.php index 14d60f8..114c6e6 100644 --- a/files/lib/system/user/notification/object/ApiNotificationUserNotificationObject.class.php +++ b/files/lib/system/user/notification/object/ApiNotificationUserNotificationObject.class.php @@ -13,7 +13,7 @@ class ApiNotificationUserNotificationObject extends DatabaseObjectDecorator impl /** * @inheritDoc */ - public function getTitle() { + public function getTitle(): string { return $this->getDecoratedObject()->title; } From edcce04bf6b7bf138812570089128eeb56ddbea2 Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Sat, 11 Nov 2023 12:02:27 +0100 Subject: [PATCH 5/8] change minimum version --- package.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package.xml b/package.xml index 828d268..232e005 100644 --- a/package.xml +++ b/package.xml @@ -13,12 +13,8 @@ https://github.com/eXo-OpenSource/wsc-api - com.woltlab.wcf + com.woltlab.wcf - - - - From 19c43988753e660d2b3d02ff3789531d43ed244b Mon Sep 17 00:00:00 2001 From: Peter Lohse Date: Sat, 11 Nov 2023 12:05:32 +0100 Subject: [PATCH 6/8] change icons for FA6 --- acpMenu.xml | 2 +- acptemplates/apiSecretAdd.tpl | 2 +- acptemplates/apiSecretDocumentation.tpl | 2 +- acptemplates/apiSecretList.tpl | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acpMenu.xml b/acpMenu.xml index d0df55f..6f39d1d 100644 --- a/acpMenu.xml +++ b/acpMenu.xml @@ -23,7 +23,7 @@ wcf\acp\form\ApiSecretAddForm wcf.acp.menu.link.wscApi.secrets.list admin.wscApi.canManageSecret - fa-plus + plus diff --git a/acptemplates/apiSecretAdd.tpl b/acptemplates/apiSecretAdd.tpl index d3230fc..11fe949 100644 --- a/acptemplates/apiSecretAdd.tpl +++ b/acptemplates/apiSecretAdd.tpl @@ -8,7 +8,7 @@