Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,378 +1,379 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2011-05-24 22:52:26 -0400 (Tue, 24 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8886 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_apps extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Delete sessions and continue */
|
||||
if ( $this->request['do'] == 'rsessions' )
|
||||
{
|
||||
IPSSetUp::removePreviousSession();
|
||||
}
|
||||
|
||||
/* Rebuild from last session and continue */
|
||||
if ( $this->request['do'] == 'rcontinue' )
|
||||
{
|
||||
$oldSession = IPSSetUp::checkForPreviousSessions();
|
||||
|
||||
if ( count( $oldSession ) AND $oldSession['_session_get']['section'] AND $oldSession['_sd']['install_apps'] )
|
||||
{
|
||||
IPSSetUp::restorePreviousSession( $oldSession );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for failed upgrade */
|
||||
if ( ! $this->request['do'] OR ( $this->request['do'] != 'rsessions' ) )
|
||||
{
|
||||
$oldSession = IPSSetUp::checkForPreviousSessions();
|
||||
|
||||
if ( count( $oldSession ) AND $oldSession['_session_get']['section'] AND $oldSession['_sd']['install_apps'] )
|
||||
{
|
||||
/* Page Output */
|
||||
$this->registry->output->setTitle( "Applications" );
|
||||
$this->registry->output->setNextAction( 'apps&do=rsessions' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_previousSession( $oldSession ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
|
||||
/* Save data */
|
||||
if ( $this->request['do'] == 'save' )
|
||||
{
|
||||
$apps = explode( ',', IPSSetUp::getSavedData('install_apps') );
|
||||
$toSave = array();
|
||||
$vNums = array();
|
||||
|
||||
if ( is_array( $apps ) and count( $apps ) )
|
||||
{
|
||||
foreach( $apps as $app )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
|
||||
/* Store starting vnums */
|
||||
$vNums[ $app ] = $numbers['current'][0];
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallOptionsSave' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallOptionsSave();
|
||||
|
||||
if ( is_array( $_t ) AND count( $_t ) )
|
||||
{
|
||||
$toSave[ $app ][ $num ] = $_t;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Save it */
|
||||
if ( count( $toSave ) )
|
||||
{
|
||||
IPSSetUp::setSavedData('custom_options', $toSave );
|
||||
}
|
||||
|
||||
if ( count( $vNums ) )
|
||||
{
|
||||
IPSSetUp::setSavedData('version_numbers', $vNums );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Next Action */
|
||||
$this->registry->autoLoadNextAction( 'license' );
|
||||
}
|
||||
/* Check input? */
|
||||
else if ( $this->request['do'] == 'check' )
|
||||
{
|
||||
/* Check Directory */
|
||||
if ( ! is_array( $_POST['apps'] ) OR ! count( $_POST['apps'] ) )
|
||||
{
|
||||
$this->registry->output->addWarning( 'Необходмо выбрать приложения для обновления.' );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If it's lower than 3.0.0, then add in the removed apps */
|
||||
if ( IPSSetUp::is300plus() !== TRUE )
|
||||
{
|
||||
$_POST['apps']['forums'] = 1;
|
||||
$_POST['apps']['members'] = 1;
|
||||
$_POST['apps']['calendar'] = 1;
|
||||
$_POST['apps']['chat'] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $_POST['apps']['core'] )
|
||||
{
|
||||
$_POST['apps']['forums'] = 1;
|
||||
$_POST['apps']['members'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Save Form Data */
|
||||
IPSSetUp::setSavedData('install_apps', implode( ',', array_keys( $_POST['apps'] ) ) );
|
||||
|
||||
/* Got any app-version classes? */
|
||||
$appClasses = array();
|
||||
$output = array();
|
||||
$nums = array();
|
||||
$appData = array();
|
||||
|
||||
foreach( $_POST['apps'] as $app => $val )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
$error = FALSE;
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/upgradeCheck.php' ) )
|
||||
{
|
||||
$_class = $app . '_upgradeCheck';
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/upgradeCheck.php' );/*noLibHook*/
|
||||
$requirements_class = new $_class();
|
||||
|
||||
if ( method_exists( $requirements_class, 'checkForProblems' ) )
|
||||
{
|
||||
$check = $requirements_class->checkForProblems();
|
||||
if ( $check !== TRUE )
|
||||
{
|
||||
$error = TRUE;
|
||||
$this->registry->output->addError( $check );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallOptionsForm' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallOptionsForm();
|
||||
|
||||
if ( $_t )
|
||||
{
|
||||
$output[ $app ][ $num ] = array( 'long' => $nums[ $app ][ $num ],
|
||||
'app' => $appData[ $app ],
|
||||
'out' => $_t );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally... */
|
||||
if ( count( $output ) or $error === TRUE )
|
||||
{
|
||||
$this->registry->output->setTitle( "Приложения" );
|
||||
$this->registry->output->setNextAction( 'apps&do=save' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
if ( !$error )
|
||||
{
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_appsOptions( $output ) );
|
||||
}
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Next Action */
|
||||
$this->registry->autoLoadNextAction( 'license' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Generate apps... */
|
||||
$apps = array( 'core' => array(), 'ips' => array(), 'other' => array() );
|
||||
|
||||
foreach( array( 'applications', 'applications_addon/ips', 'applications_addon/other' ) as $_pBit )
|
||||
{
|
||||
$path = IPS_ROOT_PATH . $_pBit;
|
||||
$handle = opendir( $path );
|
||||
|
||||
while ( ( $file = readdir( $handle ) ) !== FALSE )
|
||||
{
|
||||
if ( ! preg_match( "#^\.#", $file ) )
|
||||
{
|
||||
if ( is_dir( $path . '/' . $file ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get it!
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_file( IPS_ROOT_PATH . $_pBit . '/' . $file . '/xml/information.xml' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = IPSSetUp::fetchXmlAppInformation( $file, $this->settings['gb_char_set'] );
|
||||
|
||||
switch( $_pBit )
|
||||
{
|
||||
case 'applications':
|
||||
$apps['core'][ $file ] = $data;
|
||||
break;
|
||||
case 'applications_addon/ips':
|
||||
$apps['ips'][ $file ] = $data;
|
||||
break;
|
||||
case 'applications_addon/other':
|
||||
$apps['other'][ $file ] = $data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir( $handle );
|
||||
}
|
||||
|
||||
/* Reorder the array so that core is first */
|
||||
$new_array = array();
|
||||
$new_array['core'] = $apps['core']['core'];
|
||||
|
||||
foreach( $apps['core'] as $app => $data )
|
||||
{
|
||||
if( $app == 'core' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$new_array[$app] = $data;
|
||||
}
|
||||
|
||||
$apps['core'] = $new_array;
|
||||
|
||||
/* Now get version numbers */
|
||||
foreach( $apps as $type => $app )
|
||||
{
|
||||
foreach( $apps[ $type ] as $app => $data )
|
||||
{
|
||||
if ( $type == 'core' and ( $app == 'forums' OR $app == 'members' ) )
|
||||
{
|
||||
/* Skip forums and members and just count core for now */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
|
||||
$apps[ $type ][ $app ]['_vnumbers'] = $numbers;
|
||||
}
|
||||
}
|
||||
|
||||
/* Any notices? */
|
||||
$notices = array();
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
$notices[ $app ] = array();
|
||||
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallNotices' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallNotices();
|
||||
|
||||
if ( $_t )
|
||||
{
|
||||
$notices[ $app ] = array_merge( $_t, $notices[ $app ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's lower than 3.0.0, then remove some apps and make them part of 'core' */
|
||||
if ( IPSSetUp::is300plus() !== TRUE )
|
||||
{
|
||||
unset( $apps['ips']['calendar'] );
|
||||
unset( $apps['ips']['chat'] );
|
||||
}
|
||||
|
||||
/* Page Output */
|
||||
$this->registry->output->setTitle( "Приложения" );
|
||||
$this->registry->output->setNextAction( 'apps&do=check' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_apps( $apps, $notices ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_apps extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Delete sessions and continue */
|
||||
if ( $this->request['do'] == 'rsessions' )
|
||||
{
|
||||
IPSSetUp::removePreviousSession();
|
||||
}
|
||||
|
||||
/* Rebuild from last session and continue */
|
||||
if ( $this->request['do'] == 'rcontinue' )
|
||||
{
|
||||
$oldSession = IPSSetUp::checkForPreviousSessions();
|
||||
|
||||
if ( count( $oldSession ) AND $oldSession['_session_get']['section'] AND $oldSession['_sd']['install_apps'] )
|
||||
{
|
||||
IPSSetUp::restorePreviousSession( $oldSession );
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for failed upgrade */
|
||||
if ( ! $this->request['do'] OR ( $this->request['do'] != 'rsessions' ) )
|
||||
{
|
||||
$oldSession = IPSSetUp::checkForPreviousSessions();
|
||||
|
||||
if ( count( $oldSession ) AND $oldSession['_session_get']['section'] AND $oldSession['_sd']['install_apps'] )
|
||||
{
|
||||
/* Page Output */
|
||||
$this->registry->output->setTitle( "Applications" );
|
||||
$this->registry->output->setNextAction( 'apps&do=rsessions' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_previousSession( $oldSession ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
|
||||
/* Save data */
|
||||
if ( $this->request['do'] == 'save' )
|
||||
{
|
||||
$apps = explode( ',', IPSSetUp::getSavedData('install_apps') );
|
||||
$toSave = array();
|
||||
$vNums = array();
|
||||
|
||||
if ( is_array( $apps ) and count( $apps ) )
|
||||
{
|
||||
foreach( $apps as $app )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
|
||||
/* Store starting vnums */
|
||||
$vNums[ $app ] = $numbers['current'][0];
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallOptionsSave' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallOptionsSave();
|
||||
|
||||
if ( is_array( $_t ) AND count( $_t ) )
|
||||
{
|
||||
$toSave[ $app ][ $num ] = $_t;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Save it */
|
||||
if ( count( $toSave ) )
|
||||
{
|
||||
IPSSetUp::setSavedData('custom_options', $toSave );
|
||||
}
|
||||
|
||||
if ( count( $vNums ) )
|
||||
{
|
||||
IPSSetUp::setSavedData('version_numbers', $vNums );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Next Action */
|
||||
$this->registry->autoLoadNextAction( 'license' );
|
||||
}
|
||||
/* Check input? */
|
||||
else if ( $this->request['do'] == 'check' )
|
||||
{
|
||||
/* Check Directory */
|
||||
if ( ! is_array( $_POST['apps'] ) OR ! count( $_POST['apps'] ) )
|
||||
{
|
||||
/* We use 'warning' because it has same effect but does not block the 'next' button (which they'll want to use after selecting an app when page reloads) */
|
||||
$this->registry->output->addWarning( 'You must select to upgrade at least one application' );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If it's lower than 3.0.0, then add in the removed apps */
|
||||
if ( IPSSetUp::is300plus() !== TRUE )
|
||||
{
|
||||
$_POST['apps']['forums'] = 1;
|
||||
$_POST['apps']['members'] = 1;
|
||||
$_POST['apps']['calendar'] = 1;
|
||||
$_POST['apps']['chat'] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $_POST['apps']['core'] )
|
||||
{
|
||||
$_POST['apps']['forums'] = 1;
|
||||
$_POST['apps']['members'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Save Form Data */
|
||||
IPSSetUp::setSavedData('install_apps', implode( ',', array_keys( $_POST['apps'] ) ) );
|
||||
|
||||
/* Got any app-version classes? */
|
||||
$appClasses = array();
|
||||
$output = array();
|
||||
$nums = array();
|
||||
$appData = array();
|
||||
|
||||
foreach( $_POST['apps'] as $app => $val )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
$error = FALSE;
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/upgradeCheck.php' ) )
|
||||
{
|
||||
$_class = $app . '_upgradeCheck';
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/upgradeCheck.php' );/*noLibHook*/
|
||||
$requirements_class = new $_class();
|
||||
|
||||
if ( method_exists( $requirements_class, 'checkForProblems' ) )
|
||||
{
|
||||
$check = $requirements_class->checkForProblems( $appClasses );
|
||||
if ( $check !== TRUE )
|
||||
{
|
||||
$error = TRUE;
|
||||
$this->registry->output->addError( $check );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallOptionsForm' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallOptionsForm();
|
||||
|
||||
if ( $_t )
|
||||
{
|
||||
$output[ $app ][ $num ] = array( 'long' => $nums[ $app ][ $num ],
|
||||
'app' => $appData[ $app ],
|
||||
'out' => $_t );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally... */
|
||||
if ( count( $output ) or $error === TRUE )
|
||||
{
|
||||
$this->registry->output->setTitle( "Applications" );
|
||||
$this->registry->output->setNextAction( 'apps&do=save' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
if ( !$error )
|
||||
{
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_appsOptions( $output ) );
|
||||
}
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Next Action */
|
||||
$this->registry->autoLoadNextAction( 'license' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Generate apps... */
|
||||
$apps = array( 'core' => array(), 'ips' => array(), 'other' => array() );
|
||||
|
||||
foreach( array( 'applications', 'applications_addon/ips', 'applications_addon/other' ) as $_pBit )
|
||||
{
|
||||
$path = IPS_ROOT_PATH . $_pBit;
|
||||
$handle = opendir( $path );
|
||||
|
||||
while ( ( $file = readdir( $handle ) ) !== FALSE )
|
||||
{
|
||||
if ( ! preg_match( "#^\.#", $file ) )
|
||||
{
|
||||
if ( is_dir( $path . '/' . $file ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get it!
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_file( IPS_ROOT_PATH . $_pBit . '/' . $file . '/xml/information.xml' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = IPSSetUp::fetchXmlAppInformation( $file, $this->settings['gb_char_set'] );
|
||||
|
||||
switch( $_pBit )
|
||||
{
|
||||
case 'applications':
|
||||
$apps['core'][ $file ] = $data;
|
||||
break;
|
||||
case 'applications_addon/ips':
|
||||
$apps['ips'][ $file ] = $data;
|
||||
break;
|
||||
case 'applications_addon/other':
|
||||
$apps['other'][ $file ] = $data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir( $handle );
|
||||
}
|
||||
|
||||
/* Reorder the array so that core is first */
|
||||
$new_array = array();
|
||||
$new_array['core'] = $apps['core']['core'];
|
||||
|
||||
foreach( $apps['core'] as $app => $data )
|
||||
{
|
||||
if( $app == 'core' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$new_array[$app] = $data;
|
||||
}
|
||||
|
||||
$apps['core'] = $new_array;
|
||||
|
||||
/* Now get version numbers */
|
||||
foreach( $apps as $type => $app )
|
||||
{
|
||||
foreach( $apps[ $type ] as $app => $data )
|
||||
{
|
||||
if ( $type == 'core' and ( $app == 'forums' OR $app == 'members' ) )
|
||||
{
|
||||
/* Skip forums and members and just count core for now */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $numbers['current'][0], $numbers['latest'][0] );
|
||||
|
||||
$apps[ $type ][ $app ]['_vnumbers'] = $numbers;
|
||||
}
|
||||
}
|
||||
|
||||
/* Any notices? */
|
||||
$notices = array();
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
$notices[ $app ] = array();
|
||||
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'preInstallNotices' ) )
|
||||
{
|
||||
$_t = $_tmp->preInstallNotices();
|
||||
|
||||
if ( $_t )
|
||||
{
|
||||
$notices[ $app ] = array_merge( $_t, $notices[ $app ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If it's lower than 3.0.0, then remove some apps and make them part of 'core' */
|
||||
if ( IPSSetUp::is300plus() !== TRUE )
|
||||
{
|
||||
unset( $apps['ips']['calendar'] );
|
||||
unset( $apps['ips']['chat'] );
|
||||
}
|
||||
|
||||
/* Page Output */
|
||||
$this->registry->output->setTitle( "Applications" );
|
||||
$this->registry->output->setNextAction( 'apps&do=check' );
|
||||
//$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_apps( $apps, $notices ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.0
|
||||
* Upgrader: Database Convertion
|
||||
*
|
||||
* @author Tony
|
||||
* @license This is NULLED!
|
||||
* @package Invision Power Board
|
||||
* @link http://hatynka.in
|
||||
*
|
||||
*/
|
||||
|
||||
class upgrade_convert extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry ) {
|
||||
|
||||
// uncomment to skip this step
|
||||
//$this->registry->autoLoadNextAction( 'apps' );
|
||||
|
||||
if( strtolower( $this->settings['sql_driver'] ) == 'mysql' ) {
|
||||
|
||||
$utf8_ok = FALSE;
|
||||
$table_prefix = $this->registry->dbFunctions()->getPrefix(); // PREFIX CAN BE EMPTY !
|
||||
|
||||
$this->DB->return_die = 1;
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->error = '';
|
||||
|
||||
if( substr( $this->DB->getSqlVersion(), 0, 1 ) >= 5 ) {
|
||||
$query = "SELECT table_collation FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '{$this->settings['sql_database']}' AND table_name LIKE '{$table_prefix}%'";
|
||||
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error ) {
|
||||
$this->registry->output->addError( nl2br( $query ) . '<br /><br />' . $this->DB->error );
|
||||
}
|
||||
else {
|
||||
|
||||
$utf8_ok = TRUE;
|
||||
|
||||
while( $r = $this->DB->fetch() ) {
|
||||
|
||||
if ( strpos( $r['table_collation'], 'utf8' ) !== 0 ) {
|
||||
$utf8_ok = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$tables = Array( 'posts', 'forums' );
|
||||
|
||||
foreach( $tables as $table ) {
|
||||
|
||||
$table = $table_prefix . $table;
|
||||
$query = 'SHOW CREATE TABLE ' . $table;
|
||||
|
||||
$this->DB->query( $query );
|
||||
|
||||
if ( $this->DB->error ) {
|
||||
$this->registry->output->addError( nl2br( $query ) . '<br /><br />' . $this->DB->error );
|
||||
$utf8_ok = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
$code = $this->DB->fetch();
|
||||
|
||||
if ( preg_match( '/ DEFAULT CHARSET=utf8/', $code['Create Table'] )) {
|
||||
$utf8_ok = TRUE;
|
||||
}
|
||||
else {
|
||||
$utf8_ok = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $utf8_ok ) {
|
||||
$this->registry->autoLoadNextAction( 'apps' );
|
||||
}
|
||||
else {
|
||||
$this->registry->output->setNextAction( '' );
|
||||
$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->setTitle( 'Конвертация базы данных' );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_convert() );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->registry->autoLoadNextAction( 'apps' );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,95 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Installer: DONE file
|
||||
* Last Updated: $LastChangedDate: 2011-05-24 15:40:20 -0400 (Tue, 24 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8884 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_done extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Remove the FURL cache */
|
||||
@unlink( IPS_CACHE_PATH . 'cache/furlCache.php' );
|
||||
|
||||
/* Got anything to show? */
|
||||
$apps = explode( ',', IPSSetUp::getSavedData('install_apps') );
|
||||
$vNums = IPSSetUp::getSavedData('version_numbers');
|
||||
$output = array();
|
||||
|
||||
if ( is_array( $apps ) and count( $apps ) )
|
||||
{
|
||||
foreach( $apps as $app )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $vNums[ $app ], $numbers['latest'][0] );
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'postInstallNotices' ) )
|
||||
{
|
||||
$_t = $_tmp->postInstallNotices();
|
||||
|
||||
if ( is_array( $_t ) AND count( $_t ) )
|
||||
{
|
||||
$output[ $app ][ $num ] = array( 'long' => $nums[ $app ][ $num ],
|
||||
'app' => $appData[ $app ],
|
||||
'out' => implode( "<br />", $_t ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove any SQL source files */
|
||||
IPSSetUp::removeSqlSourceFiles();
|
||||
|
||||
/* Simply return the Done page */
|
||||
$this->registry->output->setTitle( "Обновление завершено!" );
|
||||
$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_complete( $output ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Installer: DONE file
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_done extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Remove the FURL cache */
|
||||
@unlink( IPS_CACHE_PATH . 'cache/furlCache.php' );
|
||||
|
||||
/* Got anything to show? */
|
||||
$apps = explode( ',', IPSSetUp::getSavedData('install_apps') );
|
||||
$vNums = IPSSetUp::getSavedData('version_numbers');
|
||||
$output = array();
|
||||
|
||||
if ( is_array( $apps ) and count( $apps ) )
|
||||
{
|
||||
foreach( $apps as $app )
|
||||
{
|
||||
/* Grab version numbers */
|
||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $app );
|
||||
|
||||
/* Grab all numbers */
|
||||
$nums[ $app ] = IPSSetUp::fetchXmlAppVersions( $app );
|
||||
|
||||
/* Grab app data */
|
||||
$appData[ $app ] = IPSSetUp::fetchXmlAppInformation( $app, $this->settings['gb_char_set'] );
|
||||
|
||||
$appClasses[ $app ] = IPSSetUp::fetchVersionClasses( $app, $vNums[ $app ], $numbers['latest'][0] );
|
||||
}
|
||||
|
||||
/* Got anything? */
|
||||
if ( count( $appClasses ) )
|
||||
{
|
||||
foreach( $appClasses as $app => $data )
|
||||
{
|
||||
foreach( $data as $num )
|
||||
{
|
||||
if ( is_file( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' ) )
|
||||
{
|
||||
$_class = 'version_class_' . $app . '_' . $num;
|
||||
require_once( IPSLib::getAppDir( $app ) . '/setup/versions/upg_' . $num . '/version_class.php' );/*noLibHook*/
|
||||
|
||||
$_tmp = new $_class( $this->registry );
|
||||
|
||||
if ( method_exists( $_tmp, 'postInstallNotices' ) )
|
||||
{
|
||||
$_t = $_tmp->postInstallNotices();
|
||||
|
||||
if ( is_array( $_t ) AND count( $_t ) )
|
||||
{
|
||||
$output[ $app ][ $num ] = array( 'long' => $nums[ $app ][ $num ],
|
||||
'app' => $appData[ $app ],
|
||||
'out' => implode( "<br />", $_t ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove any SQL source files */
|
||||
IPSSetUp::removeSqlSourceFiles();
|
||||
|
||||
/* Simply return the Done page */
|
||||
$this->registry->output->setTitle( "Complete!" );
|
||||
$this->registry->output->setHideButton( TRUE );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->upgrade_complete( $output ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,78 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Upgrader: Index file - Shows log in page
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
class upgrade_index extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
if ( ! $this->request['do'] OR $this->request['do'] == 'form' )
|
||||
{
|
||||
/* Simply return the log in page */
|
||||
$this->_showForm();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Error: No input */
|
||||
if ( ! $_POST['username'] OR ! $_POST['password'] )
|
||||
{
|
||||
$this->registry->output->addWarning( "Необходимо ввести имя пользователя и пароль" );
|
||||
$this->_showForm();
|
||||
}
|
||||
|
||||
/* Now authenticate against legacy file */
|
||||
$result = $this->registry->legacy->authenticateLogIn( $this->request['username'], $this->request['password'] );
|
||||
|
||||
if ( $result !== TRUE )
|
||||
{
|
||||
/* .. then it contains an error message */
|
||||
$this->registry->output->addWarning( $result );
|
||||
$this->_showForm();
|
||||
}
|
||||
|
||||
/* Still here? We're good to go. Create session and forward */
|
||||
$this->request['s'] = $this->member->sessionClass()->createSession( $this->registry->legacy->fetchMemberData(), $this->registry->legacy->fetchAuthKey() );
|
||||
|
||||
$this->registry->autoLoadNextAction( 'overview' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the log in form
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
public function _showForm()
|
||||
{
|
||||
$this->registry->output->setTitle( "Авторизация" );
|
||||
$this->registry->output->setNextAction( 'index&do=login' );
|
||||
$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );
|
||||
$this->registry->output->sendOutput();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Upgrader: Index file - Shows log in page
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
class upgrade_index extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
if ( ! $this->request['do'] OR $this->request['do'] == 'form' )
|
||||
{
|
||||
/* Simply return the log in page */
|
||||
$this->_showForm();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Error: No input */
|
||||
if ( ! $_POST['username'] OR ! $_POST['password'] )
|
||||
{
|
||||
$this->registry->output->addWarning( "You must enter a valid account to login" );
|
||||
$this->_showForm();
|
||||
}
|
||||
|
||||
/* Now authenticate against legacy file */
|
||||
$result = $this->registry->legacy->authenticateLogIn( $this->request['username'], $this->request['password'] );
|
||||
|
||||
if ( $result !== TRUE )
|
||||
{
|
||||
/* .. then it contains an error message */
|
||||
$this->registry->output->addWarning( $result );
|
||||
$this->_showForm();
|
||||
}
|
||||
|
||||
/* Still here? We're good to go. Create session and forward */
|
||||
$this->request['s'] = $this->member->sessionClass()->createSession( $this->registry->legacy->fetchMemberData(), $this->registry->legacy->fetchAuthKey() );
|
||||
|
||||
$this->registry->autoLoadNextAction( 'overview' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the log in form
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
public function _showForm()
|
||||
{
|
||||
$this->registry->output->setTitle( "Log In" );
|
||||
$this->registry->output->setNextAction( 'index&do=login' );
|
||||
$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );
|
||||
$this->registry->output->sendOutput();
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@@ -1,88 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Installer: License Key
|
||||
* Last Updated: $LastChangedDate: 2011-05-26 15:04:51 -0400 (Thu, 26 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8903 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_license extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* If less than 3, just bounce out as settings tables won't be here, etc */
|
||||
if ( IPSSetUp::is300plus() !== TRUE )
|
||||
{
|
||||
$this->registry->autoLoadNextAction( 'upgrade' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $this->request['do'] == 'check' )
|
||||
{
|
||||
$lcheck = $this->check();
|
||||
if ( $lcheck === TRUE )
|
||||
{
|
||||
$this->registry->autoLoadNextAction( 'upgrade' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lcheck = $this->check( TRUE );
|
||||
if ( $lcheck === TRUE )
|
||||
{
|
||||
$this->registry->autoLoadNextAction( 'upgrade' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->registry->output->setTitle( "Ключ лицензии" );
|
||||
$this->registry->output->setNextAction( "license&do=check" );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_license( $lcheck ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check License Key
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
private function check( $init=FALSE )
|
||||
{
|
||||
$this->request['lkey'] = ( $init ) ? ipsRegistry::$settings['ipb_reg_number'] : trim( $this->request['lkey'] );
|
||||
|
||||
if ( !$this->request['lkey'] and !$init )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$url = ipsRegistry::$settings['board_url'] ? ipsRegistry::$settings['board_url'] : ipsRegistry::$settings['base_url'];
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classFileManagement.php' );/*noLibHook*/
|
||||
$query = new classFileManagement();
|
||||
$query->use_sockets = 1;
|
||||
$response = $query->getFileContents( "http://myipb.in/license.php?api=activateKey&lk={$this->request['lkey']}&domain=".urlencode($url) );
|
||||
$response = json_decode( $response, true );
|
||||
IPSLib::updateSettings( array( 'ipb_reg_number' => $this->request['lkey'] ) );
|
||||
return TRUE;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3 (4)
|
||||
* Installer: License Key
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
class upgrade_license extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$lcheck = $this->check();
|
||||
$this->registry->autoLoadNextAction( 'upgrade' );
|
||||
return;
|
||||
|
||||
$this->registry->output->setTitle( "License Key" );
|
||||
$this->registry->output->setNextAction( "license&do=check" );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_license( $lcheck ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check License Key
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
private function check( $init=FALSE )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ipb_reg_number' => 'Nulled by _Dark_ (IPBMafia.Ru)' ) );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1,170 +1,169 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Upgrader: Index file - Shows log in page
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
class upgrade_overview extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* INIT */
|
||||
$filesOK = NULL;
|
||||
$extensions = get_loaded_extensions();
|
||||
$extensionsOK = TRUE;
|
||||
$extensionData = array();
|
||||
|
||||
/* Test to make sure core.php is up-to-date. Large file may not always upload cleanly */
|
||||
if ( ! method_exists( 'IPSLib', 'loadLibrary' ) )
|
||||
{
|
||||
$filesOK = false;
|
||||
$this->registry->output->addError( 'Please ensure that "' . CP_DIRECTORY . '/sources/base/core.php" is up-to-date. Re-upload via FTP if necessary' );
|
||||
}
|
||||
|
||||
/* Test Extensions */
|
||||
$INSTALLDATA = array();
|
||||
include( IPS_ROOT_PATH . 'setup/xml/requiredextensions.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $INSTALLDATA ) && count( $INSTALLDATA ) )
|
||||
{
|
||||
foreach( $INSTALLDATA as $data )
|
||||
{
|
||||
if ( ! in_array( $data['testfor'], $extensions ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Added 'nohault' key which will show a
|
||||
// warning but not prohibit installation
|
||||
//-----------------------------------------
|
||||
|
||||
if( $data['nohault'] )
|
||||
{
|
||||
$data['_ok'] = 1; // Anything but true or false
|
||||
$extensionsOK = 1; // Anything but true or false
|
||||
}
|
||||
else
|
||||
{
|
||||
$extensionsOK = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['_ok'] = TRUE;
|
||||
}
|
||||
|
||||
$extensionData[] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
/* All extensions loaded OK? */
|
||||
if ( $extensionsOK == TRUE AND $filesOK === NULL )
|
||||
{
|
||||
$filesOK = FALSE;
|
||||
|
||||
/* Fetch core writeable files */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
try
|
||||
{
|
||||
$xml->load( IPS_ROOT_PATH . 'setup/xml/writeablefiles.xml' );
|
||||
|
||||
foreach( $xml->fetchElements( 'file' ) as $xmlelement )
|
||||
{
|
||||
$data = $xml->fetchElementsFromRecord( $xmlelement );
|
||||
|
||||
if ( $data['path'] )
|
||||
{
|
||||
$_path = DOC_IPS_ROOT_PATH . $data['path'];
|
||||
|
||||
if ( ! file_exists( $_path ) )
|
||||
{
|
||||
if ( $data['dir'] )
|
||||
{
|
||||
if ( ! @mkdir( $_path, IPS_FOLDER_PERMISSION, TRUE ) )
|
||||
{
|
||||
$this->registry->output->addError( 'Директория не существует: "' . $data['path'] . '". Пожалуйста, создайте ее' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addError( 'Файл не существует: "' . $data['path'] . '". Пожалуйста, создайте его' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! is_writeable( $_path ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// If we're upgrading, don't do this to conf_global
|
||||
// @link http://community.invisionpower.com/tracker/issue-20478-config-file-premission/
|
||||
//-----------------------------------------
|
||||
|
||||
if( strpos( $_path, 'conf_global.php' ) !== false )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! @chmod( $_path, is_dir( $_path ) ? IPS_FOLDER_PERMISSION : IPS_FILE_PERMISSION ) )
|
||||
{
|
||||
if ( is_dir( $_path ) )
|
||||
{
|
||||
$this->registry->output->addError( 'Невозможна запись в директорию: "' . $data['path'] . '", измените права доступа к ней на 777' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addError( 'Невозможна запись в файл: "' . $data['path'] . '", измените права доступа к нему на 777' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! count( $this->registry->output->fetchErrors() ) )
|
||||
{
|
||||
$filesOK = TRUE;
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$filesOK = FALSE;
|
||||
$this->registry->output->addError( "Невозможно найти файл: " . IPS_ROOT_PATH . 'setup/xml/writeablefiles.xml' );
|
||||
}
|
||||
}
|
||||
|
||||
/* Set next action */
|
||||
//$this->registry->output->setNextAction( 'apps' );
|
||||
$this->registry->output->setNextAction( 'convert' );
|
||||
|
||||
/* Hide buttons? */
|
||||
if ( $filesOK !== TRUE OR $extensionsOK != TRUE )
|
||||
{
|
||||
$this->registry->output->setNextAction( '' );
|
||||
$this->registry->output->setHideButton( TRUE );
|
||||
}
|
||||
|
||||
/* Simply return the requirements page */
|
||||
$this->registry->output->setTitle( "Требования" );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_requirements( $filesOK, $extensionsOK, $extensionData, 'обновления' ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Upgrader: Index file - Shows log in page
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
class upgrade_overview extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Execute selected method
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* INIT */
|
||||
$filesOK = NULL;
|
||||
$extensions = get_loaded_extensions();
|
||||
$extensionsOK = TRUE;
|
||||
$extensionData = array();
|
||||
|
||||
/* Test to make sure core.php is up-to-date. Large file may not always upload cleanly */
|
||||
if ( ! method_exists( 'IPSLib', 'loadLibrary' ) )
|
||||
{
|
||||
$filesOK = false;
|
||||
$this->registry->output->addError( 'Please ensure that "' . CP_DIRECTORY . '/sources/base/core.php" is up-to-date. Re-upload via FTP if necessary' );
|
||||
}
|
||||
|
||||
/* Test Extensions */
|
||||
$INSTALLDATA = array();
|
||||
include( IPS_ROOT_PATH . 'setup/xml/requiredextensions.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $INSTALLDATA ) && count( $INSTALLDATA ) )
|
||||
{
|
||||
foreach( $INSTALLDATA as $data )
|
||||
{
|
||||
if ( ! in_array( $data['testfor'], $extensions ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Added 'nohault' key which will show a
|
||||
// warning but not prohibit installation
|
||||
//-----------------------------------------
|
||||
|
||||
if( $data['nohault'] )
|
||||
{
|
||||
$data['_ok'] = 1; // Anything but true or false
|
||||
$extensionsOK = 1; // Anything but true or false
|
||||
}
|
||||
else
|
||||
{
|
||||
$extensionsOK = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['_ok'] = TRUE;
|
||||
}
|
||||
|
||||
$extensionData[] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
/* All extensions loaded OK? */
|
||||
if ( $extensionsOK == TRUE AND $filesOK === NULL )
|
||||
{
|
||||
$filesOK = FALSE;
|
||||
|
||||
/* Fetch core writeable files */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
try
|
||||
{
|
||||
$xml->load( IPS_ROOT_PATH . 'setup/xml/writeablefiles.xml' );
|
||||
|
||||
foreach( $xml->fetchElements( 'file' ) as $xmlelement )
|
||||
{
|
||||
$data = $xml->fetchElementsFromRecord( $xmlelement );
|
||||
|
||||
if ( $data['path'] )
|
||||
{
|
||||
$_path = DOC_IPS_ROOT_PATH . $data['path'];
|
||||
|
||||
if ( ! file_exists( $_path ) )
|
||||
{
|
||||
if ( $data['dir'] )
|
||||
{
|
||||
if ( ! @mkdir( $_path, IPS_FOLDER_PERMISSION, TRUE ) )
|
||||
{
|
||||
$this->registry->output->addError( 'Directory does not exist: "' . $data['path'] . '", please create it via FTP' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addError( 'File does not exist: "' . $data['path'] . '", please create it via FTP' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! is_writeable( $_path ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// If we're upgrading, don't do this to conf_global
|
||||
// @link http://community.invisionpower.com/tracker/issue-20478-config-file-premission/
|
||||
//-----------------------------------------
|
||||
|
||||
if( strpos( $_path, 'conf_global.php' ) !== false )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! @chmod( $_path, is_dir( $_path ) ? IPS_FOLDER_PERMISSION : IPS_FILE_PERMISSION ) )
|
||||
{
|
||||
if ( is_dir( $_path ) )
|
||||
{
|
||||
$this->registry->output->addError( 'Can not write to directory: "' . $data['path'] . '", please CHMOD to 777' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->addError( 'Can not write to file: "' . $data['path'] . '", please CHMOD to 777' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! count( $this->registry->output->fetchErrors() ) )
|
||||
{
|
||||
$filesOK = TRUE;
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$filesOK = FALSE;
|
||||
$this->registry->output->addError( "Cannot locate: " . IPS_ROOT_PATH . 'setup/xml/writeablefiles.xml' );
|
||||
}
|
||||
}
|
||||
|
||||
/* Set next action */
|
||||
$this->registry->output->setNextAction( 'apps' );
|
||||
|
||||
/* Hide buttons? */
|
||||
if ( $filesOK !== TRUE OR $extensionsOK != TRUE )
|
||||
{
|
||||
$this->registry->output->setNextAction( '' );
|
||||
$this->registry->output->setHideButton( TRUE );
|
||||
}
|
||||
|
||||
/* Simply return the requirements page */
|
||||
$this->registry->output->setTitle( "Requirements" );
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_requirements( $filesOK, $extensionsOK, $extensionData, 'upgrade' ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user