diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html
index 68909e4012..290aaa254c 100644
--- a/phpBB/adm/style/acp_captcha.html
+++ b/phpBB/adm/style/acp_captcha.html
@@ -41,10 +41,10 @@
-
+
{L_PREVIEW}
-{CAPTCHA_PREVIEW}
+
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index 91915ce80c..96e39af85b 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -35,8 +35,7 @@ class captcha
{
global $config;
- srand($seed);
- //mt_srand($seed);
+ mt_srand($seed);
// Create image
$img = imagecreatetruecolor($this->width, $this->height);
@@ -109,7 +108,7 @@ class captcha
if ($config['captcha_gd_3d_noise'])
{
- $xoffset = rand(0,9);
+ $xoffset = mt_rand(0,9);
$noise_bitmaps = $this->captcha_noise_bg_bitmaps();
for ($i = 0; $i < $code_len; ++$i)
{
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php
index 1446df9874..1682293c02 100644
--- a/phpBB/includes/captcha/plugins/captcha_abstract.php
+++ b/phpBB/includes/captcha/plugins/captcha_abstract.php
@@ -85,29 +85,27 @@ class phpbb_default_captcha
function get_template()
{
global $config, $user, $template, $phpEx, $phpbb_root_path;
-
- $template->set_filenames(array(
- 'captcha' => 'captcha_default.html')
- );
-
+
+ $link = append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type);
+ $explain = ($this->type != CONFIRM_POST) ? sprintf($user->lang['CONFIRM_EXPLAIN'], '', ' ') : $user->lang['POST_CONFIRM_EXPLAIN'];
+
$template->assign_vars(array(
- 'CONFIRM_IMAGE' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type),
+ 'CONFIRM_IMAGE_LINK' => $link,
+ 'CONFIRM_IMAGE' => ' ',
+ 'CONFIRM_IMG' => ' ',
'CONFIRM_ID' => $this->confirm_id,
- 'S_REFRESH' => (bool) $config['confirm_refresh'],
-
+ 'S_CONFIRM_CODE' => true,
+ 'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh'] && $this->type == CONFIRM_REG) ? true : false,
+ 'L_CONFIRM_EXPLAIN' => $explain,
));
- return $template->assign_display('captcha');
+ return 'captcha_default.html';
}
function get_demo_template($id)
{
global $config, $user, $template, $phpbb_admin_path, $phpEx;
- $template->set_filenames(array(
- 'captcha_demo' => 'captcha_default_acp_demo.html')
- );
-
$variables = '';
if (is_array($this->captcha_vars))
@@ -124,7 +122,7 @@ class phpbb_default_captcha
'CONFIRM_ID' => $this->confirm_id,
));
- return $template->assign_display('captcha_demo');
+ return 'captcha_default_acp_demo.html';
}
function get_hidden_fields()
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
index 108e8f686e..ab71da10d7 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
@@ -34,7 +34,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
'captcha_gd_x_grid' => 'CAPTCHA_GD_X_GRID',
'captcha_gd_y_grid' => 'CAPTCHA_GD_Y_GRID',
'captcha_gd_foreground_noise' => 'CAPTCHA_GD_FOREGROUND_NOISE',
- 'captcha_gd' => 'CAPTCHA_GD_PREVIEWED',
+// 'captcha_gd' => 'CAPTCHA_GD_PREVIEWED',
'captcha_gd_wave' => 'CAPTCHA_GD_WAVE',
'captcha_gd_3d_noise' => 'CAPTCHA_GD_3D_NOISE',
'captcha_gd_fonts' => 'CAPTCHA_GD_FONTS',
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
index 2a20b4b78d..bd8fbce0fa 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -128,10 +128,6 @@ class phpbb_recaptcha extends phpbb_default_captcha
{
global $config, $user, $template;
- $template->set_filenames(array(
- 'captcha' => 'captcha_recaptcha.html')
- );
-
$template->assign_vars(array(
'RECAPTCHA_SERVER' => $this->recaptcha_server,
'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
@@ -139,7 +135,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
'S_RECAPTCHA_AVAILABLE' => $this->is_available(),
));
- return $template->assign_display('captcha');
+ return 'captcha_recaptcha.html';
}
function get_demo_template($id)
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 94f2adc5bd..e55a76fbb0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2702,7 +2702,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$template->assign_vars(array(
'S_CONFIRM_CODE' => true,
- 'CONFIRM' => $captcha->get_template(''),
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
));
$err = $user->lang[$result['error_msg']];
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 4671f21d5b..4815329643 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -42,7 +42,6 @@ class ucp_register
$submit = (isset($_POST['submit'])) ? true : false;
$change_lang = request_var('change_lang', '');
$user_lang = request_var('lang', $user->lang_name);
- $confirm_refresh= (isset($_POST['confirm_refresh']) && $config['confirm_refresh']) ? ((!empty($_POST['confirm_refresh'])) ? 1 : 0) : false;
if ($agreed)
{
@@ -437,7 +436,7 @@ class ucp_register
// Visual Confirmation - Show images
if ($config['enable_confirm'] && !$captcha_solved)
{
- if ($change_lang || $confirm_refresh)
+ if ($change_lang)
{
$str = '&change_lang=' . $change_lang;
}
@@ -448,7 +447,7 @@ class ucp_register
$template->assign_vars(array(
'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '', ' '),
- 'S_CAPTCHA' => $captcha->get_template(),
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
));
}
diff --git a/phpBB/posting.php b/phpBB/posting.php
index ff4fae614e..013e4da633 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1250,7 +1250,7 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_c
$template->assign_vars(array(
'S_CONFIRM_CODE' => true,
- 'CONFIRM' => $captcha->get_template(),
+ 'CAPTCHA_TEMPLATE' => $captcha->get_template(),
));
}
diff --git a/phpBB/styles/prosilver/template/captcha_default.html b/phpBB/styles/prosilver/template/captcha_default.html
index 399c978898..00d901825a 100644
--- a/phpBB/styles/prosilver/template/captcha_default.html
+++ b/phpBB/styles/prosilver/template/captcha_default.html
@@ -1,9 +1,9 @@
{L_CONFIRM_CODE}:
-
+
-
+
{L_CONFIRM_CODE_EXPLAIN}
\ No newline at end of file
diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html
index f325c3727d..10f24b1d7a 100644
--- a/phpBB/styles/prosilver/template/captcha_recaptcha.html
+++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html
@@ -9,10 +9,12 @@
-
+
+
-
+
+
{L_RECAPTCHA_NOT_AVAILABLE}
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index a32c2d1e42..a4cd990630 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -21,8 +21,8 @@
{L_RESEND_ACTIVATION}
-
- {CONFIRM}
+
+
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 315fbaee2b..8cd5fc60d5 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -100,7 +100,7 @@
- {CONFIRM}
+
diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html
index 468b131c4b..f35b5c9810 100644
--- a/phpBB/styles/prosilver/template/ucp_register.html
+++ b/phpBB/styles/prosilver/template/ucp_register.html
@@ -71,7 +71,7 @@
-
+
@@ -82,8 +82,9 @@
{L_CONFIRM_EXPLAIN}
- {S_CAPTCHA}
+
+
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
index a1bc6cd6dc..b0c36e89f1 100644
--- a/phpBB/styles/subsilver2/template/captcha_default.html
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -2,18 +2,15 @@
{L_CONFIRM_CODE}
- {L_CONFIRM_CODE_EXPLAIN}
+ {L_CONFIRM_EXPLAIN}
-
-
-
+
+
{L_CONFIRM_CODE}: {L_CONFIRM_CODE_EXPLAIN}
-
-
-
-
+
+
\ No newline at end of file
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
index 406ab3a293..b8a789bfe7 100644
--- a/phpBB/styles/subsilver2/template/login_body.html
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -65,12 +65,12 @@
-
+