From 783da3064a2a4e7163230b75cacb6ef7073493dc Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 20 Jul 2009 18:27:26 +0000 Subject: rename variables to avoid name clashes in aggregating plugins git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9808 89ea8834-ac86-4346-8a33-228a782c2dd0 --- .../captcha/plugins/phpbb_captcha_qa_plugin.php | 18 ++++++++++-------- phpBB/styles/prosilver/template/captcha_qa.html | 6 +++--- phpBB/styles/subsilver2/template/captcha_qa.html | 6 +++--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index fdbbf1d218..cd5ee8c91d 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -50,10 +50,11 @@ class phpbb_captcha_qa { global $config, $db, $user; + // load our language file $user->add_lang('captcha_qa'); // read input - $this->confirm_id = request_var('confirm_id', ''); - $this->answer = request_var('answer', ''); + $this->confirm_id = request_var('qa_confirm_id', ''); + $this->answer = request_var('qa_answer', ''); $this->type = (int) $type; $this->question_lang = $user->data['user_lang']; @@ -118,6 +119,7 @@ class phpbb_captcha_qa { global $config, $db, $phpbb_root_path, $phpEx, $user; + // load language file for pretty display in the ACP dropdown $user->add_lang('captcha_qa'); if (!self::is_installed()) @@ -170,8 +172,8 @@ class phpbb_captcha_qa global $template; $template->assign_vars(array( - 'CONFIRM_QUESTION' => $this->question_text, - 'CONFIRM_ID' => $this->confirm_id, + 'QA_CONFIRM_QUESTION' => $this->question_text, + 'QA_CONFIRM_ID' => $this->confirm_id, 'S_CONFIRM_CODE' => true, 'S_TYPE' => $this->type, )); @@ -197,9 +199,9 @@ class phpbb_captcha_qa // this is required - otherwise we would forget about the captcha being already solved if ($this->solved) { - $hidden_fields['answer'] = $this->answer; + $hidden_fields['qa_answer'] = $this->answer; } - $hidden_fields['confirm_id'] = $this->confirm_id; + $hidden_fields['qa_confirm_id'] = $this->confirm_id; return $hidden_fields; } @@ -447,7 +449,7 @@ class phpbb_captcha_qa { global $db; - $answer = ($this->question_strict) ? request_var('answer', '') : utf8_clean_string(request_var('answer', '')); + $answer = ($this->question_strict) ? request_var('qa_answer', '') : utf8_clean_string(request_var('qa_answer', '')); $sql = 'SELECT answer_text FROM ' . ANSWERS_TABLE . ' @@ -509,7 +511,7 @@ class phpbb_captcha_qa */ function is_solved() { - if (request_var('answer', false) && $this->solved === 0) + if (request_var('qa_answer', false) && $this->solved === 0) { $this->validate(); } diff --git a/phpBB/styles/prosilver/template/captcha_qa.html b/phpBB/styles/prosilver/template/captcha_qa.html index e363ee008d..375ae401a4 100644 --- a/phpBB/styles/prosilver/template/captcha_qa.html +++ b/phpBB/styles/prosilver/template/captcha_qa.html @@ -7,10 +7,10 @@
-
:
{L_CONFIRM_QUESTION_EXPLAIN}
+
:
{L_CONFIRM_QUESTION_EXPLAIN}
- - + +
diff --git a/phpBB/styles/subsilver2/template/captcha_qa.html b/phpBB/styles/subsilver2/template/captcha_qa.html index 08b267b8fb..1711bdb90d 100644 --- a/phpBB/styles/subsilver2/template/captcha_qa.html +++ b/phpBB/styles/subsilver2/template/captcha_qa.html @@ -1,5 +1,5 @@ - {CONFIRM_QUESTION}:
- - + {QA_CONFIRM_QUESTION}:
+ + \ No newline at end of file -- cgit v1.2.1