From 42ce7cc42dee4d26ec2ddd6503f7bc9fd0b7ba16 Mon Sep 17 00:00:00 2001 From: Dao Hoang Son Date: Mon, 24 Aug 2020 16:46:00 +0700 Subject: [PATCH 1/3] Update incompatible with xf22 --- Mvc/Router.php | 5 +++-- XF/ApiOnly/Template/Templater.php | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Mvc/Router.php b/Mvc/Router.php index 6b9237ef..ed031e7a 100644 --- a/Mvc/Router.php +++ b/Mvc/Router.php @@ -31,9 +31,10 @@ public function __construct($app) * @param mixed $link * @param mixed|null $data * @param array $parameters + * @param mixed|null $hash * @return string */ - public function buildLink($link, $data = null, array $parameters = []) + public function buildLink($link, $data = null, array $parameters = [], $hash = null) { if (!isset($parameters[Listener::$accessTokenParamKey])) { /** @var mixed $session */ @@ -44,7 +45,7 @@ public function buildLink($link, $data = null, array $parameters = []) } } - return parent::buildLink($link, $data, $parameters); + return parent::buildLink($link, $data, $parameters, $hash); } /** diff --git a/XF/ApiOnly/Template/Templater.php b/XF/ApiOnly/Template/Templater.php index 28f6f838..b1695000 100644 --- a/XF/ApiOnly/Template/Templater.php +++ b/XF/ApiOnly/Template/Templater.php @@ -15,9 +15,13 @@ public function getDefaultAvatarStylingForApi($username) return $this->getDefaultAvatarStyling($username); } - public function renderTemplate($template, array $params = [], $addDefaultParams = true) - { - $output = parent::renderTemplate($template, $params, $addDefaultParams); + public function renderTemplate( + $template, + array $params = [], + $addDefaultParams = true, + \XF\Template\ExtensionSet $extensionOverrides = null + ) { + $output = parent::renderTemplate($template, $params, $addDefaultParams, $extensionOverrides); if ($template === 'public:bb_code_tag_attach' && isset($params['attachment'])) { /** @var \XF\Entity\Attachment $attachment */ From 6cd7c195b9661716e3a7f6b4374bc83cb39e950c Mon Sep 17 00:00:00 2001 From: Dao Hoang Son Date: Mon, 24 Aug 2020 16:46:35 +0700 Subject: [PATCH 2/3] v2.2.0 Alpha 1 -- version bump --- _output/option_groups/_metadata.json | 2 +- _output/option_groups/bdApi.json | 1 + _output/options/_metadata.json | 32 +++++++++---------- _output/options/bdApi_authCodeTTL.json | 1 + _output/options/bdApi_cors.json | 1 + _output/options/bdApi_logRetentionDays.json | 1 + _output/options/bdApi_paramLimitDefault.json | 1 + _output/options/bdApi_paramLimitMax.json | 1 + _output/options/bdApi_paramPageMax.json | 1 + .../options/bdApi_refreshTokenTTLDays.json | 1 + _output/options/bdApi_restrictAccess.json | 1 + .../bdApi_subscriptionColumnThreadPost.json | 1 + .../options/bdApi_subscriptionColumnUser.json | 1 + ...pi_subscriptionColumnUserNotification.json | 1 + .../options/bdApi_subscriptionThreadPost.json | 1 + _output/options/bdApi_subscriptionUser.json | 1 + .../bdApi_subscriptionUserNotification.json | 1 + _output/options/bdApi_tokenTTL.json | 1 + .../bdApi_userNotificationConversation.json | 1 + addon.json | 8 ++--- 20 files changed, 38 insertions(+), 21 deletions(-) diff --git a/_output/option_groups/_metadata.json b/_output/option_groups/_metadata.json index 00f7cff5..06be0185 100644 --- a/_output/option_groups/_metadata.json +++ b/_output/option_groups/_metadata.json @@ -1,5 +1,5 @@ { "bdApi.json": { - "hash": "6bd069e84ba8930264b993ce3e298aeb" + "hash": "34681743b9276a0f9d60823a46cce3ee" } } \ No newline at end of file diff --git a/_output/option_groups/bdApi.json b/_output/option_groups/bdApi.json index 68b0866f..bd81d012 100644 --- a/_output/option_groups/bdApi.json +++ b/_output/option_groups/bdApi.json @@ -1,5 +1,6 @@ { "icon": "", "display_order": 9999, + "advanced": false, "debug_only": false } \ No newline at end of file diff --git a/_output/options/_metadata.json b/_output/options/_metadata.json index fad9eeba..0750df08 100644 --- a/_output/options/_metadata.json +++ b/_output/options/_metadata.json @@ -1,50 +1,50 @@ { "bdApi_authCodeTTL.json": { - "hash": "b4e446ab89f79780d5feebc30db4b1cd" + "hash": "da794e2c00d7bc5126964300a5e72b4d" }, "bdApi_cors.json": { - "hash": "49bf33143e73258b7e96ede1f0dfd214" + "hash": "b0a70bd49ca1c0e02a613f21033bf82b" }, "bdApi_logRetentionDays.json": { - "hash": "25b4b3d13494a5a699d23f2276c7058d" + "hash": "46b137a4cf7648cba5553266b2e1427e" }, "bdApi_paramLimitDefault.json": { - "hash": "3c27531eabd7183a898bd70cfc3f1779" + "hash": "494f628de855c691a347083fa7d80cfc" }, "bdApi_paramLimitMax.json": { - "hash": "a1f7f555f66b5b2bd764580571050448" + "hash": "f477fab869fd0656bb9db5949050e2a2" }, "bdApi_paramPageMax.json": { - "hash": "f105958153411491e0ac4fa2e7c81c2b" + "hash": "77fbedd2fc0ae24e03d787c739c2faff" }, "bdApi_refreshTokenTTLDays.json": { - "hash": "0e0669e64483b08378cb183ce1c7fe09" + "hash": "98b7abcf3277c79a5ec0a89522c28fcf" }, "bdApi_restrictAccess.json": { - "hash": "49bf33143e73258b7e96ede1f0dfd214" + "hash": "b0a70bd49ca1c0e02a613f21033bf82b" }, "bdApi_subscriptionColumnThreadPost.json": { - "hash": "1d8ea47bd0923f2c4739e5c5f95cb6aa" + "hash": "0e61e84ef9ef69f97815a33228cd3c62" }, "bdApi_subscriptionColumnUser.json": { - "hash": "f2cbca5cf10d34674a814f0e2f201d59" + "hash": "dc3715519f68c17ec36ba7a452c028ab" }, "bdApi_subscriptionColumnUserNotification.json": { - "hash": "cd507424d986a96c97e3074a67735b2e" + "hash": "831852d30faf76b1ec6ab829f8d380c9" }, "bdApi_subscriptionThreadPost.json": { - "hash": "b9d8eaf2d22b9858c0120a889b005197" + "hash": "68ff233d244acc2665ab14058a57be5e" }, "bdApi_subscriptionUser.json": { - "hash": "3f4259d8dbc3e0a0a1c424af751faa4b" + "hash": "aa7af21bf3928b0132be4f2e244a876f" }, "bdApi_subscriptionUserNotification.json": { - "hash": "f7ef9569354e95a851937d8a81c0d325" + "hash": "b57e64ccdd8cfa7692bcdd77b1dc3e0c" }, "bdApi_tokenTTL.json": { - "hash": "5717f8abd434e3672265f1d6672f7668" + "hash": "8334129d2f01ebe9ee671c63687b194e" }, "bdApi_userNotificationConversation.json": { - "hash": "b3ca1de80285f0b6b8fc467b95402865" + "hash": "66f2f642d10198a3c2b25101226c0be5" } } \ No newline at end of file diff --git a/_output/options/bdApi_authCodeTTL.json b/_output/options/bdApi_authCodeTTL.json index 6a500373..8131f9b8 100644 --- a/_output/options/bdApi_authCodeTTL.json +++ b/_output/options/bdApi_authCodeTTL.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "30", "relations": { "bdApi": 100 diff --git a/_output/options/bdApi_cors.json b/_output/options/bdApi_cors.json index ff00dd1b..c04f9442 100644 --- a/_output/options/bdApi_cors.json +++ b/_output/options/bdApi_cors.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "0", "relations": { "bdApi": 10 diff --git a/_output/options/bdApi_logRetentionDays.json b/_output/options/bdApi_logRetentionDays.json index eed119b2..4634eaf3 100644 --- a/_output/options/bdApi_logRetentionDays.json +++ b/_output/options/bdApi_logRetentionDays.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "90", "relations": { "bdApi": 600 diff --git a/_output/options/bdApi_paramLimitDefault.json b/_output/options/bdApi_paramLimitDefault.json index 2ea51f33..3a3b25a6 100644 --- a/_output/options/bdApi_paramLimitDefault.json +++ b/_output/options/bdApi_paramLimitDefault.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "20", "relations": { "bdApi": 500 diff --git a/_output/options/bdApi_paramLimitMax.json b/_output/options/bdApi_paramLimitMax.json index 85a231f4..13ad870e 100644 --- a/_output/options/bdApi_paramLimitMax.json +++ b/_output/options/bdApi_paramLimitMax.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "100", "relations": { "bdApi": 510 diff --git a/_output/options/bdApi_paramPageMax.json b/_output/options/bdApi_paramPageMax.json index de8cd867..3667c2f4 100644 --- a/_output/options/bdApi_paramPageMax.json +++ b/_output/options/bdApi_paramPageMax.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "0", "relations": { "bdApi": 550 diff --git a/_output/options/bdApi_refreshTokenTTLDays.json b/_output/options/bdApi_refreshTokenTTLDays.json index eab5a481..378b8346 100644 --- a/_output/options/bdApi_refreshTokenTTLDays.json +++ b/_output/options/bdApi_refreshTokenTTLDays.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "14", "relations": { "bdApi": 120 diff --git a/_output/options/bdApi_restrictAccess.json b/_output/options/bdApi_restrictAccess.json index ff00dd1b..c04f9442 100644 --- a/_output/options/bdApi_restrictAccess.json +++ b/_output/options/bdApi_restrictAccess.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "0", "relations": { "bdApi": 10 diff --git a/_output/options/bdApi_subscriptionColumnThreadPost.json b/_output/options/bdApi_subscriptionColumnThreadPost.json index 39dcb84c..95275059 100644 --- a/_output/options/bdApi_subscriptionColumnThreadPost.json +++ b/_output/options/bdApi_subscriptionColumnThreadPost.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyTextboxOption", + "advanced": false, "default_value": "", "relations": { "bdApi": 70 diff --git a/_output/options/bdApi_subscriptionColumnUser.json b/_output/options/bdApi_subscriptionColumnUser.json index 45fad2be..d5a3f7cf 100644 --- a/_output/options/bdApi_subscriptionColumnUser.json +++ b/_output/options/bdApi_subscriptionColumnUser.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyTextboxOption", + "advanced": false, "default_value": "", "relations": { "bdApi": 60 diff --git a/_output/options/bdApi_subscriptionColumnUserNotification.json b/_output/options/bdApi_subscriptionColumnUserNotification.json index cd4d921d..3a2be280 100644 --- a/_output/options/bdApi_subscriptionColumnUserNotification.json +++ b/_output/options/bdApi_subscriptionColumnUserNotification.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyTextboxOption", + "advanced": false, "default_value": "", "relations": { "bdApi": 65 diff --git a/_output/options/bdApi_subscriptionThreadPost.json b/_output/options/bdApi_subscriptionThreadPost.json index 469ede3c..ae6f4394 100644 --- a/_output/options/bdApi_subscriptionThreadPost.json +++ b/_output/options/bdApi_subscriptionThreadPost.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyOnOffOption", + "advanced": false, "default_value": "0", "relations": { "bdApi": 35 diff --git a/_output/options/bdApi_subscriptionUser.json b/_output/options/bdApi_subscriptionUser.json index a1a0529f..ebcfda91 100644 --- a/_output/options/bdApi_subscriptionUser.json +++ b/_output/options/bdApi_subscriptionUser.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyOnOffOption", + "advanced": false, "default_value": "0", "relations": { "bdApi": 20 diff --git a/_output/options/bdApi_subscriptionUserNotification.json b/_output/options/bdApi_subscriptionUserNotification.json index 58f8de91..417eb5e1 100644 --- a/_output/options/bdApi_subscriptionUserNotification.json +++ b/_output/options/bdApi_subscriptionUserNotification.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "Xfrocks\\Api\\Option\\ColumnOption", "validation_method": "verifyOnOffOption", + "advanced": false, "default_value": "0", "relations": { "bdApi": 25 diff --git a/_output/options/bdApi_tokenTTL.json b/_output/options/bdApi_tokenTTL.json index 0a3de9d8..8e9855d5 100644 --- a/_output/options/bdApi_tokenTTL.json +++ b/_output/options/bdApi_tokenTTL.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "3600", "relations": { "bdApi": 110 diff --git a/_output/options/bdApi_userNotificationConversation.json b/_output/options/bdApi_userNotificationConversation.json index 88c4ab8f..6e16a739 100644 --- a/_output/options/bdApi_userNotificationConversation.json +++ b/_output/options/bdApi_userNotificationConversation.json @@ -5,6 +5,7 @@ "sub_options": [], "validation_class": "", "validation_method": "", + "advanced": false, "default_value": "1", "relations": { "bdApi": 30 diff --git a/addon.json b/addon.json index 3acb65a2..d436021d 100644 --- a/addon.json +++ b/addon.json @@ -2,8 +2,8 @@ "legacy_addon_id": "bdApi", "title": "[bd] API", "description": "", - "version_id": 2000133, - "version_string": "2.0.1 Beta 3", + "version_id": 2020011, + "version_string": "2.2.0 Alpha 1", "dev": "", "dev_url": "", "faq_url": "", @@ -11,8 +11,8 @@ "extra_urls": [], "require": { "XF": [ - 2010000, - "XenForo 2.1.0" + 2020000, + "XenForo 2.2.0" ] }, "icon": "" From 93d0a9e3cf1337373940931e3b96e04334135c3b Mon Sep 17 00:00:00 2001 From: Dao Hoang Son Date: Wed, 14 Oct 2020 16:47:07 +0700 Subject: [PATCH 3/3] v2.2.0 Beta 1 -- version bump --- addon.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon.json b/addon.json index d436021d..e4d8ce3f 100644 --- a/addon.json +++ b/addon.json @@ -2,8 +2,8 @@ "legacy_addon_id": "bdApi", "title": "[bd] API", "description": "", - "version_id": 2020011, - "version_string": "2.2.0 Alpha 1", + "version_id": 2020031, + "version_string": "2.2.0 Beta 1", "dev": "", "dev_url": "", "faq_url": "",