Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-06-16 11:21:04 -0400 (Wed, 16 Jun 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mark $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6541 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_address extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: ADMIN file
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_admin extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-04-09 21:23:51 -0400 (Fri, 09 Apr 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6094 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_apps extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -101,7 +101,7 @@ class install_apps extends ipsCommand
|
||||
// Get it!
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! file_exists( IPS_ROOT_PATH . $_pBit . '/' . $file . '/xml/information.xml' ) )
|
||||
if ( ! is_file( IPS_ROOT_PATH . $_pBit . '/' . $file . '/xml/information.xml' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-05-03 19:34:02 -0400 (Mon, 03 May 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-09-16 15:32:18 -0400 (Fri, 16 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6205 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9503 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_db extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -43,11 +43,28 @@ class install_db extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Quick basic check for extensions
|
||||
//-----------------------------------------
|
||||
|
||||
if( strtolower(IPSSetUp::getSavedData('sql_driver')) == 'mysql' )
|
||||
{
|
||||
if( !function_exists('mysqli_connect') AND !function_exists('mysql_connect') )
|
||||
{
|
||||
$this->registry->output->setTitle( "Databases: Error" );
|
||||
$this->registry->output->setNextAction( 'db&do=check' );
|
||||
$this->registry->output->addWarning( "You do not have the mysql or mysqli PHP extension installed. You must install one of these PHP extensions before you can continue." );
|
||||
$this->registry->output->addContent( $this->fetchContent() );
|
||||
$this->registry->output->sendOutput();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load DB driver..
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classDb' . ucwords( IPSSetUp::getSavedData('sql_driver') ) . '.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classDb' . ucwords( IPSSetUp::getSavedData('sql_driver') ) . '.php' );/*noLibHook*/
|
||||
|
||||
$classname = "db_driver_".IPSSetUp::getSavedData('sql_driver');
|
||||
|
||||
@@ -63,9 +80,9 @@ class install_db extends ipsCommand
|
||||
// Any "extra" configs required for this driver?
|
||||
//--------------------------------------------------
|
||||
|
||||
if ( file_exists( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' ) )
|
||||
if ( is_file( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' );
|
||||
require_once( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' );/*noLibHook*/
|
||||
|
||||
$extra_install = new install_extra( $this->registry );
|
||||
|
||||
@@ -251,9 +268,9 @@ class install_db extends ipsCommand
|
||||
$content = ( $check === FALSE ) ? $this->registry->output->template()->page_db() : $this->registry->output->template()->page_dbOverride();
|
||||
|
||||
/* Driver extras? */
|
||||
if ( file_exists( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' ) )
|
||||
if ( is_file( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' );
|
||||
require_once( IPS_ROOT_PATH . 'setup/sql/'.IPSSetUp::getSavedData('sql_driver').'_install.php' );/*noLibHook*/
|
||||
$extra_install = new install_extra( $this->registry );
|
||||
|
||||
$content = str_replace( '<!--{EXTRA.SQL}-->', $extra_install->install_form_extra(), $content );
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_done extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_eula extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: Index file
|
||||
* Last Updated: $LastChangedDate: 2010-09-15 17:14:23 -0400 (Wed, 15 Sep 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: terabyte $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6881 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ class install_index extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class install_index extends ipsCommand
|
||||
|
||||
/* Test Extensions */
|
||||
$INSTALLDATA = array();
|
||||
include( IPS_ROOT_PATH . 'setup/xml/requiredextensions.php' );
|
||||
include( IPS_ROOT_PATH . 'setup/xml/requiredextensions.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $INSTALLDATA ) && count( $INSTALLDATA ) )
|
||||
{
|
||||
@@ -69,7 +69,7 @@ class install_index extends ipsCommand
|
||||
}
|
||||
|
||||
/* Check for conf_global.dist.php */
|
||||
if ( file_exists( DOC_IPS_ROOT_PATH . 'conf_global.dist.php') AND ! file_exists( DOC_IPS_ROOT_PATH.'conf_global.php') )
|
||||
if ( is_file( DOC_IPS_ROOT_PATH . 'conf_global.dist.php') AND ! is_file( DOC_IPS_ROOT_PATH.'conf_global.php') )
|
||||
{
|
||||
if ( ! @rename( DOC_IPS_ROOT_PATH.'conf_global.dist.php', DOC_IPS_ROOT_PATH.'conf_global.php' ) )
|
||||
{
|
||||
@@ -85,7 +85,7 @@ class install_index extends ipsCommand
|
||||
$filesOK = FALSE;
|
||||
|
||||
/* Fetch core writeable files */
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
try
|
||||
@@ -104,7 +104,7 @@ class install_index extends ipsCommand
|
||||
{
|
||||
if ( $data['dir'] )
|
||||
{
|
||||
if ( ! @mkdir( $_path, 0777, TRUE ) )
|
||||
if ( ! @mkdir( $_path, IPS_FOLDER_PERMISSION, TRUE ) )
|
||||
{
|
||||
$this->registry->output->addError( 'Директория "' . $data['path'] . '" не существует, создайте ее' );
|
||||
}
|
||||
@@ -117,7 +117,7 @@ class install_index extends ipsCommand
|
||||
|
||||
if ( ! is_writeable( $_path ) )
|
||||
{
|
||||
if ( ! @chmod( $_path, 0777 ) )
|
||||
if ( ! @chmod( $_path, is_dir( $_path ) ? IPS_FOLDER_PERMISSION : IPS_FILE_PERMISSION ) )
|
||||
{
|
||||
if ( is_dir( $_path ) )
|
||||
{
|
||||
@@ -156,4 +156,4 @@ class install_index extends ipsCommand
|
||||
$this->registry->output->addContent( $this->registry->output->template()->page_requirements( $filesOK, $extensionsOK, $extensionData ) );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: EULA file
|
||||
* Last Updated: $LastChangedDate: 2010-10-25 11:09:26 -0400 (Mon, 25 Oct 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-09-26 16:02:02 -0400 (Mon, 26 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 7035 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9551 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,7 @@ class install_install extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -178,7 +178,7 @@ class install_install extends ipsCommand
|
||||
// Check that it wrote
|
||||
//-----------------------------------
|
||||
|
||||
if ( ! file_exists( IPSSetUp::getSavedData('install_dir') . '/conf_global.php' ) )
|
||||
if ( ! is_file( IPSSetUp::getSavedData('install_dir') . '/conf_global.php' ) )
|
||||
{
|
||||
$this->registry->output->setTitle( "Установка: Ошибка" );
|
||||
$this->registry->output->setNextAction( 'install&do=sql' );
|
||||
@@ -191,9 +191,9 @@ class install_install extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($INFO);
|
||||
$INFO = array();
|
||||
|
||||
require( IPSSetUp::getSavedData('install_dir') . '/conf_global.php' );
|
||||
require( IPSSetUp::getSavedData('install_dir') . '/conf_global.php' );/*noLibHook*/
|
||||
|
||||
if( ! $INFO['sql_driver'] )
|
||||
{
|
||||
@@ -231,10 +231,10 @@ class install_install extends ipsCommand
|
||||
// Tables
|
||||
//-----------------------------------------
|
||||
|
||||
if ( file_exists( $_FILE . '_tables.php' ) )
|
||||
if ( is_file( $_FILE . '_tables.php' ) )
|
||||
{
|
||||
$TABLE = array();
|
||||
include( $_FILE . '_tables.php' );
|
||||
include( $_FILE . '_tables.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $TABLE ) and count( $TABLE ) )
|
||||
{
|
||||
@@ -273,10 +273,10 @@ class install_install extends ipsCommand
|
||||
|
||||
if ( $this->DB->checkFulltextSupport() )
|
||||
{
|
||||
if ( file_exists( $_FILE . '_fulltext.php' ) )
|
||||
if ( is_file( $_FILE . '_fulltext.php' ) )
|
||||
{
|
||||
$INDEX = array();
|
||||
include( $_FILE . '_fulltext.php' );
|
||||
include( $_FILE . '_fulltext.php' );/*noLibHook*/
|
||||
|
||||
$output[] = $next['title'] . ": Создание индексов";
|
||||
|
||||
@@ -317,10 +317,10 @@ class install_install extends ipsCommand
|
||||
// INSERTS
|
||||
//-----------------------------------------
|
||||
|
||||
if ( file_exists( $_FILE . '_inserts.php' ) )
|
||||
if ( is_file( $_FILE . '_inserts.php' ) )
|
||||
{
|
||||
$INSERT = array();
|
||||
include( $_FILE . '_inserts.php' );
|
||||
include( $_FILE . '_inserts.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array($INSERT) && count($INSERT) )
|
||||
{
|
||||
@@ -363,7 +363,7 @@ class install_install extends ipsCommand
|
||||
if ( $next['key'] == 'core' )
|
||||
{
|
||||
|
||||
$output[] = "Inserting groups information...";
|
||||
$output[] = "Добавление информации о группах...";
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
if ( $extra_install AND method_exists( $extra_install, 'before_inserts_run' ) )
|
||||
@@ -393,7 +393,7 @@ class install_install extends ipsCommand
|
||||
|
||||
$output = ( is_array( $output ) AND count( $output ) ) ? $output : array( 0 => $next['title'] . ": Наполнение таблиц завершено" );
|
||||
|
||||
$this->_finishStep( $output, "Install: SQL", 'install&do=sql&previous=' . $next['key'] );
|
||||
$this->_finishStep( $output, "Установка: SQL", 'install&do=sql&previous=' . $next['key'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -443,7 +443,7 @@ class install_install extends ipsCommand
|
||||
$path = IPSLib::getAppDir( $next['key'] ) . '/setup/versions/install';
|
||||
$id = ( $id < 1 ) ? 1 : $id;
|
||||
|
||||
if ( file_exists( $path . '/sql/' .$next['key'] . '_' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_sql_' . $id .'.php' ) )
|
||||
if ( is_file( $path . '/sql/' .$next['key'] . '_' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_sql_' . $id .'.php' ) )
|
||||
{
|
||||
/* Set up DB driver */
|
||||
$extra_install = $this->_setUpDBDriver( FALSE );
|
||||
@@ -548,9 +548,9 @@ class install_install extends ipsCommand
|
||||
$long_version = '10000';
|
||||
$_versions = array();
|
||||
|
||||
if ( file_exists( $_PATH . 'versions.xml' ) )
|
||||
if ( is_file( $_PATH . 'versions.xml' ) )
|
||||
{
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
$xml->load( $_PATH . 'versions.xml' );
|
||||
@@ -569,7 +569,7 @@ class install_install extends ipsCommand
|
||||
$long_version = $_this_version['long'];
|
||||
}
|
||||
|
||||
if ( file_exists( $_PATH . 'information.xml' ) )
|
||||
if ( is_file( $_PATH . 'information.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -590,22 +590,25 @@ class install_install extends ipsCommand
|
||||
// Insert...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'core_applications', array( 'app_title' => $appData['name'],
|
||||
'app_public_title' => ( $appData['public_name'] ) ? $appData['public_name'] : '', // Allow blank in case it's an admin-only app
|
||||
'app_description' => $appData['description'],
|
||||
'app_author' => $appData['author'],
|
||||
'app_hide_tab' => intval($appData['hide_tab']),
|
||||
'app_version' => $version,
|
||||
'app_long_version' => $long_version,
|
||||
'app_directory' => $next['key'],
|
||||
'app_added' => time(),
|
||||
'app_position' => $num,
|
||||
'app_protected' => $_protected,
|
||||
'app_location' => IPSLib::extractAppLocationKey( $next['key'] ),
|
||||
'app_enabled' => ( $appData['disabledatinstall'] ) ? 0 : 1 ) );
|
||||
$this->DB->insert( 'core_applications', array( 'app_title' => $appData['name'],
|
||||
'app_public_title' => ( $appData['public_name'] ) ? $appData['public_name'] : '', // Allow blank in case it's an admin-only app
|
||||
'app_description' => $appData['description'],
|
||||
'app_author' => $appData['author'],
|
||||
'app_hide_tab' => intval($appData['hide_tab']),
|
||||
'app_version' => $version,
|
||||
'app_long_version' => $long_version,
|
||||
'app_directory' => $next['key'],
|
||||
'app_added' => time(),
|
||||
'app_position' => $num,
|
||||
'app_protected' => $_protected,
|
||||
'app_location' => IPSLib::extractAppLocationKey( $next['key'] ),
|
||||
'app_enabled' => $appData['disabledatinstall'] ? 0 : 1,
|
||||
'app_website' => $appData['website'],
|
||||
'app_update_check' => $appData['update_check'],
|
||||
'app_global_caches' => $appData['global_caches'],
|
||||
) );
|
||||
|
||||
$this->DB->insert( 'upgrade_history', array(
|
||||
'upgrade_version_id' => $long_version,
|
||||
$this->DB->insert( 'upgrade_history', array('upgrade_version_id' => $long_version,
|
||||
'upgrade_version_human' => $version,
|
||||
'upgrade_date' => 0,
|
||||
'upgrade_mid' => 0,
|
||||
@@ -644,7 +647,7 @@ class install_install extends ipsCommand
|
||||
/**
|
||||
* Install Modules
|
||||
*
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function install_modules()
|
||||
{
|
||||
@@ -751,7 +754,7 @@ class install_install extends ipsCommand
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
$knownSettings = array();
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_settings.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_settings.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -766,8 +769,8 @@ class install_install extends ipsCommand
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/settings.php' );
|
||||
$settings = new admin_core_tools_settings();
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/settings/settings.php' );/*noLibHook*/
|
||||
$settings = new admin_core_settings_settings();
|
||||
$settings->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
$this->request['app_dir'] = $next['key'];
|
||||
@@ -787,9 +790,9 @@ class install_install extends ipsCommand
|
||||
}
|
||||
|
||||
/* Fetch known settings */
|
||||
if ( file_exists( IPSLib::getAppDir( $next['key'] ) . '/setup/versions/install/knownSettings.php' ) )
|
||||
if ( is_file( IPSLib::getAppDir( $next['key'] ) . '/setup/versions/install/knownSettings.php' ) )
|
||||
{
|
||||
require( IPSLib::getAppDir( $next['key'] ) . '/setup/versions/install/knownSettings.php' );
|
||||
require( IPSLib::getAppDir( $next['key'] ) . '/setup/versions/install/knownSettings.php' );/*noLibHook*/
|
||||
}
|
||||
|
||||
$this->request['app_dir'] = $next['key'];
|
||||
@@ -857,7 +860,7 @@ class install_install extends ipsCommand
|
||||
|
||||
$output[] = "Добавление шаблонов стилей";
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -870,7 +873,7 @@ class install_install extends ipsCommand
|
||||
}
|
||||
|
||||
/* Skin Set Data */
|
||||
$xml->load( IPS_PUBLIC_PATH . 'resources/skins/setsData.xml' );
|
||||
$xml->load( IPS_ROOT_PATH . 'setup/xml/skins/setsData.xml' );
|
||||
|
||||
foreach( $xml->fetchElements( 'set' ) as $xmlelement )
|
||||
{
|
||||
@@ -893,9 +896,9 @@ class install_install extends ipsCommand
|
||||
}
|
||||
|
||||
/* Load skin classes */
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinImportExport.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinImportExport.php' );/*noLibHook*/
|
||||
|
||||
$skinFunctions = new skinImportExport( $this->registry );
|
||||
|
||||
@@ -929,7 +932,7 @@ class install_install extends ipsCommand
|
||||
|
||||
$output[] = $next['title'] . ": Добавлены шаблоны {$skinData['set_name']}";
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_' . $skinKey . '_templates.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_' . $skinKey . '_templates.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -958,7 +961,7 @@ class install_install extends ipsCommand
|
||||
}
|
||||
}
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_' . $skinKey . '_css.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_' . $skinKey . '_css.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1005,7 +1008,7 @@ class install_install extends ipsCommand
|
||||
foreach( $skinSets as $skinKey => $skinData )
|
||||
{
|
||||
/* Replacements */
|
||||
$skinFunctions->importReplacementsXMLArchive( file_get_contents( IPS_PUBLIC_PATH . 'resources/skins/replacements_' . $skinKey . '.xml' ), $skinKey );
|
||||
$skinFunctions->importReplacementsXMLArchive( file_get_contents( IPS_ROOT_PATH . 'setup/xml/skins/replacements_' . $skinKey . '.xml' ), $skinKey );
|
||||
}
|
||||
|
||||
$skinFunctions->rebuildSkinSetsCache();
|
||||
@@ -1048,7 +1051,7 @@ class install_install extends ipsCommand
|
||||
$output[] = $next['title'] . ": Добавление задач";
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_tasks.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_tasks.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1063,7 +1066,7 @@ class install_install extends ipsCommand
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/system/taskmanager.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/system/taskmanager.php' );/*noLibHook*/
|
||||
$tasks = new admin_core_system_taskmanager();
|
||||
$tasks->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1132,7 +1135,7 @@ class install_install extends ipsCommand
|
||||
// Get the language stuff
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php' );/*noLibHook*/
|
||||
$lang = new admin_core_languages_manage_languages();
|
||||
$lang->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1224,7 +1227,7 @@ class install_install extends ipsCommand
|
||||
// Get the language stuff
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/languages/manage_languages.php' );/*noLibHook*/
|
||||
$lang = new admin_core_languages_manage_languages();
|
||||
$lang->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1312,7 +1315,7 @@ class install_install extends ipsCommand
|
||||
$output[] = $next['title'] . ": Добавление BB-кодов";
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_bbcode.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_bbcode.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1327,11 +1330,16 @@ class install_install extends ipsCommand
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/bbcode.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/bbcode.php' );/*noLibHook*/
|
||||
$bbcode = new admin_core_posts_bbcode();
|
||||
$bbcode->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
$bbcode->bbcodeImportDo( file_get_contents( $_PATH . $next['key'] . '_bbcode.xml' ) );
|
||||
$_contents = file_get_contents( $_PATH . $next['key'] . '_bbcode.xml' );
|
||||
|
||||
if( $_contents )
|
||||
{
|
||||
$bbcode->bbcodeImportDo( $_contents );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1346,7 +1354,7 @@ class install_install extends ipsCommand
|
||||
$output[] = $next['title'] . ": Добавление медиа тегов";
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_mediatag.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_mediatag.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1361,7 +1369,7 @@ class install_install extends ipsCommand
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/media.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/posts/media.php' );/*noLibHook*/
|
||||
$bbcode = new admin_core_posts_media();
|
||||
$bbcode->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1417,7 +1425,7 @@ class install_install extends ipsCommand
|
||||
/* Set up DB driver */
|
||||
$extra_install = $this->_setUpDBDriver( FALSE );
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
$xml = new classXML( IPSSetUp::charSet );
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1429,7 +1437,7 @@ class install_install extends ipsCommand
|
||||
$output[] = $next['title'] . ": Добавление разделов помощи";
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
|
||||
if ( file_exists( $_PATH . $next['key'] . '_help.xml' ) )
|
||||
if ( is_file( $_PATH . $next['key'] . '_help.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1444,7 +1452,7 @@ class install_install extends ipsCommand
|
||||
// Do it..
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php' );/*noLibHook*/
|
||||
$help = new admin_core_tools_help();
|
||||
$help->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1511,7 +1519,7 @@ class install_install extends ipsCommand
|
||||
$output[] = $next['title'] . ": Добавление модификаций";
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/xml/';
|
||||
|
||||
if ( file_exists( $_PATH . 'hooks.xml' ) )
|
||||
if ( is_file( $_PATH . 'hooks.xml' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1526,7 +1534,7 @@ class install_install extends ipsCommand
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/applications/hooks.php' );
|
||||
require_once( IPS_ROOT_PATH . 'applications/core/modules_admin/applications/hooks.php' );/*noLibHook*/
|
||||
$hooks = new admin_core_applications_hooks();
|
||||
$hooks->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1552,7 +1560,7 @@ class install_install extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );
|
||||
require_once( IPS_KERNEL_PATH . 'classXML.php' );/*noLibHook*/
|
||||
|
||||
//-----------------------------------------
|
||||
// ****** LOG IN MODULES
|
||||
@@ -1607,7 +1615,7 @@ class install_install extends ipsCommand
|
||||
$q = $extra_install->before_inserts_run( 'useragents' );
|
||||
}
|
||||
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php' );/*noLibHook*/
|
||||
$userAgentFunctions = new userAgentFunctions( $this->registry );
|
||||
|
||||
$userAgentFunctions->rebuildMasterUserAgents();
|
||||
@@ -1652,7 +1660,7 @@ class install_install extends ipsCommand
|
||||
|
||||
if( IPSLib::appIsInstalled('calendar') )
|
||||
{
|
||||
require_once( IPSLib::getAppDir('calendar') . '/modules_admin/calendar/calendars.php' );
|
||||
require_once( IPSLib::getAppDir('calendar') . '/modules_admin/calendar/calendars.php' );/*noLibHook*/
|
||||
$cal = new admin_calendar_calendar_calendars();
|
||||
$cal->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
@@ -1714,7 +1722,7 @@ class install_install extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
# Grab cache master file
|
||||
require_once( IPS_ROOT_PATH . 'extensions/coreVariables.php' );
|
||||
require_once( IPS_ROOT_PATH . 'extensions/coreVariables.php' );/*noLibHook*/
|
||||
|
||||
/* Add handle */
|
||||
$_tmp = new coreVariables();
|
||||
@@ -1755,6 +1763,41 @@ class install_install extends ipsCommand
|
||||
|
||||
ipsRegistry::cache()->setCache( 'systemvars', $cache, array( 'array' => 1 ) );
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// License Key
|
||||
//-------------------------------------------------------------
|
||||
|
||||
if( ipsRegistry::$settings['ipb_reg_number'] )
|
||||
{
|
||||
$output[] = "Обновление информации о ключе лицензии...";
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classFileManagement.php' );/*noLibHook*/
|
||||
$this->classFileManagement = new classFileManagement();
|
||||
|
||||
/* Query the api */
|
||||
$response = $this->classFileManagement->getFileContents( "http://myipb.in/license.php?lk=" . ipsRegistry::$settings['ipb_reg_number'] . "&url=" . ipsRegistry::$settings['board_url'] . "&flush=1" );
|
||||
|
||||
/* Get License Data */
|
||||
$licenseData = json_decode( $response, true );
|
||||
|
||||
/* Copyright Removal? */
|
||||
if ( $licenseData['cr'] )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
|
||||
}
|
||||
elseif ( $this->settings['ips_cp_purchase'] )
|
||||
{
|
||||
IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
|
||||
}
|
||||
|
||||
/* Save to cache */
|
||||
$licenseData['_cached_date'] = time();
|
||||
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
|
||||
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
|
||||
|
||||
ipsRegistry::cache()->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Stats
|
||||
//-------------------------------------------------------------
|
||||
@@ -1787,9 +1830,9 @@ class install_install extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
/* Load skin classes */
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinImportExport.php' );
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinImportExport.php' );/*noLibHook*/
|
||||
|
||||
$skinFunctions = new skinImportExport( $this->registry );
|
||||
|
||||
@@ -1847,10 +1890,11 @@ class install_install extends ipsCommand
|
||||
|
||||
$output[] = "Кеш стиля обновлен";
|
||||
|
||||
/* Rebuild FURL cache */
|
||||
/* Rebuild FURL & GLOBAL caches */
|
||||
try
|
||||
{
|
||||
IPSLib::cacheFurlTemplates();
|
||||
IPSLib::cacheGlobalCaches();
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
@@ -1865,7 +1909,7 @@ class install_install extends ipsCommand
|
||||
{
|
||||
$_PATH = IPSLib::getAppDir( $next['key'] ) . '/extensions/';
|
||||
|
||||
if ( file_exists( $_PATH . 'coreVariables.php' ) )
|
||||
if ( is_file( $_PATH . 'coreVariables.php' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Adjust the table?
|
||||
@@ -1877,7 +1921,7 @@ class install_install extends ipsCommand
|
||||
}
|
||||
|
||||
# Grab cache master file
|
||||
require_once( $_PATH . 'coreVariables.php' );
|
||||
require_once( $_PATH . 'coreVariables.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $CACHE ) )
|
||||
{
|
||||
@@ -1924,7 +1968,7 @@ class install_install extends ipsCommand
|
||||
*
|
||||
* @access private
|
||||
* @param bool Whether the DB driver returns with an error or not
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
private function _setUpDBDriver( $returnDie=TRUE )
|
||||
{
|
||||
@@ -1934,9 +1978,9 @@ class install_install extends ipsCommand
|
||||
// Any "extra" configs required for this driver?
|
||||
//--------------------------------------------------
|
||||
|
||||
if ( file_exists( IPS_ROOT_PATH .'setup/sql/' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_install.php' ) )
|
||||
if ( is_file( IPS_ROOT_PATH .'setup/sql/' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_install.php' ) )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH .'setup/sql/' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_install.php' );
|
||||
require_once( IPS_ROOT_PATH .'setup/sql/' . strtolower( IPSSetUp::getSavedData('sql_driver') ) . '_install.php' );/*noLibHook*/
|
||||
|
||||
$extra_install = new install_extra( $this->registry );
|
||||
}
|
||||
@@ -1966,7 +2010,7 @@ class install_install extends ipsCommand
|
||||
* @param string output
|
||||
* @param string title
|
||||
* @param string next step
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
private function _finishStep( $output, $title, $nextStep )
|
||||
{
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Installer: License Key
|
||||
* Last Updated: $LastChangedDate: 2010-06-16 11:21:04 -0400 (Wed, 16 Jun 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-08-30 20:24:16 -0400 (Tue, 30 Aug 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mark $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6541 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9434 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,20 +24,24 @@ class install_license extends ipsCommand
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
$lcheck = '';
|
||||
if ( $this->request['do'] == 'check' )
|
||||
{
|
||||
$lcheck = $this->check();
|
||||
if ( $lcheck === TRUE )
|
||||
{
|
||||
$this->registry->autoLoadNextAction( 'db' );
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -49,6 +53,22 @@ class install_license extends ipsCommand
|
||||
*/
|
||||
private function check()
|
||||
{
|
||||
return true;
|
||||
$this->request['lkey'] = trim( $this->request['lkey'] );
|
||||
|
||||
// License key is optional
|
||||
if( ! $this->request['lkey'] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$url = IPSSetup::getSavedData( 'install_url' );
|
||||
|
||||
require_once( IPS_KERNEL_PATH . 'classFileManagement.php' );
|
||||
$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 );
|
||||
IPSSetup::setSavedData( 'lkey', $this->request['lkey'] );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user