phpBB

Code Changes

File: includes/functions_jabber.php

  Unmodified   Added   Modified   Removed
Line 207Line 207
	*/
function login()
{

	*/
function login()
{

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

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

		{
$this->add_to_log('Error: No feature information from server available.');
return false;

		{
$this->add_to_log('Error: No feature information from server available.');
return false;

Line 293Line 293
	*/
function get_log()
{

	*/
function get_log()
{

		if ($this->enable_logging && sizeof($this->log_array))

		if ($this->enable_logging && count($this->log_array))

		{
return implode("<br /><br />", $this->log_array);
}

		{
return implode("<br /><br />", $this->log_array);
}

Line 400Line 400
	*/
function response($xml)
{

	*/
function response($xml)
{

		if (!is_array($xml) || !sizeof($xml))

		if (!is_array($xml) || !count($xml))

		{
return false;
}

// did we get multiple elements? do one after another
// array('message' => ..., 'presence' => ...)

		{
return false;
}

// did we get multiple elements? do one after another
// array('message' => ..., 'presence' => ...)

		if (sizeof($xml) > 1)

		if (count($xml) > 1)

		{
foreach ($xml as $key => $value)
{

		{
foreach ($xml as $key => $value)
{

Line 419Line 419
		{
// or even multiple elements of the same type?
// array('message' => array(0 => ..., 1 => ...))

		{
// or even multiple elements of the same type?
// array('message' => array(0 => ..., 1 => ...))

			if (sizeof(reset($xml)) > 1)

			if (count(reset($xml)) > 1)

			{
foreach (reset($xml) as $value)
{

			{
foreach (reset($xml) as $value)
{

Line 858Line 858
			array_push($children, $vals[$i]['value']);
}


			array_push($children, $vals[$i]['value']);
}


		while (++$i < sizeof($vals))

		while (++$i < count($vals))

		{
switch ($vals[$i]['type'])
{
case 'open':

$tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';

		{
switch ($vals[$i]['type'])
{
case 'open':

$tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';

					$size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;

					$size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;


if (isset($vals[$i]['attributes']))
{


if (isset($vals[$i]['attributes']))
{

Line 883Line 883
				case 'complete':

$tagname = $vals[$i]['tag'];

				case 'complete':

$tagname = $vals[$i]['tag'];

					$size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;

					$size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;

					$children[$tagname][$size]['#'] = (isset($vals[$i]['value'])) ? $vals[$i]['value'] : array();

if (isset($vals[$i]['attributes']))

					$children[$tagname][$size]['#'] = (isset($vals[$i]['value'])) ? $vals[$i]['value'] : array();

if (isset($vals[$i]['attributes']))