phpBB

Code Changes

File: phpbb/captcha/plugins/qa.php

  Unmodified   Added   Modified   Removed
Line 84Line 84
		$db->sql_freeresult($result);

// fallback to the board default lang

		$db->sql_freeresult($result);

// fallback to the board default lang

		if (!sizeof($this->question_ids))

		if (!count($this->question_ids))

		{
$this->question_lang = $config['default_lang'];


		{
$this->question_lang = $config['default_lang'];


Line 101Line 101
		}

// final fallback to any language

		}

// final fallback to any language

		if (!sizeof($this->question_ids))

		if (!count($this->question_ids))

		{
$this->question_lang = '';


		{
$this->question_lang = '';


Line 311Line 311
			}
while ($row = $db->sql_fetchrow($result));


			}
while ($row = $db->sql_fetchrow($result));


			if (sizeof($sql_in))

			if (count($sql_in))

			{
$sql = 'DELETE FROM ' . $this->table_qa_confirm . '
WHERE ' . $db->sql_in_set('confirm_id', $sql_in);

			{
$sql = 'DELETE FROM ' . $this->table_qa_confirm . '
WHERE ' . $db->sql_in_set('confirm_id', $sql_in);

Line 395Line 395

$error = '';



$error = '';


		if (!sizeof($this->question_ids))

		if (!count($this->question_ids))

		{
/** @var \phpbb\log\log_interface $phpbb_log */
$phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));

		{
/** @var \phpbb\log\log_interface $phpbb_log */
$phpbb_log->add('critical', $user->data['user_id'], $user->ip, 'LOG_ERROR_CAPTCHA', time(), array($user->lang('CONFIRM_QUESTION_MISSING')));

Line 439Line 439
	{
global $db, $user;


	{
global $db, $user;


		if (!sizeof($this->question_ids))

		if (!count($this->question_ids))

		{
return;
}

		{
return;
}

Line 465Line 465
	{
global $db, $user;


	{
global $db, $user;


		if (!sizeof($this->question_ids))

		if (!count($this->question_ids))

		{
return;
}

		{
return;
}

Line 536Line 536
	{
global $db, $user;


	{
global $db, $user;


		if (!strlen($this->confirm_id) || !sizeof($this->question_ids))

		if (!strlen($this->confirm_id) || !count($this->question_ids))

		{
return false;
}

		{
return false;
}

Line 979Line 979

if (!isset($langs[$question_data['lang_iso']]) ||
!strlen($question_data['question_text']) ||


if (!isset($langs[$question_data['lang_iso']]) ||
!strlen($question_data['question_text']) ||

			!sizeof($question_data['answers']) ||

			!count($question_data['answers']) ||

			!is_array($question_data['answers']))
{
return false;

			!is_array($question_data['answers']))
{
return false;