From: Henry S. <kel...@ph...> - 2009-07-20 18:28:07
|
Author: Kellanved Date: Mon Jul 20 18:27:26 2009 New Revision: 9808 Log: rename variables to avoid name clashes in aggregating plugins Modified: branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php branches/phpBB-3_0_0/phpBB/styles/prosilver/template/captcha_qa.html branches/phpBB-3_0_0/phpBB/styles/subsilver2/template/captcha_qa.html Modified: branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php (original) --- branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php Mon Jul 20 18:27:26 2009 *************** *** 50,59 **** { global $config, $db, $user; $user->add_lang('captcha_qa'); // read input ! $this->confirm_id = request_var('confirm_id', ''); ! $this->answer = request_var('answer', ''); $this->type = (int) $type; $this->question_lang = $user->data['user_lang']; --- 50,60 ---- { global $config, $db, $user; + // load our language file $user->add_lang('captcha_qa'); // read input ! $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,123 **** --- 119,125 ---- { 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,177 **** global $template; $template->assign_vars(array( ! 'CONFIRM_QUESTION' => $this->question_text, ! 'CONFIRM_ID' => $this->confirm_id, 'S_CONFIRM_CODE' => true, 'S_TYPE' => $this->type, )); --- 172,179 ---- global $template; $template->assign_vars(array( ! 'QA_CONFIRM_QUESTION' => $this->question_text, ! 'QA_CONFIRM_ID' => $this->confirm_id, 'S_CONFIRM_CODE' => true, 'S_TYPE' => $this->type, )); *************** *** 197,205 **** // this is required - otherwise we would forget about the captcha being already solved if ($this->solved) { ! $hidden_fields['answer'] = $this->answer; } ! $hidden_fields['confirm_id'] = $this->confirm_id; return $hidden_fields; } --- 199,207 ---- // this is required - otherwise we would forget about the captcha being already solved if ($this->solved) { ! $hidden_fields['qa_answer'] = $this->answer; } ! $hidden_fields['qa_confirm_id'] = $this->confirm_id; return $hidden_fields; } *************** *** 447,453 **** { global $db; ! $answer = ($this->question_strict) ? request_var('answer', '') : utf8_clean_string(request_var('answer', '')); $sql = 'SELECT answer_text FROM ' . ANSWERS_TABLE . ' --- 449,455 ---- { global $db; ! $answer = ($this->question_strict) ? request_var('qa_answer', '') : utf8_clean_string(request_var('qa_answer', '')); $sql = 'SELECT answer_text FROM ' . ANSWERS_TABLE . ' *************** *** 509,515 **** */ function is_solved() { ! if (request_var('answer', false) && $this->solved === 0) { $this->validate(); } --- 511,517 ---- */ function is_solved() { ! if (request_var('qa_answer', false) && $this->solved === 0) { $this->validate(); } Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/template/captcha_qa.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/template/captcha_qa.html (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/template/captcha_qa.html Mon Jul 20 18:27:26 2009 *************** *** 7,16 **** <!-- ENDIF --> <dl> ! <dt><label>{CONFIRM_QUESTION}</label>:<br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt> <dd> ! <input type="text" tabindex="10" name="answer" id="answer" size="45" class="inputbox autowidth" title="{L_ANSWER}" /> ! <input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /> </dd> </dl> --- 7,16 ---- <!-- ENDIF --> <dl> ! <dt><label>{QA_CONFIRM_QUESTION}</label>:<br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt> <dd> ! <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="qa_confirm_id" value="{QA_CONFIRM_ID}" /> </dd> </dl> Modified: branches/phpBB-3_0_0/phpBB/styles/subsilver2/template/captcha_qa.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/subsilver2/template/captcha_qa.html (original) --- branches/phpBB-3_0_0/phpBB/styles/subsilver2/template/captcha_qa.html Mon Jul 20 18:27:26 2009 *************** *** 1,5 **** <tr> ! <td class="row1"><b class="genmed">{CONFIRM_QUESTION}: </b><br /></td> ! <td class="row2"><input class="post" type="text" name="answer" size="80" /></td> ! <input type="hidden" name="confirm_id" id="confirm_id" value="{CONFIRM_ID}" /></td> </tr> \ No newline at end of file --- 1,5 ---- <tr> ! <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}: </b><br /></td> ! <td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td> ! <input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td> </tr> \ No newline at end of file |