Version 2.2.2

This commit is contained in:
Neo committed 2025-12-19 00:24:35 -08:00
1 parent 22f1b963ee
commit a3bb603c96
858 files changed
+479463 -188140

No files matched your search

+34 -24
View File
@@ -1,15 +1,25 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
+---------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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 $
@@ -55,18 +65,6 @@
* @version 2.1
*/
/**
* Write to debug file?
* Enter relative / full path into the constant below
* Remove contents to turn off debugging.
* WARNING: If you are passing passwords and such via XML_RPC
* AND wish to debug, ensure that the debug file ends with .php
* to prevent it loading as plain text via HTTP which would show
* the entire contents of the file.
*/
define( 'IPS_XML_RPC_DEBUG_ON' , 1 );
define( 'IPS_XML_RPC_DEBUG_FILE', dirname( __FILE__ ) . '/../cache/debug.php' );
/**
* XML Creation and Extraction Functions
*
@@ -162,7 +160,7 @@ class class_xml_rpc
if ( IPS_XML_RPC_DEBUG_ON )
{
$this->_add_debug( "DECODING XML data: " . substr( $_xml, 0, 300 ) );
$this->_add_debug( "DECODING XML data: " . $_xml );
$this->_add_debug( "DECODE RESULT XML data: " . var_export( $data, TRUE ) );
}
@@ -353,7 +351,7 @@ class class_xml_rpc
if ( IPS_XML_RPC_DEBUG_ON )
{
$this->_add_debug( "SENDING XML data: " . substr( $xmldata, 0, 300 ) );
$this->_add_debug( "SENDING XML data: " . $xmldata );
}
//-----------------------------------------
@@ -615,7 +613,7 @@ class class_xml_rpc
if ( ! $url_parts['host'] )
{
$this->errors[] = "No host found in the URL '$file_location'!";
$this->errors[] = "Íå íàéäåí õîñò â çàäàííîì URL '$file_location'!";
return FALSE;
}
@@ -627,6 +625,16 @@ class class_xml_rpc
$port = ( isset($url_parts['port']) ) ? $url_parts['port'] : 80;
//-----------------------------------------
// User and pass?
//-----------------------------------------
if ( ! $this->auth_user AND $url_parts['user'] )
{
$this->auth_user = $url_parts['user'];
$this->auth_pass = $url_parts['pass'];
}
//-------------------------------
// Tidy up path
//-------------------------------
@@ -647,7 +655,7 @@ class class_xml_rpc
if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) )
{
$this->errors[] = "CONNECTION REFUSED FROM $host";
$this->errors[] = "Ñîåäèíåíèå ïðåðâàíî óäàëåííûì ñåðâåðîì $host";
return FALSE;
}
@@ -669,7 +677,7 @@ class class_xml_rpc
if ( ! fputs( $fp, $header . $xmldata ) )
{
$this->errors[] = "Unable to send request to $host!";
$this->errors[] = "Íå âîçìîæíî îòïðàâèòü çàïðîñ óäàëåííîìó ñåðâåðó $host!";
return FALSE;
}
}
@@ -699,7 +707,7 @@ class class_xml_rpc
if ( IPS_XML_RPC_DEBUG_ON )
{
$this->_add_debug( "POST RESPONSE: " . substr( $data, 0, 300 ) );
$this->_add_debug( "POST RESPONSE to $host{$path}: " . $data );
}
//-----------------------------------------
@@ -748,16 +756,18 @@ class class_xml_rpc
*/
function _add_debug( $msg )
{
if ( IPS_XML_RPC_DEBUG_FILE AND file_exists( IPS_XML_RPC_DEBUG_FILE ) )
if ( IPS_XML_RPC_DEBUG_FILE AND IPS_XML_RPC_DEBUG_ON )
{
$full_msg = "==================================================================\n"
. "SCRIPT NAME: " . $_SERVER["SCRIPT_NAME"] . "\n"
. gmdate( 'r' ) . ' - ' . $_SERVER['REMOTE_ADDR'] . ' - ' . $msg . "\n"
. "==================================================================\n";
$FH = fopen( IPS_XML_RPC_DEBUG_FILE, 'a+' );
fwrite( $FH, $full_msg, strlen( $full_msg ) );
fclose( $FH );
if ( $FH = @fopen( IPS_XML_RPC_DEBUG_FILE, 'a+' ) )
{
fwrite( $FH, $full_msg, strlen( $full_msg ) );
fclose( $FH );
}
return TRUE;
}