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

+62 -9
View File
@@ -2,14 +2,22 @@
/*
+--------------------------------------------------------------------------
| 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 ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2005-10-10 14:03:20 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 22 $
@@ -35,6 +43,9 @@
+--------------------------------------------------------------------------
*/
define( 'IPS_TEMPLATE_DEBUG' , 0 );
define( 'IPS_TEMPLATE_DEBUG_FILE', dirname( _FILE_ ) . '/../cache/template_debug.cgi' );
/**
* Template Engine (NOT USED CURRENTLY: FOR IPB 3.0, IP.Dynamic)
*
@@ -113,9 +124,9 @@ class class_template
//-----------------------------------------
// Remove PHP tags
//-----------------------------------------
$data = preg_replace( "#<"."\?php\n?(.+?)\n?\?".">#is", "\\1", $data );
$data = preg_replace( "#<"."\?php\n+?(.+?)\n+?\?".">#is", "\\1", $data );
//-----------------------------------------
// Pick through and get all function names
//-----------------------------------------
@@ -174,7 +185,7 @@ class class_template
continue;
}
}
//-----------------------------------------
// Build the file...
//-----------------------------------------
@@ -211,6 +222,12 @@ class class_template
$this->foreach_blocks = array();
//-----------------------------------------
// Debug?
//-----------------------------------------
$this->_add_debug( "Preparing to convert: $func_name" . "\n" . $func_html );
//-------------------------------
// Make sure we have ="" on each
// func data
@@ -282,6 +299,12 @@ class class_template
$middle = preg_replace( "#<php>(.+?)</php>#si", "", $middle );
//-----------------------------------------
// Debug?
//-----------------------------------------
$this->_add_debug( "FINISHED: $func_name" . "\n" . $top.$start.$php_tags.$middle.$end );
//-------------------------------
// Return
//-------------------------------
@@ -731,7 +754,7 @@ EOF;
// Keep the server busy for a while
//----------------------------------------
while ( 1 == 1 )
while ( 1 )
{
//-----------------------------------------
// Update template length
@@ -747,6 +770,8 @@ EOF;
$found_if = strpos( $template, $tag_if, $found_end_if + 1 );
#$this->_add_debug( "Found <if>: $found_if" );
//----------------------------------------
// No logic found?
//----------------------------------------
@@ -779,7 +804,9 @@ EOF;
// End statement?
//----------------------------------------
$found_end_if = strpos($template, $tag_end_if, $_end + 3);
$found_end_if = strpos($template, $tag_end_if, $_start + 3);
#$this->_add_debug( "Found </if>: $found_end_if" );
//----------------------------------------
// No end statement found
@@ -848,7 +875,7 @@ EOF;
$if_found_recurse = $found_if;
while ( 1 == 1 )
while ( 1 )
{
//----------------------------------------
// Got an IF?
@@ -856,6 +883,8 @@ EOF;
$if_found_recurse = strpos( $template, $tag_if, $if_found_recurse + 1 );
#$this->_add_debug( "Found recurse <if>: $if_found_recurse" );
//----------------------------------------
// None found...
//----------------------------------------
@@ -872,6 +901,8 @@ EOF;
// None found...
//----------------------------------------
#$this->_add_debug( "Found recurse </if>: $found_end_if" );
if ( $found_end_if === FALSE )
{
return str_replace("\\'", "'", $template);
@@ -884,7 +915,7 @@ EOF;
// Handle the else tags
//----------------------------------------
while ( 1 == 1 )
while ( 1 )
{
//----------------------------------------
// None found...
@@ -1089,6 +1120,28 @@ EOF;
$code = str_replace( "\\'", "'", $code );
return $code;
}
/**
* Add debug message
*/
function _add_debug( $msg )
{
if ( IPS_TEMPLATE_DEBUG AND IPS_TEMPLATE_DEBUG_FILE )
{
$full_msg = "==================================================================\n"
. "Date: " . gmdate( 'r' ) . ' - ' . $_SERVER['REMOTE_ADDR'] . "\n"
. $msg . "\n"
. "==================================================================\n";
if ( $FH = @fopen( IPS_TEMPLATE_DEBUG_FILE, 'a+' ) )
{
fwrite( $FH, $full_msg, strlen( $full_msg ) );
fclose( $FH );
}
return TRUE;
}
}
}