Files
IPB/upload/upgrade/upg_21006/version_upgrade.php
T
2025-12-19 00:22:37 -08:00

100 lines
3.5 KiB
PHP

<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v<{%dyn.down.var.human.version%}>
| ========================================
| by Matthew Mecham
| (c) 2001 - 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: <{%dyn.down.var.time%}>
| Release: <{%dyn.down.var.md5%}>
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > IPB UPGRADE MODULE:: IPB 2.0.2 -> IPB 2.0.3
| > Script written by Matt Mecham
| > Date started: 23rd April 2004
| > "So what, pop is dead - it's no great loss.
So many facelifts, it's face flew off"
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class version_upgrade
{
var $this_version = '21006';
var $upgrade_from = '21005';
var $first_step = 'update your database to include the new schematic';
var $md5_check = '';
var $base_url = '';
var $mod_to_run = '';
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function version_upgrade()
{
}
function version_process()
{
$this->md5_check = $this->ipsclass->return_md5_check();
$this->base_url = "index.php?act=work&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}";
if ( is_array( $this->ipsclass->modules_to_run ) and count( $this->ipsclass->modules_to_run ) )
{
$tmp = array_shift( $this->ipsclass->modules_to_run );
$this->mod_to_run = implode( ', ', $this->ipsclass->modules_to_run );
}
if ( ! $this->mod_to_run )
{
$this->mod_to_run = 'None';
}
}
/*-------------------------------------------------------------------------*/
// Auto run..
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->template->content .= "
<div class='tableborder'>
<div class='maintitle'>Welcome to the IPB Upgrade System</div>
<div class='tdrow1' style='padding:6px'>This upgrade module will upgrade you from <b>{$this->ipsclass->versions[$this->upgrade_from]}</b> to <b>{$this->ipsclass->versions[$this->this_version]}</b>
<br /><br />This first step will {$this->first_step}
<br />
<div align='center'><span style='font-weight:bold;font-size:14px'>&raquo; <a href='index.php?act=done&loginkey={$this->ipsclass->input['loginkey']}&securekey={$this->ipsclass->input['securekey']}&mid={$this->ipsclass->input['mid']}'>Proceed ...</a></span></div>
</div>
</div>
<br />
<div align='center'>Modules to run after this module: {$this->mod_to_run}</div>
";
if ( ! is_writeable( CACHE_PATH . 'cache/skin_cache' ) )
{
$this->ipsclass->template->content .= "<div class='warnbox'><strong>WARNING: cache/skin_cache is not writeable</strong><br />
Please check the CHMOD value on this folder before continuing. Failure to do so could mean that
your skin files will not be installed correctly.</div>";
}
$this->ipsclass->template->output();
}
}
?>