diff --git a/acp/discord_notifications_module.php b/acp/discord_notifications_module.php index 55813e3..90736bb 100644 --- a/acp/discord_notifications_module.php +++ b/acp/discord_notifications_module.php @@ -58,9 +58,13 @@ class discord_notifications_module /** @var \phpbb\user */ protected $user; + /** @var bool */ + private $curl_available; + public function main($id, $mode) { global $phpbb_container; + $this->cache = $phpbb_container->get('cache.driver'); $this->config = $phpbb_container->get('config'); $this->db = $phpbb_container->get('dbal.conn'); @@ -69,6 +73,7 @@ public function main($id, $mode) $this->request = $phpbb_container->get('request'); $this->template = $phpbb_container->get('template'); $this->user = $phpbb_container->get('user'); + $this->curl_available = extension_loaded('curl'); $this->language->add_lang('acp_discord_notifications', 'mober/discordnotifications'); $this->page_title = $this->language->lang('ACP_DISCORD_NOTIFICATIONS'); @@ -146,6 +151,7 @@ public function main($id, $mode) 'DN_DEFAULT_WEBHOOK' => $this->config['discord_notification_default_webhook'], + 'DN_CURL_AVAILABLE' => $this->curl_available, 'U_ACTION' => $this->u_action, )); } diff --git a/adm/style/acp_discord_notifications_mapping.html b/adm/style/acp_discord_notifications_mapping.html index 5151791..0c5a3bf 100644 --- a/adm/style/acp_discord_notifications_mapping.html +++ b/adm/style/acp_discord_notifications_mapping.html @@ -4,6 +4,12 @@
{{ DN_ACP_DESCRIPTION }}
+{% if not DN_CURL_AVAILABLE %} +{{ lang('DN_MISSING_CURL') }}
+