Skip to content

Commit

Permalink
Check if curl extension is available when installing
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ober committed Nov 9, 2023
1 parent 230ef3a commit 93c3b35
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace mober\discordnotifications;

class ext extends \phpbb\extension\base
{
/**
* {@inheritDoc}
*/
public function is_enableable()
{
$language = $this->container->get('language');
$language->add_lang('acp_discord_notifications', 'mober/discordnotifications');

$curl_available = extension_loaded('curl');
if (!$curl_available)
{
return $language->lang('DN_MISSING_CURL');
}

return true;
}
}

0 comments on commit 93c3b35

Please sign in to comment.