mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00: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:
parent
8c79920a55
commit
a49eef594b
2 changed files with 29 additions and 7 deletions
|
@ -38,9 +38,8 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
'captcha_gd_wave' => 'CAPTCHA_GD_WAVE',
|
'captcha_gd_wave' => 'CAPTCHA_GD_WAVE',
|
||||||
'captcha_gd_3d_noise' => 'CAPTCHA_GD_3D_NOISE',
|
'captcha_gd_3d_noise' => 'CAPTCHA_GD_3D_NOISE',
|
||||||
'captcha_gd_fonts' => 'CAPTCHA_GD_FONTS',
|
'captcha_gd_fonts' => 'CAPTCHA_GD_FONTS',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
function phpbb_captcha_gd()
|
function phpbb_captcha_gd()
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
@ -59,7 +58,19 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
|
|
||||||
function is_available()
|
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()
|
function get_name()
|
||||||
|
@ -79,7 +90,6 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
|
|
||||||
$user->add_lang('acp/board');
|
$user->add_lang('acp/board');
|
||||||
|
|
||||||
|
|
||||||
$config_vars = array(
|
$config_vars = array(
|
||||||
'enable_confirm' => 'REG_ENABLE',
|
'enable_confirm' => 'REG_ENABLE',
|
||||||
'enable_post_confirm' => 'POST_ENABLE',
|
'enable_post_confirm' => 'POST_ENABLE',
|
||||||
|
@ -125,7 +135,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function execute_demo()
|
function execute_demo()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -138,7 +148,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
parent::execute_demo();
|
parent::execute_demo();
|
||||||
$config = $config_old;
|
$config = $config_old;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -47,7 +47,19 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha
|
||||||
|
|
||||||
function is_available()
|
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()
|
function get_name()
|
||||||
|
|
Loading…
Add table
Reference in a new issue