mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
Ignore core prefs table during charset conversion.
This commit is contained in:
@@ -100,11 +100,17 @@ class system_tools
|
|||||||
{
|
{
|
||||||
|
|
||||||
public $_options = array();
|
public $_options = array();
|
||||||
|
|
||||||
|
private $_utf8_exclude = array();
|
||||||
|
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
global $mySQLdefaultdb;
|
global $mySQLdefaultdb;
|
||||||
|
|
||||||
|
$this->_utf8_exclude = array(MPREFIX."core");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->_options = array(
|
$this->_options = array(
|
||||||
"db_update" => array('diz'=>DBLAN_15, 'label'=>DBLAN_16),
|
"db_update" => array('diz'=>DBLAN_15, 'label'=>DBLAN_16),
|
||||||
@@ -523,6 +529,12 @@ class system_tools
|
|||||||
$invalidCollations = false;
|
$invalidCollations = false;
|
||||||
while($row = $sql->fetch())
|
while($row = $sql->fetch())
|
||||||
{
|
{
|
||||||
|
if(in_array($row['Name'],$this->_utf8_exclude))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$text .= "<tr>
|
$text .= "<tr>
|
||||||
<td>".$row['Name']."</td>
|
<td>".$row['Name']."</td>
|
||||||
<td>".$row['Engine']."</td>
|
<td>".$row['Engine']."</td>
|
||||||
@@ -554,6 +566,7 @@ class system_tools
|
|||||||
<li>The conversion process can take up to one minute or much much more depending on the size of your database.</li>
|
<li>The conversion process can take up to one minute or much much more depending on the size of your database.</li>
|
||||||
<li>The conversion does not work with serialized arrays.</li>
|
<li>The conversion does not work with serialized arrays.</li>
|
||||||
<li>Be sure that you have followed all steps of the upgrade process first.</li>
|
<li>Be sure that you have followed all steps of the upgrade process first.</li>
|
||||||
|
<li>Core prefs are ignored during the conversion process due to possibility of corruption. </li>
|
||||||
</ul>
|
</ul>
|
||||||
';
|
';
|
||||||
|
|
||||||
@@ -644,6 +657,13 @@ class system_tools
|
|||||||
while ($row = $sql->fetch())
|
while ($row = $sql->fetch())
|
||||||
{
|
{
|
||||||
$table = $row['Name'];
|
$table = $row['Name'];
|
||||||
|
|
||||||
|
if(in_array($row['Name'], $this->_utf8_exclude))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$tab_query = "ALTER TABLE ".$table." DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ";
|
$tab_query = "ALTER TABLE ".$table." DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ";
|
||||||
|
|
||||||
//echo "TABQRT= ".$tab_query;
|
//echo "TABQRT= ".$tab_query;
|
||||||
|
Reference in New Issue
Block a user