mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Fix bug #46455 - Make sure can_load_dll() is available.
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9595 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -38,7 +38,6 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
'captcha_gd_wave' => 'CAPTCHA_GD_WAVE',
|
||||
'captcha_gd_3d_noise' => 'CAPTCHA_GD_3D_NOISE',
|
||||
'captcha_gd_fonts' => 'CAPTCHA_GD_FONTS',
|
||||
|
||||
);
|
||||
|
||||
function phpbb_captcha_gd()
|
||||
@@ -59,7 +58,19 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
|
||||
function is_available()
|
||||
{
|
||||
return (@extension_loaded('gd') || can_load_dll('gd'));
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
if (@extension_loaded('gd'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!function_exists('can_load_dll'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
}
|
||||
|
||||
return can_load_dll('gd');
|
||||
}
|
||||
|
||||
function get_name()
|
||||
@@ -79,7 +90,6 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
|
||||
$config_vars = array(
|
||||
'enable_confirm' => 'REG_ENABLE',
|
||||
'enable_post_confirm' => 'POST_ENABLE',
|
||||
|
@@ -47,7 +47,19 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha
|
||||
|
||||
function is_available()
|
||||
{
|
||||
return (@extension_loaded('gd') || can_load_dll('gd'));
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
if (@extension_loaded('gd'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!function_exists('can_load_dll'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
}
|
||||
|
||||
return can_load_dll('gd');
|
||||
}
|
||||
|
||||
function get_name()
|
||||
|
Reference in New Issue
Block a user