mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
#53235 - removing accidental commits
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10237 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b23f6c90ba
commit
44719bd041
1 changed files with 18 additions and 49 deletions
|
@ -53,7 +53,7 @@ class phpbb_captcha_qa
|
||||||
|
|
||||||
// read input
|
// read input
|
||||||
$this->confirm_id = request_var('qa_confirm_id', '');
|
$this->confirm_id = request_var('qa_confirm_id', '');
|
||||||
$this->answer = request_var('qa_answer', '', true);
|
$this->answer = utf8_normalize_nfc(request_var('qa_answer', '', true));
|
||||||
|
|
||||||
$this->type = (int) $type;
|
$this->type = (int) $type;
|
||||||
$this->question_lang = $user->lang_name;
|
$this->question_lang = $user->lang_name;
|
||||||
|
@ -616,8 +616,6 @@ class phpbb_captcha_qa
|
||||||
$this->acp_question_list($module);
|
$this->acp_question_list($module);
|
||||||
}
|
}
|
||||||
else if ($question_id && $action == 'delete')
|
else if ($question_id && $action == 'delete')
|
||||||
{
|
|
||||||
if ($this->get_class_name() !== $config['captcha_plugin'] || !$this->acp_is_last($question_id))
|
|
||||||
{
|
{
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
@ -637,11 +635,6 @@ class phpbb_captcha_qa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
trigger_error($user->lang['QA_ERROR_MSG'] . adm_back_link($list_url), E_USER_WARNING);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// okay, show the editor
|
// okay, show the editor
|
||||||
$error = false;
|
$error = false;
|
||||||
|
@ -718,7 +711,7 @@ class phpbb_captcha_qa
|
||||||
}
|
}
|
||||||
else if ($submit)
|
else if ($submit)
|
||||||
{
|
{
|
||||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url), E_USER_WARNING);
|
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -801,7 +794,7 @@ class phpbb_captcha_qa
|
||||||
'question_text' => request_var('question_text', '', true),
|
'question_text' => request_var('question_text', '', true),
|
||||||
'strict' => request_var('strict', false),
|
'strict' => request_var('strict', false),
|
||||||
'lang_iso' => request_var('lang_iso', ''),
|
'lang_iso' => request_var('lang_iso', ''),
|
||||||
'answers' => (strlen($answers)) ? explode("\n", $answers) : '',
|
'answers' => (strlen($answers)) ? explode("\n", request_var('answers', '', true)) : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $question;
|
return $question;
|
||||||
|
@ -922,6 +915,7 @@ class phpbb_captcha_qa
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,31 +942,6 @@ class phpbb_captcha_qa
|
||||||
|
|
||||||
return $langs;
|
return $langs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Grab a question and bring it into a format the editor understands
|
|
||||||
*/
|
|
||||||
function acp_is_last($question_id)
|
|
||||||
{
|
|
||||||
global $config, $db;
|
|
||||||
|
|
||||||
if ($question_id)
|
|
||||||
{
|
|
||||||
$sql = 'SELECT question_id
|
|
||||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
|
||||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'
|
|
||||||
AND question_id <> " . (int) $question_id;
|
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
|
||||||
$question = $db->sql_fetchrow($result);
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if (!$question)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue