aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/report.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-06-03 23:38:48 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-07-01 21:48:51 +0530
commit7a2e3b4354b495f7f46bc57dfde070ce7270bd25 (patch)
treecabc83f337d2d85da08f25da5fc884568976c008 /phpBB/report.php
parent4828cb21cf86475bc45a34980e88af3db975228b (diff)
downloadforums-7a2e3b4354b495f7f46bc57dfde070ce7270bd25.tar
forums-7a2e3b4354b495f7f46bc57dfde070ce7270bd25.tar.gz
forums-7a2e3b4354b495f7f46bc57dfde070ce7270bd25.tar.bz2
forums-7a2e3b4354b495f7f46bc57dfde070ce7270bd25.tar.xz
forums-7a2e3b4354b495f7f46bc57dfde070ce7270bd25.zip
[ticket/11566] add interface for captcha
Add basic captcha template while reporting post when the user is not a registered user. PHPBB3-11566
Diffstat (limited to 'phpBB/report.php')
-rw-r--r--phpBB/report.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/report.php b/phpBB/report.php
index c1172ec1d5..06fc086d4d 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -133,6 +133,13 @@ else
}
}
+if ($config['enable_post_confirm'] && !$user->data['is_registered'])
+{
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_POST);
+}
+
// Submit report?
if ($submit && $reason_id)
{
@@ -224,6 +231,13 @@ display_reasons($reason_id);
$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
+if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === false))
+{
+ $template->assign_vars(array(
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
+ ));
+}
+
$template->assign_vars(array(
'S_REPORT_POST' => ($pm_id) ? false : true,
'REPORT_TEXT' => $report_text,