From ed8c16bf0ddb8fc8723aa870607f255d80aab55b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 3 May 2014 16:34:25 +0200 Subject: [ticket/10073] Fallback to board_contact when contact page is disabled PHPBB3-10073 --- phpBB/includes/captcha/plugins/captcha_abstract.php | 10 +++++++++- phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/captcha/plugins') diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php index cbf57cab9a..c75a4ffb83 100644 --- a/phpBB/includes/captcha/plugins/captcha_abstract.php +++ b/phpBB/includes/captcha/plugins/captcha_abstract.php @@ -96,7 +96,15 @@ class phpbb_captcha_plugins_captcha_abstract else { $link = append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type); - $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '', ''); + if ($config['contact_admin_form_enable']) + { + $contact_link = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin'); + } + else + { + $contact_link = 'mailto:' . htmlspecialchars($config['board_contact']); + } + $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '', ''); $template->assign_vars(array( 'CONFIRM_IMAGE_LINK' => $link, diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index f7078b49c0..69864a75ab 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -158,7 +158,15 @@ class phpbb_recaptcha extends phpbb_default_captcha } else { - $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '', ''); + if ($config['contact_admin_form_enable']) + { + $contact_link = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin'); + } + else + { + $contact_link = 'mailto:' . htmlspecialchars($config['board_contact']); + } + $explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '', ''); $template->assign_vars(array( 'RECAPTCHA_SERVER' => $this->recaptcha_server, -- cgit v1.2.1