mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 00:15:00 +02:00
Merge branch 'ticket/bantu/9766' into develop
* ticket/bantu/9766: [ticket/9766] Delete delete_code() from CAPTCHA classes as it's never called.
This commit is contained in:
commit
5debf22ba5
phpBB/includes/captcha/plugins
@ -207,7 +207,6 @@ class phpbb_default_captcha
|
|||||||
{
|
{
|
||||||
if ($this->check_code())
|
if ($this->check_code())
|
||||||
{
|
{
|
||||||
// $this->delete_code(); commented out to allow posting.php to repeat the question
|
|
||||||
$this->solved = true;
|
$this->solved = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -329,17 +328,6 @@ class phpbb_default_captcha
|
|||||||
return (strcasecmp($this->code, $this->confirm_code) === 0);
|
return (strcasecmp($this->code, $this->confirm_code) === 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_code()
|
|
||||||
{
|
|
||||||
global $db, $user;
|
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
|
|
||||||
WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
|
|
||||||
AND session_id = '" . $db->sql_escape($user->session_id) . "'
|
|
||||||
AND confirm_type = " . $this->type;
|
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_attempt_count()
|
function get_attempt_count()
|
||||||
{
|
{
|
||||||
return $this->attempts;
|
return $this->attempts;
|
||||||
|
@ -379,7 +379,6 @@ class phpbb_captcha_qa
|
|||||||
{
|
{
|
||||||
if ($this->check_answer())
|
if ($this->check_answer())
|
||||||
{
|
{
|
||||||
// $this->delete_code(); commented out to allow posting.php to repeat the question
|
|
||||||
$this->solved = true;
|
$this->solved = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -566,20 +565,6 @@ class phpbb_captcha_qa
|
|||||||
return $this->solved;
|
return $this->solved;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* API function - clean the entry
|
|
||||||
*/
|
|
||||||
function delete_code()
|
|
||||||
{
|
|
||||||
global $db, $user;
|
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . "
|
|
||||||
WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
|
|
||||||
AND session_id = '" . $db->sql_escape($user->session_id) . "'
|
|
||||||
AND confirm_type = " . $this->type;
|
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API function
|
* API function
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user