diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2010-01-26 11:07:47 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2010-01-26 11:07:47 +0000 |
commit | 345de34ac1645f578498930a7927e1cf9a6b94e7 (patch) | |
tree | f8622718e16c2dcc66e78f247dafbcd9612437f2 /phpBB/includes/captcha | |
parent | b4c87cc504216af360f18bcb3123540fbea5091a (diff) | |
download | forums-345de34ac1645f578498930a7927e1cf9a6b94e7.tar forums-345de34ac1645f578498930a7927e1cf9a6b94e7.tar.gz forums-345de34ac1645f578498930a7927e1cf9a6b94e7.tar.bz2 forums-345de34ac1645f578498930a7927e1cf9a6b94e7.tar.xz forums-345de34ac1645f578498930a7927e1cf9a6b94e7.zip |
tuning
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10451 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/captcha')
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 7526cb67cf..c121af5b3a 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -253,11 +253,11 @@ class phpbb_captcha_qa /** * API function */ - function garbage_collect($type) + function garbage_collect($type = 0) { global $db, $config; - $sql = 'SELECT DISTINCT c.session_id + $sql = 'SELECT c.question_id FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' c LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id) @@ -266,19 +266,19 @@ class phpbb_captcha_qa $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) - { + {print_r($row); $sql_in = array(); do { - $sql_in[] = (string) $row['session_id']; + $sql_in[] = (string) $row['question_id']; } while ($row = $db->sql_fetchrow($result)); if (sizeof($sql_in)) { $sql = 'DELETE FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' - WHERE ' . $db->sql_in_set('session_id', $sql_in); + WHERE ' . $db->sql_in_set('question_id', $sql_in); $db->sql_query($sql); } } |