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 CLI 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
|
||||
*/
|
||||
@@ -144,9 +144,11 @@ class cli
|
||||
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( "\n" . count( $convertClass::i()->getNonUtf8Tables() ) . " table(s) are not UTF-8 and need converting.\n");
|
||||
$origUtf8Charset = \IPSUtf8\Db::i('utf8')->getCharset();
|
||||
if ( version_compare( \IPSUtf8\Db::i()->server_info, '5.5.3', '>=' ) AND \IPSUtf8\Db::i('utf8')->set_charset('utf8mb4') !== FALSE )
|
||||
$canMb4 = (bool) \IPSUtf8\Db::i('utf8')->set_charset( 'utf8mb4' );
|
||||
\IPSUtf8\Db::i('utf8')->set_charset( $origUtf8Charset );
|
||||
if ( version_compare( \IPSUtf8\Db::i()->server_info, '5.5.3', '>=' ) AND $canMb4 !== FALSE )
|
||||
{
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("Use 4-byte UTF-8 Encoding (utf8mb4)?\nSome non-common symbols (such as historical scripts, music symbols and Emoji) require more space in the database to be stored. If you choose 'no', users will not be able to use these symbols on your site. If 'yes', these characters will be able to be used, but the database will use more disk space.\n<choice>[y] Enter 'y' for Yes\n[n] Enter 'n' for No</choice>", 100 );
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput("Use 4-byte UTF-8 Encoding (utf8mb4)?\nSome non-common symbols (such as historical scripts, music symbols and Emoji) require more space in the database to be stored. If you choose 'no', users will not be able to use these symbols on your site. If 'yes', these characters will be able to be used, but the database will use more disk space.\n<choice>[y] Enter 'y' for Yes\n[n] Enter 'n' for No\n[x] Enter 'x' to exit</choice>", 100 );
|
||||
|
||||
$sessionData = \IPSUtf8\Session::i()->json;
|
||||
|
||||
@@ -154,15 +156,18 @@ class cli
|
||||
{
|
||||
$sessionData['use_utf8mb4'] = 1;
|
||||
}
|
||||
else
|
||||
else if ( \IPSUtf8\Output\Cli::i()->response === 'n' )
|
||||
{
|
||||
$sessionData['use_utf8mb4'] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
\IPSUtf8\Session::i()->json = $sessionData;
|
||||
\IPSUtf8\Session::i()->save();
|
||||
}
|
||||
\IPSUtf8\Db::i('utf8')->set_charset( $origUtf8Charset );
|
||||
|
||||
|
||||
\IPSUtf8\Output\Cli::i()->sendOutput( $intro );
|
||||
|
||||
Reference in new issue
Block a user