phpBB

Code Changes

File: includes/functions_jabber.php

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

	*/
function login()
{

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

		if (empty($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 227Line 227
		if ($this->connected())
{
$xml = trim($xml);

		if ($this->connected())
{
$xml = trim($xml);

			$this->add_to_log('SEND: '. $xml);

 
			return fwrite($this->connection, $xml);
}
else

			return fwrite($this->connection, $xml);
}
else

Line 338Line 337

if ($data != '')
{


if ($data != '')
{

			$this->add_to_log('RECV: '. $data);

 
			return $this->xmlize($data);
}
else

			return $this->xmlize($data);
}
else

Line 419Line 417
		{
// 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 (count(reset($xml)) > 1)

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

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

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

Line 445Line 443
				}

$second_time = isset($this->session['id']);

				}

$second_time = isset($this->session['id']);

				$this->session['id'] = $xml['stream:stream'][0]['@']['id'];

				$this->session['id'] = isset($xml['stream:stream'][0]['@']['id']) ? $xml['stream:stream'][0]['@']['id'] : '';


if ($second_time)
{


if ($second_time)
{

Line 701Line 699

default:
// hm...don't know this response


default:
// hm...don't know this response

				$this->add_to_log('Notice: Unknown server response (' . key($xml) . ')');

				$this->add_to_log('Notice: Unknown server response');

				return false;
break;
}

				return false;
break;
}