Version 3.0.5
This commit is contained in:
1 parent
19b38c7c74
commit
1d4720f3e2
3755 files changed
+508378
-664541
No files matched your search
@@ -0,0 +1 @@
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* SQL for upgrader
|
||||
* Last Updated: $Date: 2009-01-16 21:16:58 +0000 (Fri, 16 Jan 2009) $
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 1st December 2008
|
||||
* @version $Revision: 3721 $
|
||||
*
|
||||
*/
|
||||
|
||||
$UPGRADE_HISTORY_TABLE = "CREATE TABLE upgrade_history (
|
||||
upgrade_id int(10) NOT NULL auto_increment,
|
||||
upgrade_version_id int(10) NOT NULL default '0',
|
||||
upgrade_version_human varchar(200) NOT NULL default '',
|
||||
upgrade_date int(10) NOT NULL default '0',
|
||||
upgrade_mid int(10) NOT NULL default '0',
|
||||
upgrade_notes text NOT NULL,
|
||||
upgrade_app varchar(32) NOT NULL default 'core',
|
||||
PRIMARY KEY (upgrade_id)
|
||||
);";
|
||||
|
||||
$UPGRADE_TABLE_FIELD = "ALTER TABLE upgrade_history ADD upgrade_app varchar(32) NOT NULL default 'core'";
|
||||
|
||||
$UPGRADE_SESSION_TABLE = "CREATE TABLE upgrade_sessions (
|
||||
session_id varchar(32) NOT NULL default '',
|
||||
session_member_id int(10) NOT NULL default 0,
|
||||
session_member_key varchar(32) NOT NULL default '',
|
||||
session_start_time int(10) NOT NULL default 0,
|
||||
session_current_time int(10) NOT NULL default 0,
|
||||
session_ip_address varchar(16) NOT NULL default '',
|
||||
session_section varchar(32) NOT NULL default '',
|
||||
session_post TEXT,
|
||||
session_get TEXT,
|
||||
session_data TEXT,
|
||||
session_extra TEXT,
|
||||
PRIMARY KEY (session_id)
|
||||
);";
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* SQL installation methods
|
||||
* Last Updated: $Date: 2009-03-11 13:15:04 +0000 (Wed, 11 Mar 2009) $
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 1st December 2008
|
||||
* @version $Revision: 4189 $
|
||||
*
|
||||
*/
|
||||
|
||||
class install_extra
|
||||
{
|
||||
/**
|
||||
* Errors
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
/**
|
||||
* Extra info
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $info_extra = array();
|
||||
|
||||
/**
|
||||
* Set Prefix
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $prefix = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make registry objects */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set db prefix
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void
|
||||
*/
|
||||
public function setDbPrefix( $prefix='' )
|
||||
{
|
||||
if( $prefix )
|
||||
{
|
||||
$this->prefix = $prefix;
|
||||
return;
|
||||
}
|
||||
else if( class_exists( 'IPSSetUp' ) )
|
||||
{
|
||||
if ( IPSSetUp::getSavedData('db_pre') )
|
||||
{
|
||||
$this->prefix = IPSSetUp::getSavedData('db_pre');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Still 'ere? */
|
||||
$this->prefix = $this->settings['sql_tbl_prefix'];
|
||||
}
|
||||
|
||||
/**
|
||||
* before_inserts_run
|
||||
* Allows one to run SQL commands before any inserts are run
|
||||
*
|
||||
* Use ipsRegistry::DB()->query("") to run queries
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of inserts to run
|
||||
* @return void
|
||||
*/
|
||||
public function before_inserts_run( $type )
|
||||
{
|
||||
switch( $type )
|
||||
{
|
||||
case 'applications':
|
||||
case 'modules':
|
||||
case 'settings':
|
||||
case 'system_templates':
|
||||
case 'content_templates':
|
||||
case 'tasks':
|
||||
case 'bbcode':
|
||||
case 'media':
|
||||
case 'languages':
|
||||
case 'login':
|
||||
case 'groups':
|
||||
case 'staff_roles':
|
||||
case 'attachments':
|
||||
case 'skinset':
|
||||
case 'email_templates':
|
||||
case 'caches':
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* after_inserts_run
|
||||
* Allows one to run SQL commands AFTER any inserts are run
|
||||
*
|
||||
* Use ipsRegistry::DB()->query("") to run queries
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of inserts to run
|
||||
* @return void
|
||||
*/
|
||||
public function after_inserts_run( $type )
|
||||
{
|
||||
switch( $type )
|
||||
{
|
||||
case 'applications':
|
||||
case 'modules':
|
||||
case 'settings':
|
||||
case 'system_templates':
|
||||
case 'content_templates':
|
||||
case 'tasks':
|
||||
case 'bbcode':
|
||||
case 'media':
|
||||
case 'languages':
|
||||
case 'login':
|
||||
case 'groups':
|
||||
case 'staff_roles':
|
||||
case 'attachments':
|
||||
case 'skinset':
|
||||
case 'email_templates':
|
||||
case 'caches':
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter create table statements before being run
|
||||
*
|
||||
* @access public
|
||||
* @param string Query
|
||||
* @return string Query
|
||||
*/
|
||||
public function process_query_create( $query )
|
||||
{
|
||||
$this->setDbPrefix();
|
||||
|
||||
//-----------------------------------------
|
||||
// Tack on the end the chosen table type
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->prefix )
|
||||
{
|
||||
$query = preg_replace( "#^CREATE TABLE(?:\s+?)?(\S+?)#s", "CREATE TABLE " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^INSERT INTO(?:\s+?)?(\S+?)#s" , "INSERT INTO " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^REPLACE INTO(?:\s+?)?(\S+?)#s", "REPLACE INTO " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^ALTER TABLE(?:\s+?)?(\S+?)#s" , "ALTER TABLE " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^DELETE FROM(?:\s+?)?(\S+?)#s" , "DELETE FROM " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^UPDATE(?:\s+?)?(\S+?)#s" , "UPDATE " . $this->prefix."\\1" , $query );
|
||||
}
|
||||
|
||||
$table_type = $this->settings['mysql_tbl_type'] ? $this->settings['mysql_tbl_type'] : 'MyISAM';
|
||||
|
||||
return preg_replace( "#\);$#", ") ENGINE=".$table_type.";", $query );
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter create index statements before being run
|
||||
*
|
||||
* @access public
|
||||
* @param string Query
|
||||
* @return string Query
|
||||
*/
|
||||
public function process_query_index( $query )
|
||||
{
|
||||
$this->setDbPrefix();
|
||||
|
||||
//-----------------------------------------
|
||||
// Tack on the end the chosen table type
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->prefix )
|
||||
{
|
||||
$query = preg_replace( "#^CREATE TABLE(?:\s+?)?(\S+?)#s", "CREATE TABLE " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^INSERT INTO(?:\s+?)?(\S+?)#s" , "INSERT INTO " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^REPLACE INTO(?:\s+?)?(\S+?)#s", "REPLACE INTO " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^ALTER TABLE(?:\s+?)?(\S+?)#s" , "ALTER TABLE " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^DELETE FROM(?:\s+?)?(\S+?)#s" , "DELETE FROM " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^UPDATE(?:\s+?)?(\S+?)#s" , "UPDATE " . $this->prefix."\\1" , $query );
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter insert statements before being run
|
||||
*
|
||||
* @access public
|
||||
* @param string Query
|
||||
* @return string Query
|
||||
*/
|
||||
public function process_query_insert( $query )
|
||||
{
|
||||
$this->setDbPrefix();
|
||||
|
||||
//-----------------------------------------
|
||||
// Tack on the end the chosen table type
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->prefix )
|
||||
{
|
||||
$query = preg_replace( "#^CREATE TABLE(?:\s+?)?(\S+?)#s", "CREATE TABLE " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^INSERT INTO(?:\s+?)?(\S+?)#s" , "INSERT INTO " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^REPLACE INTO(?:\s+?)?(\S+?)#s", "REPLACE INTO " . $this->prefix."\\1", $query );
|
||||
$query = preg_replace( "#^ALTER TABLE(?:\s+?)?(\S+?)#s" , "ALTER TABLE " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^DELETE FROM(?:\s+?)?(\S+?)#s" , "DELETE FROM " . $this->prefix."\\1" , $query );
|
||||
$query = preg_replace( "#^UPDATE(?:\s+?)?(\S+?)#s" , "UPDATE " . $this->prefix."\\1" , $query );
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return additional HTML to show on install form
|
||||
*
|
||||
* @access public
|
||||
* @return string HTML
|
||||
*/
|
||||
public function install_form_extra()
|
||||
{
|
||||
$extra = "<tr>
|
||||
<td class='title'><b>Тип таблиц MySQL</b><div style='color:gray'>Используйте MyISAM если не уверены</div></td>
|
||||
<td class='content'><select name='mysql_tbl_type' class='sql_form'><option value='MyISAM'>MYISAM</option><option value='INNODB'>INNODB</option></td>
|
||||
</tr>";
|
||||
|
||||
return $extra;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Save additional info from install form
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function install_form_process()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// When processed, return all vars to save
|
||||
// in conf_global in the array $this->info_extra
|
||||
// This will also be saved into $INFO[] for
|
||||
// the installer
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $_REQUEST['mysql_tbl_type'] )
|
||||
{
|
||||
$this->errors[] = 'Вы должны заполнить все необходимые поля!';
|
||||
return;
|
||||
}
|
||||
|
||||
$this->info_extra['mysql_tbl_type'] = $_REQUEST['mysql_tbl_type'];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user