mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
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
This commit is contained in:
parent
2dbf5fd1a2
commit
783da3064a
3 changed files with 16 additions and 14 deletions
|
@ -50,10 +50,11 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
global $config, $db, $user;
|
global $config, $db, $user;
|
||||||
|
|
||||||
|
// load our language file
|
||||||
$user->add_lang('captcha_qa');
|
$user->add_lang('captcha_qa');
|
||||||
// read input
|
// read input
|
||||||
$this->confirm_id = request_var('confirm_id', '');
|
$this->confirm_id = request_var('qa_confirm_id', '');
|
||||||
$this->answer = request_var('answer', '');
|
$this->answer = request_var('qa_answer', '');
|
||||||
|
|
||||||
$this->type = (int) $type;
|
$this->type = (int) $type;
|
||||||
$this->question_lang = $user->data['user_lang'];
|
$this->question_lang = $user->data['user_lang'];
|
||||||
|
@ -118,6 +119,7 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
global $config, $db, $phpbb_root_path, $phpEx, $user;
|
global $config, $db, $phpbb_root_path, $phpEx, $user;
|
||||||
|
|
||||||
|
// load language file for pretty display in the ACP dropdown
|
||||||
$user->add_lang('captcha_qa');
|
$user->add_lang('captcha_qa');
|
||||||
|
|
||||||
if (!self::is_installed())
|
if (!self::is_installed())
|
||||||
|
@ -170,8 +172,8 @@ class phpbb_captcha_qa
|
||||||
global $template;
|
global $template;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'CONFIRM_QUESTION' => $this->question_text,
|
'QA_CONFIRM_QUESTION' => $this->question_text,
|
||||||
'CONFIRM_ID' => $this->confirm_id,
|
'QA_CONFIRM_ID' => $this->confirm_id,
|
||||||
'S_CONFIRM_CODE' => true,
|
'S_CONFIRM_CODE' => true,
|
||||||
'S_TYPE' => $this->type,
|
'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
|
// this is required - otherwise we would forget about the captcha being already solved
|
||||||
if ($this->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;
|
return $hidden_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,7 +449,7 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
global $db;
|
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
|
$sql = 'SELECT answer_text
|
||||||
FROM ' . ANSWERS_TABLE . '
|
FROM ' . ANSWERS_TABLE . '
|
||||||
|
@ -509,7 +511,7 @@ class phpbb_captcha_qa
|
||||||
*/
|
*/
|
||||||
function is_solved()
|
function is_solved()
|
||||||
{
|
{
|
||||||
if (request_var('answer', false) && $this->solved === 0)
|
if (request_var('qa_answer', false) && $this->solved === 0)
|
||||||
{
|
{
|
||||||
$this->validate();
|
$this->validate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>{CONFIRM_QUESTION}</label>:<br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
|
<dt><label>{QA_CONFIRM_QUESTION}</label>:<br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
|
<input type="text" tabindex="10" name="qa_answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" />
|
||||||
<input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" />
|
<input type="hidden" name="confirm_id" id="qa_confirm_id" value="{QA_CONFIRM_ID}" />
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1"><b class="genmed">{CONFIRM_QUESTION}: </b><br /></td>
|
<td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}: </b><br /></td>
|
||||||
<td class="row2"><input class="post" type="text" name="answer" size="80" /></td>
|
<td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td>
|
||||||
<input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></td>
|
<input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
|
||||||
</tr>
|
</tr>
|
Loading…
Add table
Reference in a new issue