phpBB

Code Changes

File: phpbb/db/driver/driver.php

  Unmodified   Added   Modified   Removed
Line 537Line 537
	*/
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
{

	*/
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
{

		if (!sizeof($array))



		$array = (array) $array;

if (!count($array))

		{
if (!$allow_empty_set)
{

		{
if (!$allow_empty_set)
{

Line 559Line 561
			}
}


			}
}


		if (!is_array($array))
{
$array = array($array);
}

if (sizeof($array) == 1)

		if (count($array) == 1)






		{
@reset($array);
$var = current($array);

		{
@reset($array);
$var = current($array);

Line 632Line 629
	*/
function sql_multi_insert($table, $sql_ary)
{

	*/
function sql_multi_insert($table, $sql_ary)
{

		if (!sizeof($sql_ary))

		if (!count($sql_ary))

		{
return false;
}

		{
return false;
}

Line 738Line 735
				// We run the following code to determine if we need to re-order the table array. ;)
// The reason for this is that for multi-aliased tables (two equal tables) in the FROM statement the last table need to match the first comparison.
// DBMS who rely on this: Oracle, PostgreSQL and MSSQL. For all other DBMS it makes absolutely no difference in which order the table is.

				// We run the following code to determine if we need to re-order the table array. ;)
// The reason for this is that for multi-aliased tables (two equal tables) in the FROM statement the last table need to match the first comparison.
// DBMS who rely on this: Oracle, PostgreSQL and MSSQL. For all other DBMS it makes absolutely no difference in which order the table is.

				if (!empty($array['LEFT_JOIN']) && sizeof($array['FROM']) > 1 && $used_multi_alias !== false)

				if (!empty($array['LEFT_JOIN']) && count($array['FROM']) > 1 && $used_multi_alias !== false)

				{
// Take first LEFT JOIN
$join = current($array['LEFT_JOIN']);

				{
// Take first LEFT JOIN
$join = current($array['LEFT_JOIN']);

Line 848Line 845

default:



default:


					switch (sizeof($condition))

					switch (count($condition))

					{
case 3:


					{
case 3:


Line 1138Line 1135
				$html_table = func_get_arg(2);
$row = func_get_arg(3);


				$html_table = func_get_arg(2);
$row = func_get_arg(3);


				if (!$html_table && sizeof($row))

				if (!$html_table && count($row))

				{
$html_table = true;
$this->html_hold .= '<table cellspacing="1"><tr>';

				{
$html_table = true;
$this->html_hold .= '<table cellspacing="1"><tr>';