2010-04-18, 08:12 AM
2010-04-18, 10:14 AM
Moved to plugin support as it's to do with new points.
2010-04-18, 10:15 AM
I've got the same problem trying to convert my tables to UTF-8 ... Searching in the files, it should be there the problem is located.
It hasn't to do with plugins, it's a MyBB problem
The problem is a result of changes in admin/modules/tools/system_health.php since MyBB 1.4.6. I just uploaded those files and now it works perfectly
It hasn't to do with plugins, it's a MyBB problem
The problem is a result of changes in admin/modules/tools/system_health.php since MyBB 1.4.6. I just uploaded those files and now it works perfectly
--- /home/kevin/Desktop/Downloads/mybb_1406/Upload/admin/modules/tools/system_health.php 2009-05-03 08:33:32.000000000 +0200
+++ /home/kevin/Desktop/Downloads/mybb_1412/Upload/admin/modules/tools/system_health.php 2010-02-24 23:05:36.000000000 +0100
@@ -23,7 +23,7 @@
{
$plugins->run_hooks("admin_tools_system_health_utf8_conversion");
- if($db->type == "sqlite2" || $db->type == "sqlite3")
+ if($db->type == "sqlite2" || $db->type == "sqlite3" || $db->type == "pgsql")
{
flash_message($lang->error_not_supported, 'error');
admin_redirect("index.php?module=tools/system_health");
@@ -97,6 +97,8 @@
'tinytext' => 'tinyblob'
);
+ $blob_types = array( 'blob', 'tinyblob', 'mediumblog', 'longblob', 'text', 'tinytext', 'mediumtext', 'longtext' );
+
// Get next table in list
$convert_to_binary = '';
$convert_to_utf8 = '';
@@ -135,25 +137,39 @@
// Build the actual strings for converting the columns
$names = "CHANGE `{$column['Field']}` `{$column['Field']}` ";
- $attributes = " DEFAULT ";
- if($column['Default'] == 'NULL')
+ if(($db->type == 'mysql' || $db->type == 'mysqli') && in_array($type, $blob_types))
{
- $attributes .= "NULL ";
+ if($column['Null'] == 'YES')
+ {
+ $attributes = 'NULL';
+ }
+ else
+ {
+ $attributes = 'NOT NULL';
+ }
}
else
{
- $attributes .= "'".$db->escape_string($column['Default'])."' ";
-
- if($column['Null'] == 'YES')
+ $attributes = " DEFAULT ";
+ if($column['Default'] == 'NULL')
{
- $attributes .= 'NULL';
+ $attributes .= "NULL ";
}
else
{
- $attributes .= 'NOT NULL';
+ $attributes .= "'".$db->escape_string($column['Default'])."' ";
+
+ if($column['Null'] == 'YES')
+ {
+ $attributes .= 'NULL';
+ }
+ else
+ {
+ $attributes .= 'NOT NULL';
+ }
}
}
-
+
$convert_to_binary .= $comma.$names.preg_replace('/'.$type.'/i', $types[$type], $column['Type']).$attributes;
$convert_to_utf8 .= "{$comma}{$names}{$column['Type']} CHARACTER SET utf8 COLLATE utf8_general_ci{$attributes}";
2010-04-18, 10:43 AM
(2010-04-18, 10:15 AM)Paretje Wrote: [ -> ]It hasn't to do with plugins, it's a MyBB problem
The problem is a result of changes in admin/modules/tools/system_health.php since MyBB 1.4.6. I just uploaded those files and now it works perfectly
sorry buddy i could not get it which file i need to replace?? and what is the code for?? and where do I should place it kindly guide me.
Regards,
RFI
(2010-04-18, 10:14 AM)MattRogowski Wrote: [ -> ]Moved to plugin support as it's to do with new points.
matt thanks for attention 'the point' system at my site is working quite fine.