Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Web conversion process
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 9 Sept 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Web conversion process
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 9 Sept 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -16,7 +16,7 @@ use \IPSUtf8\Output\Browser\Template;
|
||||
* Web Conversion process
|
||||
*/
|
||||
class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
{
|
||||
{
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
@@ -25,7 +25,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
public function manage()
|
||||
{
|
||||
$output = NULL;
|
||||
|
||||
|
||||
switch( \IPSUtf8\Session::i()->status )
|
||||
{
|
||||
default:
|
||||
@@ -36,7 +36,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Process
|
||||
*
|
||||
@@ -47,19 +47,19 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
if ( isset( \IPSUtf8\Request::i()->use_utf8mb4 ) )
|
||||
{
|
||||
$sessionData = \IPSUtf8\Session::i()->json;
|
||||
|
||||
|
||||
$sessionData['use_utf8mb4'] = ( ! empty( \IPSUtf8\Request::i()->use_utf8mb4 ) ) ? 1 : 0;
|
||||
|
||||
|
||||
\IPSUtf8\Session::i()->json = $sessionData;
|
||||
\IPSUtf8\Session::i()->save();
|
||||
}
|
||||
|
||||
|
||||
\IPSUtf8\Convert::i()->process( 100 );
|
||||
|
||||
|
||||
$json = \IPSUtf8\Session::i()->json;
|
||||
$percent = round( ($json['convertedCount'] / \IPSUtf8\Convert::i()->getTotalRowsToConvert()) * 100, 2 );
|
||||
$msg = "Processing " . \IPSUtf8\Session::i()->current_table . '<br>Row: ' . \IPSUtf8\Session::i()->current_row . ' of ' . \IPSUtf8\Session::i()->tables[ \IPSUtf8\Session::i()->current_table ]['count'] . ' - Total: ' . $percent . '%';
|
||||
|
||||
|
||||
if ( ! \IPSUtf8\Request::i()->isAjax() )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->output = Template::process( \IPSUtf8\Session::i()->status, $percent, $msg );
|
||||
@@ -69,7 +69,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
\IPSUtf8\Output\Browser::i()->sendOutput( json_encode( array( \IPSUtf8\Session::i()->status, $percent, $msg ) ), 200, 'application/json' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Completed
|
||||
*
|
||||
@@ -80,7 +80,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
\IPSUtf8\Session::i()->reset();
|
||||
return $this->welcome();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Completed
|
||||
*
|
||||
@@ -91,7 +91,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
\IPSUtf8\Convert::i()->finish();
|
||||
\IPSUtf8\Output\Browser::i()->output = Template::completed( \IPSUtf8\Session::i()->timeTaken( true ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* We're finished! (In a good way)
|
||||
*
|
||||
@@ -100,11 +100,10 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
public function finish()
|
||||
{
|
||||
\IPSUtf8\Convert::i()->renameTables();
|
||||
\IPSUtf8\Convert::i()->deleteOriginalTables();
|
||||
\IPSUtf8\Session::i()->status = null;
|
||||
\IPSUtf8\Session::i()->completed_json = array();
|
||||
\IPSUtf8\Session::i()->reset();
|
||||
|
||||
|
||||
/* Attempt to automatically update conf_global.php */
|
||||
$updated = FALSE;
|
||||
|
||||
@@ -136,7 +135,7 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
|
||||
\IPSUtf8\Output\Browser::i()->output = Template::finished( $updated );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Welcome page
|
||||
*
|
||||
@@ -149,39 +148,31 @@ class browser extends \IPSUtf8\Dispatcher\Controller
|
||||
@mkdir( THIS_PATH . '/tmp' );
|
||||
@chmod( THIS_PATH . '/tmp', 0777 );
|
||||
}
|
||||
|
||||
|
||||
if ( ! is_writable( THIS_PATH . '/tmp' ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("Please ensure that '" . THIS_PATH . '/tmp' . "' is writable.");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ( IPB_LOCK and ! \IPSUtf8\Session::i()->is_ipb )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("Cannot locate the IP.Board database tables. Please check to ensure the SQL Prefix if set, is correct in 'conf_global.php'.");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
if ( ! count( \IPSUtf8\Session::i()->tables ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error("No tables found for processing. Please check to ensure the correct database name and prefix are being used.");
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( \IPSUtf8\Convert::i()->databaseIsUtf8() AND !count( \IPSUtf8\Convert::i()->getNonUtf8CollationTables() ) )
|
||||
{
|
||||
\IPSUtf8\Output\Browser::i()->error( 'The database tables are UTF-8, collations are correct and there is nothing to convert. You can <strong><a href="../upgrade">proceed with the upgrade</strong>.' );
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
$json = \IPSUtf8\Session::i()->json;
|
||||
$percent = ( \IPSUtf8\Convert::i()->getTotalRowsToConvert() ) ? sprintf ("%6.2f", round( ($json['convertedCount'] / \IPSUtf8\Convert::i()->getTotalRowsToConvert() ) * 100, 2 ) ) : 100;
|
||||
|
||||
$percent = ( \IPSUtf8\Convert::i()->getTotalRowsToConvert() ) ? round( ($json['convertedCount'] / \IPSUtf8\Convert::i()->getTotalRowsToConvert() ) * 100, 2 ) : 100;
|
||||
|
||||
$isUtf8 = (boolean) ( \IPSUtf8\Convert::i()->databaseIsUtf8() );
|
||||
$processing = (boolean) ( \IPSUtf8\Session::i()->status === 'processing' );
|
||||
|
||||
|
||||
\IPSUtf8\Output\Browser::i()->output = Template::welcome( $isUtf8, \IPSUtf8\Session::i()->status, $percent );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Web conversion process
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 9 Sept 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user