Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -1,29 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+---------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:55 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 22 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2008-02-06 11:55:42 -0500 (Wed, 06 Feb 2008) $
|
||||
| > $Revision: 1184 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > XML-RPC handling methods (KERNEL)
|
||||
@@ -163,7 +153,7 @@ class class_xml_rpc
|
||||
$this->_add_debug( "DECODING XML data: " . $_xml );
|
||||
$this->_add_debug( "DECODE RESULT XML data: " . var_export( $data, TRUE ) );
|
||||
}
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -471,12 +461,19 @@ class class_xml_rpc
|
||||
|
||||
foreach( $data_array as $k => $v )
|
||||
{
|
||||
$_type = isset( $this->map_type_to_key[ $k ] ) ? $this->map_type_to_key[ $k ] : $this->get_xmlrpc_string_type( $v );
|
||||
if ( is_array( $v ) )
|
||||
{
|
||||
$xmldata .= $this->_xml_rpc_build_document_recurse( "", $k, $v, 4 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_type = isset( $this->map_type_to_key[ $k ] ) ? $this->map_type_to_key[ $k ] : $this->get_xmlrpc_string_type( $v );
|
||||
|
||||
$xmldata .= "\t\t\t\t<member>\n";
|
||||
$xmldata .= "\t\t\t\t\t<name>".$k."</name>\n";
|
||||
$xmldata .= "\t\t\t\t\t<value><".$_type.">" . htmlspecialchars($v) . "</".$_type."></value>\n";
|
||||
$xmldata .= "\t\t\t\t</member>\n";
|
||||
$xmldata .= "\t\t\t\t<member>\n";
|
||||
$xmldata .= "\t\t\t\t\t<name>".$k."</name>\n";
|
||||
$xmldata .= "\t\t\t\t\t<value><".$_type.">" . htmlspecialchars($v) . "</".$_type."></value>\n";
|
||||
$xmldata .= "\t\t\t\t</member>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$xmldata .= "\t\t\t</struct>\n";
|
||||
@@ -490,6 +487,54 @@ class class_xml_rpc
|
||||
return $xmldata;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Creates an XML-RPC complex document
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Creates an XML-RPC complex document
|
||||
*
|
||||
* @param array Array of fields to send (must be in key => value pairings)
|
||||
* @param string Method name (optional)
|
||||
* @return string finished document
|
||||
*/
|
||||
function _xml_rpc_build_document_recurse( $xmldata, $k, $v, $depth=4 )
|
||||
{
|
||||
$xmldata .= "\t<member>\n";
|
||||
$xmldata .= "\t\t<name>".$k."</name>\n";
|
||||
$xmldata .= "\t\t<value>\n";
|
||||
$xmldata .= "\t\t\t<array>\n";
|
||||
$xmldata .= "\t\t\t\t<data>\n";
|
||||
$xmldata .= "\t\t\t\t\t<value>\n";
|
||||
$xmldata .= "\t\t\t\t\t\t<struct>\n";
|
||||
|
||||
foreach( $v as $_k => $_v )
|
||||
{
|
||||
if ( is_array( $_v ) )
|
||||
{
|
||||
$depth++;
|
||||
$xmldata .= $this->_xml_rpc_build_document_recurse( $xmldata, $k, $v, $depth );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_type = isset( $this->map_type_to_key[ $_k ] ) ? $this->map_type_to_key[ $_k ] : $this->get_xmlrpc_string_type( $_v );
|
||||
|
||||
$xmldata .= "\t\t\t\t\t\t\t<member>\n";
|
||||
$xmldata .= "\t\t\t\t\t\t\t\t<name>".$_k."</name>\n";
|
||||
$xmldata .= "\t\t\t\t\t\t\t\t<value><".$_type.">" . htmlspecialchars($_v) . "</".$_type."></value>\n";
|
||||
$xmldata .= "\t\t\t\t\t\t\t</member>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$xmldata .= "\t\t\t\t\t\t</struct>\n";
|
||||
$xmldata .= "\t\t\t\t\t</value>\n";
|
||||
$xmldata .= "\t\t\t\t</data>\n";
|
||||
$xmldata .= "\t\t\t</array>\n";
|
||||
$xmldata .= "\t\t</value>\n";
|
||||
$xmldata .= "\t</member>\n";
|
||||
|
||||
return $xmldata;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return True
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -613,7 +658,7 @@ class class_xml_rpc
|
||||
|
||||
if ( ! $url_parts['host'] )
|
||||
{
|
||||
$this->errors[] = "Íå íàéäåí õîñò â çàäàííîì URL '$file_location'!";
|
||||
$this->errors[] = "No host found in the URL '$file_location'!";
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -623,7 +668,7 @@ class class_xml_rpc
|
||||
|
||||
$host = $url_parts['host'];
|
||||
|
||||
$port = ( isset($url_parts['port']) ) ? $url_parts['port'] : 80;
|
||||
$port = ( isset($url_parts['port']) ) ? $url_parts['port'] : ( $url_parts['scheme'] == 'https' ? 443 : 80 );
|
||||
|
||||
//-----------------------------------------
|
||||
// User and pass?
|
||||
@@ -653,15 +698,16 @@ class class_xml_rpc
|
||||
$path .= "?" . $url_parts["query"];
|
||||
}
|
||||
|
||||
if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) )
|
||||
if ( ! $fp = @fsockopen( $port == 443 ? "ssl://" . $host : $host, $port, $errno, $errstr, $fsocket_timeout ) )
|
||||
{
|
||||
$this->errors[] = "Ñîåäèíåíèå ïðåðâàíî óäàëåííûì ñåðâåðîì $host";
|
||||
$this->errors[] = "CONNECTION REFUSED FROM $host";
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$header = "POST $path HTTP/1.0\r\n";
|
||||
$header .= "User-Agent: IPS XML-RPC Client Library (\$Revision: 1184 $)\r\n";
|
||||
$header .= "Host: $host\r\n";
|
||||
|
||||
if ( $this->auth_user && $this->auth_pass )
|
||||
@@ -677,7 +723,7 @@ class class_xml_rpc
|
||||
|
||||
if ( ! fputs( $fp, $header . $xmldata ) )
|
||||
{
|
||||
$this->errors[] = "Íå âîçìîæíî îòïðàâèòü çàïðîñ óäàëåííîìó ñåðâåðó $host!";
|
||||
$this->errors[] = "Unable to send request to $host!";
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user