Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+79 -53
View File
@@ -2,28 +2,21 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2005 Invision Power Services
| http://www.invisionpower.com
| =============================================
| ========================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
| Email: matt@invisionpower.com
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-02-01 18:16:26 +0000 (Wed, 01 Feb 2006) $
| > $Revision: 132 $
| > $Author: bfarber $
| > $Date: 2006-09-27 15:23:03 +0100 (Wed, 27 Sep 2006) $
| > $Revision: 579 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Wrapper script
@@ -53,6 +46,7 @@ define( 'IPB_LOAD_SQL' , 'queries' );
require_once( './init.php' );
//===========================================================================
// MAIN PROGRAM
//===========================================================================
@@ -68,7 +62,19 @@ require_once ROOT_PATH . "sources/classes/class_display.php";
require_once ROOT_PATH . "sources/classes/class_session.php";
require_once ROOT_PATH . "sources/classes/class_forums.php";
require_once KERNEL_PATH . "class_converge.php";
require_once ROOT_PATH . "conf_global.php";
if ( file_exists( ROOT_PATH . "conf_global.php" ) )
{
require_once ROOT_PATH . "conf_global.php";
}
# Are we installed?
if( ! $INFO['sql_user'] )
{
$host = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : @getenv('HTTP_HOST');
$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : @getenv('PHP_SELF');
@header("Location: http://".$host.rtrim(dirname($self), '/\\')."/install/index.php" );
}
# Initiate super-class
$ipsclass = new ipsclass();
@@ -87,6 +93,12 @@ $Debug->startTimer();
$ipsclass->init_db_connection();
//--------------------------------
// Set debug mode
//--------------------------------
$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? ( isset($_GET['debug']) ? intval($_GET['debug']) : 0 ) : 0 );
//--------------------------------
// INIT other classes
//--------------------------------
@@ -125,7 +137,7 @@ $choice = array(
"announce" => array( "announcements" , 'announcements', array('bbcode','badwords','emoticons','ranks','profilefields' ) ),
"login" => array( "login" , 'login' , array() ),
"post" => array( "post" , 'post' , array('attachtypes','badwords','bbcode','emoticons','ranks' ) ),
"reg" => array( "register" , 'register' , array() ),
"reg" => array( "register" , 'register' , array('profilefields') ),
"online" => array( "online" , 'online' , array() ),
"members" => array( "memberlist" , 'memberlist' , array('ranks','profilefields' ) ),
"help" => array( "help" , 'help' , array() ),
@@ -137,14 +149,14 @@ $choice = array(
"report" => array( "misc/contact_member", 'contactmember', array() ),
"chat" => array( "misc/contact_member", 'contactmember', array() ),
'boardrules' => array( "misc/contact_member", 'contactmember', array() ),
"msg" => array( "messenger" , 'messenger' , array('profilefields','attachtypes','badwords','bbcode','emoticons' ) ),
"usercp" => array( "usercp" , 'usercp' , array('attachtypes','badwords','bbcode','emoticons' ) ),
"msg" => array( "messenger" , 'messenger' , array('ranks','profilefields','attachtypes','badwords','bbcode','emoticons' ) ),
"usercp" => array( "usercp" , 'usercp' , array( 'attachtypes', 'badwords', 'bbcode', 'emoticons', 'profilefields' ) ),
"profile" => array( "profile" , 'profile' , array('ranks','profilefields','badwords','bbcode','emoticons' ) ),
"track" => array( "misc/tracker" , 'tracker' , array() ),
"stats" => array( "misc/stats" , 'stats' , array() ),
"attach" => array( "misc/attach" , 'attach' , array('attachtypes' ) ),
"attach" => array( "attach" , 'attach' , array('attachtypes' ) ),
'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode' ,'emoticons' ) ),
'calendar' => array( "calendar" , 'calendar' , array('attachtypes','bbcode', 'ranks','multimod','emoticons','badwords' ) ),
'calendar' => array( "calendar" , 'calendar' , array('attachtypes','bbcode', 'ranks', 'multimod', 'emoticons', 'badwords', 'calendars', 'profilefields' ) ),
'buddy' => array( "browsebuddy" , 'assistant' , array() ),
'mmod' => array( "misc/multi_moderate", 'mmod' , array('multimod' ) ),
'warn' => array( "misc/warn" , 'warn' , array('badwords','bbcode' ,'emoticons' ) ),
@@ -152,34 +164,33 @@ $choice = array(
'module' => array( 'modules' , 'modules' , array() ),
'task' => array( 'taskloader' , 'taskloader' , array() ),
'findpost' => array( 'findpost' , 'findpost' , array() ),
"xmlout" => array( "xmlout" , 'xmlout' , array('attachtypes','multimod','bbcode','ranks','profilefields' ) ),
"xmlout" => array( "xmlout" , 'xmlout' , array('attachtypes','multimod','bbcode','ranks','profilefields','emoticons','badwords' ) ),
'paysubs' => array( 'paysubscriptions' , 'paysubscriptions' , array() ),
'rssout' => array( 'rssout' , 'rssout' , array() ),
'component' => array( 'component' , 'component' , array() ),
);
//===========================================================================
// Short tags...
//===========================================================================
//---------------------------------------------------
// Check to make sure the array key exits..
//---------------------------------------------------
$ipsclass->input['_low_act'] = strtolower( $ipsclass->input['act'] );
if (! isset($choice[ $ipsclass->input['_low_act'] ][0]) )
if ( ! isset($choice[ $ipsclass->input['_low_act'] ][0]) )
{
$ipsclass->input['act'] = 'idx';
$ipsclass->input['_low_act'] = 'idx';
$ipsclass->input['act'] = $ipsclass->input['_low_act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx';
}
//===========================================================================
// Short tags...
//===========================================================================
if ( $ipsclass->input['showforum'] != "" )
if ( isset($ipsclass->input['showforum']) && $ipsclass->input['showforum'] != "" )
{
$ipsclass->input['act'] = "sf";
$ipsclass->input['f'] = intval($ipsclass->input['showforum']);
}
else if ( $ipsclass->input['showtopic'] != "")
else if ( isset($ipsclass->input['showtopic']) && $ipsclass->input['showtopic'] != "")
{
$ipsclass->input['act'] = "st";
$ipsclass->input['t'] = intval($ipsclass->input['showtopic']);
@@ -199,27 +210,27 @@ else if ( $ipsclass->input['showtopic'] != "")
$ipsclass->topic_cache = $ipsclass->DB->fetch_row();
$ipsclass->input['f'] = $ipsclass->topic_cache['forum_id'];
}
else if ( $ipsclass->input['showuser'] != "")
else if ( isset($ipsclass->input['showuser']) && $ipsclass->input['showuser'] != "")
{
$ipsclass->input['act'] = "profile";
$ipsclass->input['MID'] = intval($ipsclass->input['showuser']);
}
else if ( $ipsclass->input['automodule'] != "" )
else if ( isset($ipsclass->input['automodule']) && $ipsclass->input['automodule'] != "" )
{
$ipsclass->input['act'] = 'module';
$ipsclass->input['module'] = $ipsclass->input['automodule'];
}
else if ( $ipsclass->input['autocom'] != "" )
else if ( isset($ipsclass->input['autocom']) && $ipsclass->input['autocom'] != "" )
{
$ipsclass->input['act'] = 'component';
$ipsclass->input['module'] = $ipsclass->input['autocom'];
}
else
{
$ipsclass->input['act'] = $ipsclass->input['act'] == '' ? "idx" : $ipsclass->input['act'];
$ipsclass->input['act'] = ! isset($ipsclass->input['act']) || $ipsclass->input['act'] == '' ? "idx" : $ipsclass->input['act'];
}
if ( ! $ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' )
if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' )
{
$ipsclass->input['_low_act'] = strtolower($ipsclass->input['act']);
}
@@ -228,7 +239,7 @@ if ( ! $ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' )
// Start off the cache array
//--------------------------------
$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
//--------------------------------
// Module? Load INIT class
@@ -251,14 +262,9 @@ if ( ( $ipsclass->input['act'] == 'module' OR $ipsclass->input['act'] == 'compon
// Get cache...
//===========================================================================
$ipsclass->init_cache_setup();
$ipsclass->init_load_cache( $ipsclass->cache_array );
//--------------------------------
// Set debug mode
//--------------------------------
$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
//--------------------------------
// Initialize the FUNC
//--------------------------------
@@ -294,7 +300,13 @@ $ipsclass->forums->forums_init();
$ipsclass->load_skin();
list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] );
$ppu = 0;
$tpu = 0;
if( isset($ipsclass->member['view_prefs']) )
{
list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] );
}
$ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics'];
$ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts'];
@@ -336,20 +348,20 @@ $ipsclass->vars['mime_img'] = 'style_images/<#IMG_DIR#>';
// Set up our language choice
//--------------------------------
if ($ipsclass->vars['default_language'] == "")
if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "")
{
$ipsclass->vars['default_language'] = 'ru';
$ipsclass->vars['default_language'] = 'en';
}
//--------------------------------
// Did we choose a language?
//--------------------------------
If ( $ipsclass->input['setlanguage'] and $ipsclass->input['langid'] and $ipsclass->member['id'] )
if ( (isset($ipsclass->input['setlanguage']) AND $ipsclass->input['setlanguage']) AND (isset($ipsclass->input['langid']) AND $ipsclass->input['langid']) AND $ipsclass->member['id'] )
{
if ( is_array( $ipsclass->cache['languages'] ) and count( $ipsclass->cache['languages'] ) )
{
foreach( $ipsclass->cache['languages'] as $idx => $data )
foreach( $ipsclass->cache['languages'] as $data )
{
if ( $data['ldir'] == $ipsclass->input['langid'] )
{
@@ -398,11 +410,25 @@ if ( USE_SHUTDOWN and $ipsclass->input['act'] != 'task' )
if ($ipsclass->input['_low_act'] != 'login' and
$ipsclass->input['_low_act'] != 'reg' and
$ipsclass->input['_low_act'] != 'xmlout' and
$ipsclass->input['_low_act'] != 'rssout' and
$ipsclass->input['_low_act'] != 'attach' and
$ipsclass->input['_low_act'] != 'task' and
$ipsclass->input['_low_act'] != 'paysubs' )
{
//-----------------------------------------
// Do we have a display name?
//-----------------------------------------
if ( ! $ipsclass->member['members_display_name'] AND $ipsclass->member['members_created_remote'] )
{
$pmember = $ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id=" . $ipsclass->member['id'] ) );
if ( $pmember['partial_member_id'] )
{
$ipsclass->boink_it( $ipsclass->base_url . 'act=reg&CODE=complete_login&mid='.$ipsclass->member['id'].'&key='.$pmember['partial_date'] );
}
}
//--------------------------------
// Do we have permission to view
// the board?
@@ -444,13 +470,13 @@ if ($ipsclass->input['_low_act'] != 'login' and
// Not enforced
//--------------------------------
if ( ! $ipsclass->member['sub_end'] )
if ( !isset($ipsclass->member['sub_end']) OR !$ipsclass->member['sub_end'] )
{
//--------------------------------
// 1: No enforce, chosen from reg
//--------------------------------
if ( ! $ipsclass->vars['subsm_enforce'] and $ipsclass->member['subs_pkg_chosen'] )
if ( ! $ipsclass->vars['subsm_enforce'] and (isset($ipsclass->member['subs_pkg_chosen']) AND $ipsclass->member['subs_pkg_chosen']) )
{
$ipsclass->input['act'] = 'paysubs';
$ipsclass->input['CODE'] = 'paymentmethod';